Hi @Makis,
Some news coming from this FSI experiment !
I have been working on the Solid code for quite a bit of time, it’s better, and now I am coming back once again to the FSI interactions. I’ve not reached what I want but I think I’m getting there.
To start off, let me do a quick recap of my framework:
- A vertex-centred FVM solid mechanics code based on OpenFoam-6,
- Any simple CFD solver from OpenFoam-6 (pimpleFoam will do),
- The openfoam-adapter, more especially the branch of @JSeuffert
- I want to reproduce the perpendicular flap problem.
I would like to achieve first a one-way coupling; namely and in simple words, I would like to solve a prescribed motion on the Solid side, and pass the displacements to my Fluid solver, so its velocity field is updated accordingly.
At the moment, I am able to make preCICE run both simulations in conjunction. Following is the content of the files of interest:
precice.config.xml
<?xml version="1.0"?>
<precice-configuration>
<log>
<sink filter="%Severity% > debug and %Rank% = 0" format="---[precice] %ColorizedSeverity% %Message%" enabled="true"/>
</log>
<solver-interface dimensions="3">
<data:vector name="Forces"/>
<data:vector name="Displacements"/>
<mesh name="Fluid-Mesh-Faces"> <use-data name="Forces"/> </mesh>
<mesh name="Fluid-Mesh-Nodes"> <use-data name="Displacements"/> </mesh>
<mesh name="Solid-Mesh-Nodes"> <use-data name="Forces"/> <use-data name="Displacements"/> </mesh>
<participant name="Fluid">
<use-mesh name="Fluid-Mesh-Faces" provide="yes"/>
<use-mesh name="Fluid-Mesh-Nodes" provide="yes"/>
<use-mesh name="Solid-Mesh-Nodes" from="Solid"/>
<write-data name="Forces" mesh="Fluid-Mesh-Faces"/>
<read-data name="Displacements" mesh="Fluid-Mesh-Nodes"/>
<mapping:rbf-thin-plate-splines direction="write" from="Fluid-Mesh-Faces" to="Solid-Mesh-Nodes" constraint="conservative"/>
<mapping:rbf-thin-plate-splines direction="read" from="Solid-Mesh-Nodes" to="Fluid-Mesh-Nodes" constraint="consistent"/>
</participant>
<participant name="Solid">
<use-mesh name="Solid-Mesh-Nodes" provide="yes"/>
<read-data name="Forces" mesh="Solid-Mesh-Nodes"/>
<write-data name="Displacements" mesh="Solid-Mesh-Nodes"/>
<!--watch-point mesh="Solid" name="point1" coordinate="0.6;0.2;0." /-->
</participant>
<m2n:sockets from="Fluid" to="Solid"/>
<coupling-scheme:serial-implicit>
<time-window-size value="0.01" />
<max-time value="0.25"/>
<participants first="Fluid" second="Solid"/>
<exchange data="Forces" mesh="Solid-Mesh-Nodes" from="Fluid" to="Solid"/>
<exchange data="Displacements" mesh="Solid-Mesh-Nodes" from="Solid" to="Fluid" initialize="0" />
<max-iterations value="50"/>
<relative-convergence-measure limit="1e-4" data="Displacements" mesh="Solid-Mesh-Nodes"/>
<relative-convergence-measure limit="1e-4" data="Forces" mesh="Solid-Mesh-Nodes"/>
<extrapolation-order value="2"/>
<acceleration:IQN-ILS>
<data name="Displacements" mesh="Solid-Mesh-Nodes"/>
<preconditioner type="residual-sum"/>
<filter type="QR1" limit="1e-6"/>
<initial-relaxation value="0.1"/>
<max-used-iterations value="50"/>
<time-windows-reused value="10"/>
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</solver-interface>
</precice-configuration>
Fluid/system/preciceDict
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object preciceDict;
}
preciceConfig "precice-config.xml";
participant Fluid;
modules (FSI);
interfaces
{
Interface1
{
mesh Fluid-Mesh-Faces;
patches (interface);
locations faceCenters;
readData ( );
writeData ( Forces );
};
Interface2
{
mesh Fluid-Mesh-Nodes;
patches (interface);
locations faceNodes;
readData ( Displacements );
writeData ( );
};
};
FSI
{
rho rho [1 -3 0 0 0 0 0] 1100;
}
Solid/system/preciceDict
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object preciceDict;
}
preciceConfig "precice-config.xml";
participant Solid;
modules (FSI);
interfaces
{
Interface1
{
mesh Solid-Mesh-Nodes;
patches (interface);
locations faceNodes;
readData ( Forces );
writeData ( Displacements ); //Displacements //u
};
};
FSI
{
solverType incompressible;
namePointDisplacement u;
rho rho [1 -3 0 0 0 0 0] 1100;
}
Note: actually at the moment ./Allrun starts both solvers but they stay stuck at
—[preciceAdapter] [DEBUG] Initalizing the preCICE solver interface…
—[precice] Setting up master communication to coupling partner/s
The problem might come from a misreading of the data by the solver and/or preCICE, but I’m not comfortable at all with the setup of the coupling ( the 3 files above ).
I don’t want to clutter my post much more so do not hesitate to ask me for logs, setup files and whatsoever.