I recently started using the OpenFOAM adapter for preCICE coupling and encountered an issue. Since linear-interpolation between two grids requires a defined mesh-connectivity I need to set the connectivity = true;
flag in the preciceDict
file for my Interface.
The documentation states that this parameter can only be true for locations faceNodes
. Is there another option to interpolate data when using the OpenFOAM adapter with 3D volumes except RBF-kernels?
I did not try the cuda parallelized version of RBFs but running this on the GPU requires more patience than i can provide
This is my current precice-config.xml if anyone is interested. When analyzing the precice.log file i see that mapping defaults to nearest-neighbor for the written Forces.
<?xml version="1.0" encoding="UTF-8"?>
<precice-configuration>
<log>
<sink type="file" output="precice.log" filter="%Severity% > debug and %Rank% = 0"
format="(%Rank%) [%Module%]:%Line% in %Function%: %Severity% %Message%" enabled="true" />
</log>
<data:vector name="Velocity" />
<data:vector name="Forces" />
<mesh name="DEMGrid" dimensions="3">
<use-data name="Velocity" />
<use-data name="Forces" />
</mesh>
<mesh name="FluidMesh" dimensions="3">
<use-data name="Velocity" />
<use-data name="Forces" />
</mesh>
<participant name="XPSSolver">
<provide-mesh name="DEMGrid" />
<receive-mesh name="FluidMesh" from="FluidSolver" />
<!-- Read velocity: nearest-neighbor -->
<mapping:nearest-neighbor
direction="read"
from="FluidMesh"
to="DEMGrid"
constraint="consistent" />
<!-- Write momentum source: linear-cell-interpolation -->
<mapping:linear-cell-interpolation
direction="write"
from="DEMGrid"
to="FluidMesh"
constraint="conservative" />
<read-data name="Velocity" mesh="DEMGrid" />
<write-data name="Forces" mesh="DEMGrid" />
</participant>
<participant name="FluidSolver">
<provide-mesh name="FluidMesh" />
<receive-mesh name="DEMGrid" from="XPSSolver" />
<read-data name="Forces" mesh="FluidMesh" />
<write-data name="Velocity" mesh="FluidMesh" />
</participant>
<m2n:sockets acceptor="FluidSolver" connector="XPSSolver" exchange-directory="../" />
<coupling-scheme:parallel-explicit>
<participants first="XPSSolver" second="FluidSolver" />
<max-time value="1.0" />
<time-window-size value="1e-3" />
<exchange data="Velocity" mesh="FluidMesh" from="FluidSolver" to="XPSSolver" />
<exchange data="Forces" mesh="FluidMesh" from="XPSSolver" to="FluidSolver" />
</coupling-scheme:parallel-explicit>
</precice-configuration>
I am using preCICE 3.20 on Fedora 41 and the current master of the OpenFOAM-adapter.