How to configure one-way coupling

Hi @Titan,

let’s get the FSI/flap_perp/OpenFOAM-CalculiX example and assume that you want to disable exchanging displacements from CalcluliX to OpenFOAM.

In any case, you can use the config-visualizer to visually validate your precice-config.xml. Here is the original configuration:

  1. In principle, we just need to remove the exchange of Displacements, therefore we remove the following node:
    <exchange data="Displacements0" mesh="Solid" from="Calculix" to="Fluid"/>
    
    We can then start the two participants as usual. This is not yet ideal, but it runs:

Furthermore, if we would like to cleanup all the involved files:

  1. We should disable the mapping of Displacements0. Currently the Fluid participant (OpenFOAM) maps the Solid mesh to Fluid-Mesh-Nodes, which is not needed anywhere else. So we remove the mapping:
    <mapping:rbf-thin-plate-splines direction="read" from="Solid" to="Fluid-Mesh-Nodes" constraint="consistent"/>
    
  2. Then, we need to “undefine” the Displacements0 data and the respective read/write operations:
    • Remove the Displacements0 data:
      <data:vector name="Displacements0"/>
      
    • Remove the Fluid-Mesh-Nodes mesh (only uses Displacement0):
      <mesh name="Fluid-Mesh-Nodes">
          <use-data name="Displacements0"/>
      </mesh>
      
    • Remove Displacements0 from the Solid mesh:
      <use-data name="Displacements0"/>
      
    • Remove the use of the Fluid-Mesh-Nodes from Fluid and Solid:
      <use-mesh name="Fluid-Mesh-Nodes" provide="yes"/>
      
    • Remove the read/write operations from the Fluid and Calculix participants:
      <read-data name="Displacements0" mesh="Fluid-Mesh-Nodes"/>
      ...
      <write-data name="Displacements0" mesh="Solid"/>
      
    Our config now looks much simpler:
  3. Apart from the precice-config.xml, you also need to remove the read/write data and the mesh definitions from your solvers/adapters.
    • In Fluid/system/preciceDict, remove the complete Interface2:
      Interface2
      {
        mesh              Fluid-Mesh-Nodes;
        patches           (flap);
        locations         faceNodes;
        
        readData
        (
          Displacements0
        );
        
        writeData
        (
        );
      };
      
    • In config.yml (CalculiX), we need to remove write-data. However, there seems to be a bug in the configuration reading right now. If you cannot wait until we solve it, you could hard-code this in the adapter source code (see issue).
  4. In case you are using implicit coupling (which does not make much sense in a one-way coupling scenario), you also need to remove any convergence measures and replace the data used for the acceleration:
    <absolute-convergence-measure limit="1e-6" data="Displacements0" mesh="Solid"/>
    
    <acceleration:IQN-ILS>
        <data name="Forces0" mesh="Solid"/>
    

Here are the respective files:

1 Like