So, this means that something is wrong while reading a checkpoint. I assume that in the explicit coupling the dimensions of Sf
and magSf
don’t change, right?
Indeed, no error is shown and the dimensions remain unchanged along the log file.
Implicit coupling is especially important in strongly-coupled problems (i.e. light structures) and you probably will not be able to go too far with explicit coupling, so we should find out what is going wrong.
I agree, but I would like to have a working case to start from.
You can export the preCICE meshes to VTK to find out if the problem is in the writing or in the reading.
I exported precice VTKs and imported the VTK groups in paraview but for now, it keeps loading and does not show anything. No matter if I want to use Glyphs or the Delaunay filter, the data does not even seem to load (the loading bar on the bottom right is showed empty - I tried with Paraview 5.4.1 linux version and windows version).
Actually, could you please repeat what you are writing and what you are reading on each side? You can also use the config visualizer to create a graph of your setup, that would be useful. Are you still exchanging forces and velocities, or have you moved to something else? (the discussion has been quite long, please excuse my confusion)
Sure no problem ! Here is the config visualizer:
digraph G {
compound=True;
layout=dot;
overlap=scale;
rankdir=LR;
splines=true;
subgraph cluster_m2n {
label=Communicators;
"m2n-Solid-Fluid" [label=sockets, shape=component];
}
subgraph cluster_cpl {
label="Coupling Schemes";
"cpl-Fluid-Solid" [label="serial-explicit", shape=component];
}
subgraph cluster_Fluid {
label=Fluid;
style=bold;
Fluid [color=black, shape=doubleoctagon];
"Fluid-Fluid-Mesh-Centers" [color=black, label="Fluid-Mesh-Centers", shape=cylinder];
"Fluid-Fluid-Mesh-Nodes" [color=black, label="Fluid-Mesh-Nodes", shape=cylinder];
"Fluid-Solid-Mesh-Nodes" [color=black, label="Solid-Mesh-Nodes\nfrom Solid", shape=cylinder, style=dashed];
"Fluid-Solid-Mesh-Faces" [color=black, label="Solid-Mesh-Faces\nfrom Solid", shape=cylinder, style=dashed];
"Fluid-Fluid-Mesh-Nodes" -> Fluid [color=black, label=Displacement, tooltip=vector];
Fluid -> "Fluid-Fluid-Mesh-Centers" [color=black, label=Force, tooltip=vector];
"Fluid-Fluid-Mesh-Centers" -> "Fluid-Solid-Mesh-Faces" [label="rbf-thin-plate-splines"];
"Fluid-Solid-Mesh-Nodes" -> "Fluid-Fluid-Mesh-Nodes" [label="rbf-thin-plate-splines"];
}
subgraph cluster_Solid {
label=Solid;
style=bold;
Solid [color=black, shape=doubleoctagon];
"Solid-Solid-Mesh-Nodes" [color=black, label="Solid-Mesh-Nodes", shape=cylinder];
"Solid-Solid-Mesh-Faces" [color=black, label="Solid-Mesh-Faces", shape=cylinder];
"Solid-Solid-Mesh-Faces" -> Solid [color=black, label=Force, tooltip=vector];
Solid -> "Solid-Solid-Mesh-Nodes" [color=black, label=Displacement, tooltip=vector];
}
"m2n-Solid-Fluid" -> Solid [color=black, dir=both, lhead=cluster_Solid];
"m2n-Solid-Fluid" -> Fluid [color=black, dir=both, lhead=cluster_Fluid];
"cpl-Fluid-Solid" -> Fluid [color=black, lhead=cluster_Fluid, taillabel=first];
"cpl-Fluid-Solid" -> Solid [color=black, lhead=cluster_Solid, taillabel=second];
"Fluid-Solid-Mesh-Faces" -> "Solid-Solid-Mesh-Faces" [color=black, label=Force, tooltip=vector];
"Solid-Solid-Mesh-Nodes" -> "Fluid-Solid-Mesh-Nodes" [color=black, label=Displacement, tooltip=vector];
}
and here is the config file :
<?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="Force"/>
<data:vector name="Displacement"/>
<mesh name="Fluid-Mesh-Centers">
<use-data name="Force"/>
</mesh>
<mesh name="Fluid-Mesh-Nodes">
<use-data name="Displacement"/>
</mesh>
<mesh name="Solid-Mesh-Nodes">
<use-data name="Displacement"/>
</mesh>
<mesh name="Solid-Mesh-Faces">
<use-data name="Force"/>
</mesh>
<participant name="Fluid">
<use-mesh name="Fluid-Mesh-Centers" provide="yes"/>
<use-mesh name="Fluid-Mesh-Nodes" provide="yes"/>
<use-mesh name="Solid-Mesh-Nodes" from="Solid"/>
<use-mesh name="Solid-Mesh-Faces" from="Solid"/>
<read-data name="Displacement" mesh="Fluid-Mesh-Nodes"/>
<write-data name="Force" mesh="Fluid-Mesh-Centers"/>
<export:vtk directory="preCICE-output-Fluid"/>
<mapping:rbf-thin-plate-splines direction="write" from="Fluid-Mesh-Centers" to="Solid-Mesh-Faces" constraint="conservative" z-dead="true"/>
<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"/>
<use-mesh name="Solid-Mesh-Faces" provide="yes"/>
<read-data name="Force" mesh="Solid-Mesh-Faces"/>
<write-data name="Displacement" mesh="Solid-Mesh-Nodes"/>
<!--watch-point mesh="Solid-Mesh-Nodes" name="flap_tip" coordinate="0.6;0.2;0." /-->
</participant>
<m2n:sockets from="Fluid" to="Solid"/>
<coupling-scheme:serial-explicit>
<participants first="Fluid" second="Solid"/>
<max-time value="10"/>
<time-window-size value="0.005"/>
<exchange data="Force" mesh="Solid-Mesh-Faces" from="Fluid" to="Solid"/>
<exchange data="Displacement" mesh="Solid-Mesh-Nodes" from="Solid" to="Fluid" initialize="0"/>
</coupling-scheme:serial-explicit>
<!--coupling-scheme:serial-implicit>
<time-window-size value="0.005"/>
<max-time value="10"/>
<participants first="Fluid" second="Solid"/>
<exchange data="Force" mesh="Solid-Mesh-Faces" from="Fluid" to="Solid"/>
<exchange data="Displacement" mesh="Solid-Mesh-Nodes" from="Solid" to="Fluid" initialize="0"/>
<max-iterations value="100"/>
<absolute-convergence-measure limit="1e-6" data="Displacement" mesh="Solid-Mesh-Nodes"/>
<relative-convergence-measure limit="1e-4" data="Force" mesh="Solid-Mesh-Faces"/>
<extrapolation-order value="2"/>
<acceleration:IQN-ILS>
<data name="Displacement" 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>
The fluid solver is pimpleFoam and its configuration is not changed from the cylinderFlap
. The solid solver is an in-house solver (code is available here) that solves in a Total Lagrangian fashion. Therefore, I have access to the pointVectorField uN
that s responsible for moving the nodes and that plays the role of pointDisplacement
in preCICE.