Using OpenFOAM adapter with axisymmetric mesh

Hi, I am trying to run a CHT case between two OpenFOAM solvers (sonicFoam and laplacianFoam) with a an 2D axisymmetric mesh. However, the openfoam adapter seems to not recognize that the mesh is axisymmetric and asks that only the z-axis as out-of-plane direction.

preCICE version: 2.2.0
openfoam-adapter: 1.0.0
OpenFOAM version: v4.x

Solver for Fluid: sonicFoam
Solver for Solid: laplacianFoam

Problem:
If I want to execute the fluid or solid solver, the executions runs in a problem regarding the mesh orientation.

Starting time loop

---[preciceAdapter] Loaded the OpenFOAM-preCICE adapter v1.0.0.
---[preciceAdapter] Reading preciceDict...
---[precice] e[0m This is preCICE version 2.2.0
---[precice] e[0m Revision info: v2.2.0
---[precice] e[0m Configuration: Release (Debug and Trace log unavailable)
---[precice] e[0m Configuring preCICE with configuration "../precice-config.xml"
---[precice] e[0m I am participant "Fluid"
---[precice] e[0m Connecting Master to 3 Slaves
[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] It seems like you are using preCICE in 2D and your geometry is not located int the xy-plane. The OpenFOAM adapter implementation supports preCICE 2D cases only with the z-axis as out-of-plane direction.Please rotate your geometry so that the geometry is located in the xy-plane.
[1] 
[1]     From function void preciceAdapter::Interface::configureMesh(const Foam::fvMesh&)
[1]     in file Interface.C at line 136.
[1] 
FOAM parallel run exiting

Question
ls it possible to run axisymmetric meshes (only 1 element size in the out of plane direction)?. How should the precice case should be set up to take this issue into account?

Hi @fkyburg,

your case seems interesting. In general, the way we currently read and write data in the adapter works under the assumption of the z-axis being the out-of-plane axis. If your case is really a 2D case you should be able to adjust your geometry accordingly, but maybe I’m not aware of some corner cases.

May I ask you to provide a figure of your geometry (maybe with coordinate system) and your coupling interface?

Another comment: when hitting this assertion you have usually also the option to use preCICE in 3D. Depending on your interface, you might need to mark ‘dead’ axis, i.e., directions with only a single layer of vertices, accordingly in your mapping configuration.

Hi,

did you make any progress with this issue? I just encountered the same problem.

My Mesh looks like this (OpenFOAM domain shown with edges, solid domain (FEniCSx) without):


(Front view)

(Bottom view)

From the OpenFOAM point of view it is similar to a cartesian 2D case, it just uses a wedge instead of a cuboid.

See the following issue in the adapter repository: Enable 2d axisymmetric cases · Issue #228 · precice/openfoam-adapter · GitHub

1 Like