# Config-Visualizer for a unidirectional coupling

**URL:** <https://precice.discourse.group/t/config-visualizer-for-a-unidirectional-coupling/1742>\
**Category:** Using preCICE\
**Created:** [January 14, 2024, 1:43pm UTC](https://precice.discourse.group/t/config-visualizer-for-a-unidirectional-coupling/1742 "2024-01-14T13:43:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FelixR](https://avatars.discourse-cdn.com/v4/letter/f/b19c9b/32.png) [@FelixR](https://precice.discourse.group/u/FelixR)\
**Post date:** [January 14, 2024, 1:43pm UTC](https://precice.discourse.group/t/config-visualizer-for-a-unidirectional-coupling/1742/1 "2024-01-14T13:43:53Z")

</div>

Hi,

I have installed the config-visualizer and it works fine for the config files provided in the preCICE examples. However, when I want to display a modified config file of a unidirectional coupling (FSI), I get an error.

Specifically, I have modified a config file according to these instructions: [How to configure one-way coupling - #2 by Makis](https://precice.discourse.group/t/how-to-configure-one-way-coupling/232/2)  
My config file now looks like this

> \<?xml version="1.0" encoding="UTF-8" ?\> 
> 
> ```
> <mesh name="Fluid-Mesh-Faces">
> <use-data name="Force" />
> </mesh>
> 
> <mesh name="Solid-Mesh">
> <use-data name="Force" />
> </mesh>
> 
> <participant name="Fluid">
> <use-mesh name="Solid-Mesh" from="Solid" />
> <use-mesh name="Fluid-Mesh-Faces" provide="yes" />
> <write-data name="Force" mesh="Fluid-Mesh-Faces" />
> <mapping:rbf-thin-plate-splines
> direction="write"
> from="Fluid-Mesh-Faces"
> to="Solid-Mesh"
> constraint="conservative" />
> </participant>
> 
> <participant name="Solid">
> <use-mesh name="Solid-Mesh" provide="yes" />
> <use-mesh name="Fluid-Mesh-Faces" from="Fluid" />
> <read-data name="Force" mesh="Solid-Mesh" />
> <watch-point mesh="Solid-Mesh" name="flap-midpoint" coordinate="118.917;6.79;9.067" />
> <watch-integral mesh="Solid-Mesh" name="flap-integral" scale-with-connectivity="no"/>
> </participant>
> 
> <m2n:sockets from="Fluid" to="Solid" exchange-directory=".." />
> 
> <coupling-scheme:serial-explicit>
> <time-window-size value="0.001" />
> <max-time value="10" />
> <participants first="Fluid" second="Solid" />
> <exchange data="Force" mesh="Solid-Mesh" from="Fluid" to="Solid" />
> </coupling-scheme:serial-explicit>
> 
> ```

After using the command

> precice-config-visualizer-gui precice-config.xml

I get this terminal output

> UnboundLocalError: local variable ‘read’ referenced before assignment

Any idea how to fix this?

-Felix

---

<div class="post-metadata">

**Author:** ![ajaust](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ajaust/32/160_2.png) [@ajaust](https://precice.discourse.group/u/ajaust)\
**Post date:** [January 16, 2024, 6:55pm UTC](https://precice.discourse.group/t/config-visualizer-for-a-unidirectional-coupling/1742/2 "2024-01-16T18:55:26Z")

</div>

I think you have to define the data field additionally with something like

```xml
<data:scalar name="{string}"/>

```

or

```xml
<data:vector name="{string}"/>

```

see [XML reference](https://precice.org/configuration-xml-reference.html#datascalar). You can also have a look at the [example (at the bottom)](https://precice.org/couple-your-code-mesh-and-data-access.html) from the tutorial.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [January 30, 2024, 7:46am UTC](https://precice.discourse.group/t/config-visualizer-for-a-unidirectional-coupling/1742/3 "2024-01-30T07:46:30Z")

</div>

Closed on January 30, 2024, 7:46am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
