mapFields generates cellDisplacement file from pointDisplacement

Hope you are well
I am carrying out FSI on an oscillating pipe using OpenFOAM and CalculiX.
The case runs up to a certain displacement and diverges. In order to capture the continues motion, I generated a new fluid and solid mesh from the last timestep and mapped fields from the data generated. However, when I do this a cellDisplacement file is generated in the constant folder instead of a pointDisplacement which is what I had in the original case and have seen, generally, in preCICE cases.
The case then says it cannot find a pointDisplacement file and refuses to run.
How do I go about this issue? Is there a way to generate a pointDisplacement file or do I need to change a setting to enable use of the cellDisplacement file?
Do I need a map field function or dict for openFOAM? I am not sure.

Would appreciate any help.

Hi @mishal49,

the adapter automatically chooses between pointDisplacement to cellDisplacement depending on the locations (faceCenters / faceNodes) you set. Could this be the case?

I see.
Is there any way to specify it to produce pointDisplacment file? or is there a way to run with cellDisplacement file?
Attached is the preciceDict:
preciceDict.txt (676 Bytes)

Could you please help me reproduce the issue, by describing the steps you took? Ideally, based on some tutorial.

Sure. You could try this on elastic-tube-3d.
I ran this command in OpenFOAM:

mapFields -consistent -sourceTime ‘latestTime’ …/fluid-openfoam

This generated a cellDisplacement file in the 0 folder.

Say you take the elastic tube 3d case and run it until a point where it displaces inwards and diverges due to mesh entanglement. I extracted the deformed geometry and re-generated the fluid and solid meshes and then run the command.

Two aspects:

  1. What the OpenFOAM adapter does
  2. What the tool mapField does, independent of OpenFOAM

What the OpenFOAM adapter does

Running the tutorial case perpendicular-flap/fluid-openfoam, which contains a 0/pointDisplacement file (only), I end up at time 0.1 getting both 0.1/pointDisplacement and 0.1/cellDisplacement. Both have values.

The same for the elastic-tube-3d tutorial.

So, I assume this is not an issue, right?

What the mapField does

Running mapFields -consistent -sourceTime ‘latestTime’ …/fluid-openfoam with OpenFOAM v2306, I see that I am getting a new 0/cellDisplacement, as well as a 0/pointDisplacement.unmapped.

Not sure what to do with this information, but I guess this is mostly a general OpenFOAM question (which is also very welcome, but I don’t know how to answer).

Hi @Makis
Since the coupling does not work without a pointDisplacement file, I just move the pointDisplacement.unmapped to pointDisplacement and then run the simulation. This works fine.

1 Like