Data Mapping and Immersed boundary method

Hello to the Precice community,

I want to develop a FSI code using Precice, the structural part would be solved by Calculix with its adapter and for the fluid the idea is to use a solver based on the Lattice Boltzmann Method (LBM) instead of the Navier Stokes equation.

Using LBM should not be a problem because at the end, I’m only interested by the forces applied to my structure like for a Navier Stokes solver. My real question is about the Data Mapping between both solvers. The LBM uses a Cartesian mesh which can’t be deformed during the simulation and Calculix uses its own mesh based on FEM. If I understand the Data Mapping tool allows to “project” the forces from my LBM Cartesian mesh on the FEM mesh.

The fact is that I have already implemented in my fluid solver the Immersed Boundary method (IBM) which basically is my ‘own’ data mapping tool.

For that reason, the goal of Precice would be to exchange the data like force and displacement between the solvers and make a strong coupling with sub-iterations but without the Data Mapping part.

I would like to know if this configuration is possible with Precice and if this is going to “simplify” the development of the adapter or if this require a lot of work?

Kind regards

1 Like

Hi @Le_mot,

that’s an interesting question. In general, you can omit the data mapping in preCICE and just apply the data exchange and acceleration. Checkout the following documentation page: Direct access to received meshes | preCICE - The Coupling Library. You would then need to perform both mappings within your Fluid solver, as CalculiX is not able (or not prepared) to perform any mappings.

The setup would then look somewhat like this:

(1) Fluid solver computes Forces provided by your LBM solver
(2) Fluid solver maps the Forces to the CalculiX mesh
(3) preCICE communicates (and accelerates) the Force data to the CalculiX
(4) CalculilX computes the displacement
(5) preCICE communicates the displacements (living coordinate-wise still on the CalculiX mesh) back to the Fluid solver
(6) the Fluid solver maps/applies the received displacement field on it’s own mesh
(7) the Fluid solver computes the new forces

Steps (2) and (6) are usually handled by preCICE, but that’s what you want to change if I understand correctly. In principle you can also combine the ‘solver mapping’ and the ‘preCICE mapping’, e.g., you let preCICE compute the mapping in step (2) and you compute only the mapping in step (6) on your own.

In the described scenario, the CalculiX adapter would not change at all and you would need to develop an adapter for your LBM solver, as usual. Running this case in serial would be straight forward. Only for parallel cases, you would need to take care of the mesh partitioning, which is described a bit in the bottom section of the documentation page: Direct access to received meshes | preCICE - The Coupling Library. The changes will not simplify the adapter development as you hand over more features from preCICE towards the adapter.

I hope this answers the question in the first place. Feel free to ask again if anything is still unclear. You could also post a visualization of a preCICE configuration file as you would like to use it in order to discuss your case more in detail.

Best regards,

1 Like

Hi, thanks you for this very complete answer!

Indeed, this section of the documentation page is very useful and close to my case. About the parallel cases, I’m not sure to understand the documentation. I if understand, I will be able to run simulation in serial and parallel (for the coupling) so Calculix and my fluid solver will be able to run at the same time.

What you indicate is the fact that if I use my fluid solver in parallel (not for the coupling but to solve the fluid) : before each communication with Precice I will have to gather the “Interface-forces” information into one processor to send it to precice and precice will send me back the displacement from Calculix which I will have to “redistribute” to the processors of my fluid solver?

Basically, I can still run my fluid solver in parallel, but precise will have to work with one processor?

Best regards

Yes, you can run serial as well as parallel coupling schemes independent of the mapping.

No, you don’t need to gather the points explicitly onto one rank. What’s meant here is the fact that you might receive a coupling node on multiple processors on the other participant (depending on the partitioning of your solvers) and you are responsible to select one processor, which ‘works’ on this specific node. preCICE will still operate in parallel, just as your solver. Do you understand what I mean here?

1 Like

Ok I think that the architecture of my fluid solver allows me to deal with this problem thanks for your explanation !

Last question I hope, In the documentation of the Direct access to received meshes | preCICE - The Coupling Library it’s written :

“This concept is required if you want to access received meshes directly. It might be relevant in case you don’t want to use the mapping schemes in preCICE, but rather want to use your own solver for data mapping. As opposed to the usual preCICE mapping, only a single mesh (from the other participant) is now involved in this situation since an ‘own’ mesh defined by the participant itself is not required any more. »

This part is okay for me, I only have the mesh from calculix, I send to my fluid solver the displacement and the fluid solver send back the effort on the nodes of the calculix mesh. No mapping part of Precice is involved and the fluid mesh is useless to Precice. This corresponds to the documentation.

Then it’s written:

« In order to re-partition the received mesh, the participant needs to define the mesh region it wants read data from and write data to. The complete concept on the receiving participant looks as follows: »

If I understand, only the nodes of the solid in contact with the fluid are useful. So only the solid mesh at « the interface » has to be associated to precise. If we are in 2D it will be the contour line and in 3D the surface at the interface.

For that, either I ask to Calculix to only send only the interface nodes mesh which should not be a problem because the forces will be also applied only at those nodes. Either I define like in the documentation a “boundingBox” like in the documentation example.

It is correct ?


Correct that’s always the case for surface coupling (as we mostly do) and this is also the default behavior.

Yes, just as mentioned above, CalculiX will anyway operate on the interface mesh only. In order to specify the region of interest for your Fluid solver, i.e., the region containing relevant parts of the structure, you can then use the bounding boxes.

The visualized config file looks fine. If you run things using a single core for each participant you could also just define a ‘big enough’ bounding box in a first step so that the serial rank receives all relevant points in any case. This way, you avoid the additional complexity of multiple partitions.

1 Like