Hi all
I am new to precice and i want to write new adapter to create simple one way fluid structure interaction.
I want to use FLOWPanel as a cfd solver and import loads from it to calculix structural solver.
And i came across strange problem because in doc of calculix adapter it is written that FSI uses primary forces on nodes as a load on structure. While cfd actually calculates pressure on elements.
What kind of mesh and solution definition/structure i need to have to be able to send it through api?
Sorry for asking obvious questions.
thanks for any help
The CalculiX adapter should also be able to read pressure: Configure the CalculiX adapter | preCICE - The Coupling Library
In any case, you can always use the Actions to do some computations on the fields you are exchanging.
Or you could modify the CalculiX adapter to read what you want:
Thank you for answer
I think my problem is not with calculix adapter but rather poor understanding of how new adapter should be written
Finding forces on element centers seemed for me not natural if there are pressure data.
In documentation I found that force data are send by use of two arrays : one with (x,y,z) coordinates and second with force data ( wherever should be placed force direction)
With code you attached, I assume that if exchanged data is pressure, it is replaced with forces acting on face centers, isn’t it?
I honestly am not sure how solution format should look like to be send to precice.
For now I am just trying to reprroduce behaviour of openfoam coupler
@pl96andy in FSI problems, we typically exchange forces and displacements on a boundary (coupling interface), not on cell centers. This typically means face centers or face nodes.
In preCICE, you first need to define the locations of one or more coupling meshes (set_mesh_vertices
) and then read/write values on these meshes. You can reuse a coupling mesh for multiple data fields, as long as they are on the same locations.
To get starting with writing your own adapter, have a look at the step-by-step guide here: