# How to configure one-way coupling

**URL:** <https://precice.discourse.group/t/how-to-configure-one-way-coupling/232>\
**Category:** Using preCICE\
**Tags:** configuration\
**Created:** [March 17, 2020, 6:30am UTC](https://precice.discourse.group/t/how-to-configure-one-way-coupling/232 "2020-03-17T06:30:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [March 17, 2020, 8:21am UTC](https://precice.discourse.group/t/how-to-configure-one-way-coupling/232/2 "2020-03-17T08:21:56Z")

</div>

Hi @Titan,

let’s get the [FSI/flap\_perp/OpenFOAM-CalculiX example](https://github.com/precice/tutorials/tree/master/FSI/flap_perp/OpenFOAM-CalculiX) and assume that you want to disable exchanging displacements from CalcluliX to OpenFOAM.

In any case, you can use the [config-visualizer](https://github.com/precice/config-visualizer) to visually validate your `precice-config.xml`. Here is the original configuration:

 ![config_bi](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/563fe17fd26c1f789944dffe8b0565b8d3884c1b.png)

1. In principle, we just need to remove the exchange of Displacements, therefore we remove the following node:

```xml
<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:  
 ![config_single](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/f127aa1f0866846969b3b8316e3618633fe4fc99.png)

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:

```xml
<mapping:rbf-thin-plate-splines direction="read" from="Solid" to="Fluid-Mesh-Nodes" constraint="consistent"/>

```

 ![config_single](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/f127aa1f0866846969b3b8316e3618633fe4fc99.png)
2. Then, we need to “undefine” the `Displacements0` data and the respective read/write operations:
  - Remove the `Displacements0` data:

```xml
<data:vector name="Displacements0"/>

```

  - Remove the `Fluid-Mesh-Nodes` mesh (only uses `Displacement0`):

```xml
<mesh name="Fluid-Mesh-Nodes">
    <use-data name="Displacements0"/>
</mesh>

```

  - Remove `Displacements0` from the `Solid` mesh:

```xml
<use-data name="Displacements0"/>

```

  - Remove the use of the `Fluid-Mesh-Nodes` from `Fluid` and `Solid`:

```xml
<use-mesh name="Fluid-Mesh-Nodes" provide="yes"/>

```

  - Remove the read/write operations from the `Fluid` and `Calculix` participants:

```xml
<read-data name="Displacements0" mesh="Fluid-Mesh-Nodes"/>
...
<write-data name="Displacements0" mesh="Solid"/>

```

Our config now looks much simpler:  
 ![config_single](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/5877d86fe0be40b35a7a3a039af01b839f0e27e8.png)
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](https://github.com/precice/calculix-adapter/issues/35) 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:

```xml
<absolute-convergence-measure limit="1e-6" data="Displacements0" mesh="Solid"/>

```

```xml
<acceleration:IQN-ILS>
    <data name="Forces0" mesh="Solid"/>

```

Here are the respective files:

- [precice-config.xml](https://precice.discourse.group/uploads/short-url/fn3FZnTRqsKzb1rlulVjY0nKgFC.xml) (2.2 KB)
- [preciceDict.txt](https://precice.discourse.group/uploads/short-url/Aikvx83a3uFiiGvGT090jKkFNxz.txt) (472 Bytes)
- [config.yml](https://precice.discourse.group/uploads/short-url/ps3caP15hmPvmkXBNz2TYUuYUKn.yml) (176 Bytes)

---

_[View the full topic](https://precice.discourse.group/t/how-to-configure-one-way-coupling/232)._
