FSI: faceCenters v.s. faceNodes

Can someone explain how to use faceCenters and faceNodes in OpenFOAM configuration file when using FSI module?

I tested a simple FSI case. The fluid is at the hydrostatic state. I transfer the stress at each node from OpenFOAM to a python-solid solver since my solid solver is a node-based finite difference solver.

The problem is the results are unexpected if I use the following setup (faceCenters) in preciceDict for OpenFOAM

    mesh              Fluid-Mesh;
    patches           (flap);
    locations         **faceNodes**;

However, if I change it to faceCenters, the results are what I want. That puzzles me. My understanding is I should use faceNodes instead of faceCenters since I want the stress at the nodes.


From the figures attached, we can see that the stress in the correct one figure shows the pattern of hydrostatic pressure as expected; however, the stress using faceNodes is in a mess.

Hope someone can tell me what could be wrong with my configuration or my understanding.

Any hints will be appreciated!

Hi @Michael ,

to make it short: you need to use the faceCenters for Stress data (or Force data). The location type is solely indicating where the individual data sets lives in the OpenFOAM discretization and almost only the displacement based data sets use faceNodes. The location type selected on the OpenFOAM side has nothing to do with the discretization of other simulation participants (the mapping is handled by preCICE anyway).

We recently noticed that this is a more frequent question and the situation is not insufficient. For that reason, we added a safeguard for valid location types/ data set combinations: Add a check for supported data locationType by DavidSCN · Pull Request #206 · precice/openfoam-adapter · GitHub, but I assume that your version does not yet contain these changes.

Hope this helps

Hi @DavidSCN,
This helpfully clarify the usage of locations. Now I understand that because ‘force’ and ‘stress’ are located at ‘faceCenters’, we always use faceCenters when writing them.

Now it totally makes sense to me that the ‘stress’ data was transferred to solid solver incorrectly since I used a wrong ‘locations’ in OpenFOAM. I’m still confused with data exchange. Are the data always exchanged at nodes? Say, no matter what kinds of data (stress at nodes, velocity at cell center, etc. ) are obtained from OpenFOAM, preCICE will interpolate and map them to the nodes of the other participant?

A safeguard for valid location types for different data is definitely helpful, especially for new users.

Thank you!

OpenFOAM provides the data at the location you specified and delivers it to preCICE (here faceCenters). preCICE maps then the data to the location given by the other participant. If you like, you can export the coupling meshes in preCICE (add <export:vtk ... /> in the participant config) and inspect the location of the coupling data and the actual mesh given by OpenFOAM.

Does it answer your question?

Hi David, Thanks for the further explanation! This resolved my confusion.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.