From 94127f682e5fb51b162a676cc3d1c7f625fba51c Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 00:44:23 +0200
Subject: [PATCH 01/23] Add common runscript for OpenFOAM

---
 elastic-tube-3d/fluid-openfoam/run.sh         | 41 ++---------------
 .../fluid-openfoam/system/controlDict         |  2 +-
 .../fluid-openfoam/run.sh                     | 40 ++---------------
 .../solid-openfoam/run.sh                     | 40 ++---------------
 .../fluid-openfoam/run.sh                     | 41 ++---------------
 flow-over-heated-plate/fluid-openfoam/run.sh  | 34 ++------------
 flow-over-heated-plate/solid-openfoam/run.sh  | 34 ++------------
 heat-exchanger/README.md                      |  4 +-
 .../{Download_meshes => download-meshes.sh}   |  3 +-
 .../fluid-inner-openfoam/constant/.gitignore  |  1 +
 heat-exchanger/fluid-inner-openfoam/run.sh    |  7 +++
 .../fluid-inner-openfoam/system/controlDict   |  4 +-
 .../fluid-outer-openfoam/constant/.gitignore  |  1 +
 heat-exchanger/fluid-outer-openfoam/run.sh    |  7 +++
 .../fluid-outer-openfoam/system/controlDict   |  4 +-
 heat-exchanger/precice-config.xml             |  2 +-
 heat-exchanger/solid-calculix/.gitignore      | 11 +++++
 .../fluid-openfoam/run.sh                     | 45 +++----------------
 perpendicular-flap/fluid-openfoam/run.sh      | 42 +++--------------
 tools/run-dealii.sh                           |  2 +-
 tools/run-openfoam.sh                         | 17 +++++++
 turek-hron-fsi3/fluid-openfoam/run.sh         | 41 ++---------------
 22 files changed, 93 insertions(+), 330 deletions(-)
 rename heat-exchanger/{Download_meshes => download-meshes.sh} (83%)
 create mode 100644 heat-exchanger/fluid-inner-openfoam/constant/.gitignore
 create mode 100755 heat-exchanger/fluid-inner-openfoam/run.sh
 create mode 100644 heat-exchanger/fluid-outer-openfoam/constant/.gitignore
 create mode 100755 heat-exchanger/fluid-outer-openfoam/run.sh
 create mode 100644 heat-exchanger/solid-calculix/.gitignore
 create mode 100755 tools/run-openfoam.sh

diff --git a/elastic-tube-3d/fluid-openfoam/run.sh b/elastic-tube-3d/fluid-openfoam/run.sh
index 29bf6721d..3751d0eb6 100755
--- a/elastic-tube-3d/fluid-openfoam/run.sh
+++ b/elastic-tube-3d/fluid-openfoam/run.sh
@@ -1,41 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal and the execute the coupled_elasto_dynamics bindary 
-# in another terminal.
-# These scripts present how the two participants would be started manually.
-
-# Run this script with "-parallel" for parallel simulations
-
-# The script "Allclean" cleans-up the result and log files.
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
 cp -r constant/polyMesh.orig constant/polyMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) 
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/elastic-tube-3d/fluid-openfoam/system/controlDict b/elastic-tube-3d/fluid-openfoam/system/controlDict
index 62b6b599a..4247dc635 100755
--- a/elastic-tube-3d/fluid-openfoam/system/controlDict
+++ b/elastic-tube-3d/fluid-openfoam/system/controlDict
@@ -40,7 +40,7 @@ timeFormat general;
 
 timePrecision 8;
 
-runTimeModifiable yes;
+runTimeModifiable false;
 
 adjustTimeStep no;
 
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
index aa6eff74b..f0f1f6654 100755
--- a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
@@ -1,40 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal in order to start this participant.
-# Run this script with "-parallel" for parallel simulations
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
-
-echo ""
-echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed."
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
index 4371afb94..e2519b9a5 100755
--- a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
@@ -1,40 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal in order to start this participant.
-# Run this script with "-parallel" for parallel simulations
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch solid-openfoam.foam
 
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
-
-echo ""
-echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed."
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
index e3c29e9e6..f0f1f6654 100755
--- a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
@@ -1,41 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal and the execute the coupled_elasto_dynamics bindary 
-# in another terminal.
-# These scripts present how the two participants would be started manually.
-
-# Run this script with "-parallel" for parallel simulations
-
-# The script "Allclean" cleans-up the result and log files.
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) 
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/flow-over-heated-plate/fluid-openfoam/run.sh b/flow-over-heated-plate/fluid-openfoam/run.sh
index 0da6a7c58..f0f1f6654 100755
--- a/flow-over-heated-plate/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate/fluid-openfoam/run.sh
@@ -1,34 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
-# Fluid participant
-# Run this script in one terminal and the "runSolid" script in another terminal.
-# These scripts present how the two participants would be started manually.
-# Alternatively, you may execute the "Allrun" script in one terminal.
-# Run this script with "-parallel" for parallel simulations
-# The script "Allclean" cleans-up the result and log files.
-# 1 for true, 0 for false
+#!/bin/sh
+set -e -u
 
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/flow-over-heated-plate/solid-openfoam/run.sh b/flow-over-heated-plate/solid-openfoam/run.sh
index fd2188105..e2519b9a5 100755
--- a/flow-over-heated-plate/solid-openfoam/run.sh
+++ b/flow-over-heated-plate/solid-openfoam/run.sh
@@ -1,34 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
-# Fluid participant
-# Run this script in one terminal and the "runSolid" script in another terminal.
-# These scripts present how the two participants would be started manually.
-# Alternatively, you may execute the "Allrun" script in one terminal.
-# Run this script with "-parallel" for parallel simulations
-# The script "Allclean" cleans-up the result and log files.
-# 1 for true, 0 for false
+#!/bin/sh
+set -e -u
 
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch solid-openfoam.foam
 
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/heat-exchanger/README.md b/heat-exchanger/README.md
index 59fdef9f4..3ceaeee3b 100644
--- a/heat-exchanger/README.md
+++ b/heat-exchanger/README.md
@@ -9,7 +9,7 @@ summary: Tutorial for a shell-and-tube heat exchanger, using OpenFOAM and Calcul
 
 This tutorial describes how to run a conjugate heat transfer simulation with two separate OpenFOAM solvers and CalculiX. The files for this tutorial are located in this repository (directory CHT/heat_exchanger).
 
-This tutorial is based on [a case](https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/) prepared with [SimScale](https://www.simscale.com/) by [Lucia Cheung Yau](https://github.com/ludcila) for her [Master's Thesis](https://www5.in.tum.de/pub/Cheung2016_Thesis.pdf). It works with OpenFOAM 5.0 and CalculiX 2.12, but newer minor versions should work as well.
+This tutorial is based on [a case](https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/) prepared with [SimScale](https://www.simscale.com/) by [Lucia Cheung Yau](https://github.com/ludcila) for her [Master's Thesis](https://www5.in.tum.de/pub/Cheung2016_Thesis.pdf).
 
 {% include note.html content="Since the already prepared case contains mesh files of approx. 50MB in size, we host these files outside of the repository and you can download and extract them automatically in the appropriate locations by running the Download_meshes script. We plan to integrate the preparation part in this tutorial in the future." %}
 
@@ -32,7 +32,7 @@ We define the participants `Inner-Fluid`, `Solid`, and `Outer-Fluid` and two int
 
 ## Running the Simulation
 
-Before starting the simulation for the first time you need to download the mesh files and copy them into the appropriate location. The shell script `./Download_meshes` will handle these things automatically. Afterwards, the simulation setup is ready to run.
+Before starting the simulation for the first time you need to download the mesh files and copy them into the appropriate location. The shell script `./download-meshes.sh` will handle these things automatically. Afterwards, the simulation setup is ready to run.
 
 In order to run the coupled simulation, you can simply step into the participant directories and execute`./run.sh` for run (or `./run.sh -parallel`) for a parallel run. The simulation will need approximately one hour on a modern laptop to end (t=500). Before repeating the simulation, you can use the `clean.sh` script to clean-up any previous results and log files.
 
diff --git a/heat-exchanger/Download_meshes b/heat-exchanger/download-meshes.sh
similarity index 83%
rename from heat-exchanger/Download_meshes
rename to heat-exchanger/download-meshes.sh
index 2afc31177..00b205be0 100755
--- a/heat-exchanger/Download_meshes
+++ b/heat-exchanger/download-meshes.sh
@@ -1,5 +1,4 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # Run from this directory
 
 echo "This tutorial is based on a case prepared with SimScale."
 echo "Since the mesh files are several MB large, we don't store them in the Git repository."
@@ -14,8 +13,10 @@ sed -i 's/Solid/\./g' solid-calculix/solid.inp
 
 echo "Downloading and extracting the Inner-Fluid mesh..."
 wget -nv -O - https://syncandshare.lrz.de/dl/fiNsYGC1DKzgio4jS5NhsXg7/polyMesh.org.tar.gz | tar -xzv -C fluid-inner-openfoam/constant
+mv fluid-inner-openfoam/constant/polyMesh.org fluid-inner-openfoam/constant/polyMesh
 
 echo "Downloading and extracting the Outer-Fluid mesh..."
 wget -nv -O - https://syncandshare.lrz.de/dl/fiEZRQ8rcVWRkoyZvANim1R1/polyMesh.org.tar.gz | tar -xzv -C fluid-outer-openfoam/constant
+mv fluid-outer-openfoam/constant/polyMesh.org fluid-outer-openfoam/constant/polyMesh
 
 echo "Completed."
diff --git a/heat-exchanger/fluid-inner-openfoam/constant/.gitignore b/heat-exchanger/fluid-inner-openfoam/constant/.gitignore
new file mode 100644
index 000000000..d57264fd1
--- /dev/null
+++ b/heat-exchanger/fluid-inner-openfoam/constant/.gitignore
@@ -0,0 +1 @@
+polyMesh/
\ No newline at end of file
diff --git a/heat-exchanger/fluid-inner-openfoam/run.sh b/heat-exchanger/fluid-inner-openfoam/run.sh
new file mode 100755
index 000000000..04844705c
--- /dev/null
+++ b/heat-exchanger/fluid-inner-openfoam/run.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e -u
+
+rm -rfv 0/ && cp -r 0.orig/ 0/
+touch fluid-inner-openfoam.foam
+
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/heat-exchanger/fluid-inner-openfoam/system/controlDict b/heat-exchanger/fluid-inner-openfoam/system/controlDict
index 9545a03ce..fde22f262 100644
--- a/heat-exchanger/fluid-inner-openfoam/system/controlDict
+++ b/heat-exchanger/fluid-inner-openfoam/system/controlDict
@@ -4,7 +4,7 @@ FoamFile {
     object controlDict;
     format ascii;
 }
-application chtMultiRegionSimpleFoam;
+application buoyantSimpleFoam;
 startFrom startTime;
 stopAt endTime;
 writeFormat ascii;
@@ -12,7 +12,7 @@ writePrecision 12;
 writeCompression on;
 timeFormat general;
 timePrecision 12;
-runTimeModifiable yes;
+runTimeModifiable false;
 deltaT 1;
 startTime 0.0;
 writeInterval 50;
diff --git a/heat-exchanger/fluid-outer-openfoam/constant/.gitignore b/heat-exchanger/fluid-outer-openfoam/constant/.gitignore
new file mode 100644
index 000000000..d57264fd1
--- /dev/null
+++ b/heat-exchanger/fluid-outer-openfoam/constant/.gitignore
@@ -0,0 +1 @@
+polyMesh/
\ No newline at end of file
diff --git a/heat-exchanger/fluid-outer-openfoam/run.sh b/heat-exchanger/fluid-outer-openfoam/run.sh
new file mode 100755
index 000000000..614290703
--- /dev/null
+++ b/heat-exchanger/fluid-outer-openfoam/run.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e -u
+
+rm -rfv 0/ && cp -r 0.orig/ 0/
+touch fluid-outer-openfoam.foam
+
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/heat-exchanger/fluid-outer-openfoam/system/controlDict b/heat-exchanger/fluid-outer-openfoam/system/controlDict
index 9545a03ce..fde22f262 100644
--- a/heat-exchanger/fluid-outer-openfoam/system/controlDict
+++ b/heat-exchanger/fluid-outer-openfoam/system/controlDict
@@ -4,7 +4,7 @@ FoamFile {
     object controlDict;
     format ascii;
 }
-application chtMultiRegionSimpleFoam;
+application buoyantSimpleFoam;
 startFrom startTime;
 stopAt endTime;
 writeFormat ascii;
@@ -12,7 +12,7 @@ writePrecision 12;
 writeCompression on;
 timeFormat general;
 timePrecision 12;
-runTimeModifiable yes;
+runTimeModifiable false;
 deltaT 1;
 startTime 0.0;
 writeInterval 50;
diff --git a/heat-exchanger/precice-config.xml b/heat-exchanger/precice-config.xml
index e1259bdcf..918284b23 100644
--- a/heat-exchanger/precice-config.xml
+++ b/heat-exchanger/precice-config.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" ?>
 <precice-configuration>
   <log>
     <sink
diff --git a/heat-exchanger/solid-calculix/.gitignore b/heat-exchanger/solid-calculix/.gitignore
new file mode 100644
index 000000000..d04ab906c
--- /dev/null
+++ b/heat-exchanger/solid-calculix/.gitignore
@@ -0,0 +1,11 @@
+# Auxiliary files, or files downloaded via download-meshes.sh
+adiabatic.dfl
+all.msh
+dummy
+inner-interface.flm
+inner-interface.nam
+inner-interface.sur
+outer-interface.flm
+outer-interface.nam
+outer-interface.sur
+solid.inp
\ No newline at end of file
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/run.sh b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
index b59d8289d..f0f1f6654 100755
--- a/multiple-perpendicular-flaps/fluid-openfoam/run.sh
+++ b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
@@ -1,43 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    # Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal and the execute the runSolid1 and runSolid2 in separate terminals.
-# These scripts present how the three participants would be started manually.
-
-# Run this script with "-parallel" for parallel simulations
-
-# The script "Allclean" cleans-up the result and log files.
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
-blockMesh 
-checkMesh
+blockMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) 
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
-
-echo ""
-echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed."
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/perpendicular-flap/fluid-openfoam/run.sh b/perpendicular-flap/fluid-openfoam/run.sh
index aa6eff74b..55f94cf98 100755
--- a/perpendicular-flap/fluid-openfoam/run.sh
+++ b/perpendicular-flap/fluid-openfoam/run.sh
@@ -1,40 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal in order to start this participant.
-# Run this script with "-parallel" for parallel simulations
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
-touch fluid-openfoam.foam
-
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
+rm -rfv 0/ && cp -r 0.orig/ 0/
+touch fluid.foam
 
-echo ""
-echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed."
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file
diff --git a/tools/run-dealii.sh b/tools/run-dealii.sh
index 69ef1b02d..1859176bb 100755
--- a/tools/run-dealii.sh
+++ b/tools/run-dealii.sh
@@ -32,6 +32,6 @@ fi
 # If it has been copied to the local directory
 if test -f "elasticity"; then
     ./"${EXE}" parameters.prm
-    else
+else
     echo "Unable to find the executable ${EXE}. Either specify the executable explicitly (-e=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)"
 fi
diff --git a/tools/run-openfoam.sh b/tools/run-openfoam.sh
new file mode 100755
index 000000000..b57aa47ef
--- /dev/null
+++ b/tools/run-openfoam.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e # Not setting -u as it gets triggered by the OpenFOAM RunFunctions
+
+# OpenFOAM run functions: getApplication, getNumberOfProcessors
+# shellcheck disable=SC1090 # This is an OpenFOAM file which we don't need to check
+. "${WM_PROJECT_DIR}/bin/tools/RunFunctions"
+solver=$(getApplication)
+if [ "${1:-}" = "-parallel" ]; then
+    procs=$(getNumberOfProcessors)
+    decomposePar -force
+    mpirun -np "${procs}" "${solver}" -parallel
+    reconstructPar
+else
+    ${solver}
+fi
+
+. openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/turek-hron-fsi3/fluid-openfoam/run.sh b/turek-hron-fsi3/fluid-openfoam/run.sh
index e3c29e9e6..f0f1f6654 100755
--- a/turek-hron-fsi3/fluid-openfoam/run.sh
+++ b/turek-hron-fsi3/fluid-openfoam/run.sh
@@ -1,41 +1,8 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    		    		# Run from this directory
-. $WM_PROJECT_DIR/bin/tools/RunFunctions    # Tutorial run functions
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal and the execute the coupled_elasto_dynamics bindary 
-# in another terminal.
-# These scripts present how the two participants would be started manually.
-
-# Run this script with "-parallel" for parallel simulations
-
-# The script "Allclean" cleans-up the result and log files.
-
-# 1 for true, 0 for false
-parallel=0
-if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-rm -rfv 0/
-cp -r 0.orig/ 0/
 blockMesh
-checkMesh
+rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-# Run
-solver=$(getApplication)
-procs=$(getNumberOfProcessors)
-if [ $parallel -eq 1 ]; then
-    decomposePar -force
-    mpirun -np $procs $solver -parallel
-    reconstructPar
-else
-    $solver
-fi
-
-# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) 
-. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
+../../tools/run-openfoam.sh "$@"
\ No newline at end of file

From 8df48664f555c79d93676fc99a33f9eb9afd9fbd Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 10:25:42 +0200
Subject: [PATCH 02/23] Format files

---
 elastic-tube-3d/fluid-openfoam/run.sh         |  2 +-
 .../fluid-openfoam/run.sh                     |  2 +-
 .../solid-openfoam/run.sh                     |  2 +-
 .../fluid-openfoam/run.sh                     |  2 +-
 flow-over-heated-plate/fluid-openfoam/run.sh  |  2 +-
 flow-over-heated-plate/solid-openfoam/run.sh  |  2 +-
 heat-exchanger/fluid-inner-openfoam/run.sh    |  2 +-
 heat-exchanger/fluid-outer-openfoam/run.sh    |  2 +-
 .../fluid-openfoam/run.sh                     |  2 +-
 perpendicular-flap/fluid-openfoam/run.sh      |  2 +-
 tools/run-dealii.sh                           | 27 +++++++++----------
 turek-hron-fsi3/fluid-openfoam/run.sh         |  2 +-
 12 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/elastic-tube-3d/fluid-openfoam/run.sh b/elastic-tube-3d/fluid-openfoam/run.sh
index 3751d0eb6..f47e31861 100755
--- a/elastic-tube-3d/fluid-openfoam/run.sh
+++ b/elastic-tube-3d/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ cp -r constant/polyMesh.orig constant/polyMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
index f0f1f6654..78f7d8a42 100755
--- a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
index e2519b9a5..7d859fa54 100755
--- a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch solid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
index f0f1f6654..78f7d8a42 100755
--- a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate/fluid-openfoam/run.sh b/flow-over-heated-plate/fluid-openfoam/run.sh
index f0f1f6654..78f7d8a42 100755
--- a/flow-over-heated-plate/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate/solid-openfoam/run.sh b/flow-over-heated-plate/solid-openfoam/run.sh
index e2519b9a5..7d859fa54 100755
--- a/flow-over-heated-plate/solid-openfoam/run.sh
+++ b/flow-over-heated-plate/solid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch solid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/heat-exchanger/fluid-inner-openfoam/run.sh b/heat-exchanger/fluid-inner-openfoam/run.sh
index 04844705c..7a53b5c01 100755
--- a/heat-exchanger/fluid-inner-openfoam/run.sh
+++ b/heat-exchanger/fluid-inner-openfoam/run.sh
@@ -4,4 +4,4 @@ set -e -u
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-inner-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/heat-exchanger/fluid-outer-openfoam/run.sh b/heat-exchanger/fluid-outer-openfoam/run.sh
index 614290703..e0d5de389 100755
--- a/heat-exchanger/fluid-outer-openfoam/run.sh
+++ b/heat-exchanger/fluid-outer-openfoam/run.sh
@@ -4,4 +4,4 @@ set -e -u
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-outer-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/run.sh b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
index f0f1f6654..78f7d8a42 100755
--- a/multiple-perpendicular-flaps/fluid-openfoam/run.sh
+++ b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/perpendicular-flap/fluid-openfoam/run.sh b/perpendicular-flap/fluid-openfoam/run.sh
index 55f94cf98..833d8a1cd 100755
--- a/perpendicular-flap/fluid-openfoam/run.sh
+++ b/perpendicular-flap/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"
diff --git a/tools/run-dealii.sh b/tools/run-dealii.sh
index 1859176bb..318bb5143 100755
--- a/tools/run-dealii.sh
+++ b/tools/run-dealii.sh
@@ -3,30 +3,29 @@ set -e -u
 
 EXE=""
 
-for i in "$@"
-do
-case $i in
-    -e=*|--exec=*)
-    EXE="${i#*=}"
-    shift # past argument=value
-    ;;
+for i in "$@"; do
+    case $i in
+    -e=* | --exec=*)
+        EXE="${i#*=}"
+        shift # past argument=value
+        ;;
     *)
-      # unknown option
-    ;;
-esac
+        # unknown option
+        ;;
+    esac
 done
 
 # If the executable has been defined
-if [ -n "${EXE}"  ]; then
+if [ -n "${EXE}" ]; then
     "${EXE}" parameters.prm
-    exit 0;
+    exit 0
 fi
 
 EXE="elasticity"
 # If it is in the global path
 if [ -n "$(command -v "${EXE}")" ]; then
-   "${EXE}" parameters.prm
-   exit 0;
+    "${EXE}" parameters.prm
+    exit 0
 fi
 
 # If it has been copied to the local directory
diff --git a/turek-hron-fsi3/fluid-openfoam/run.sh b/turek-hron-fsi3/fluid-openfoam/run.sh
index f0f1f6654..78f7d8a42 100755
--- a/turek-hron-fsi3/fluid-openfoam/run.sh
+++ b/turek-hron-fsi3/fluid-openfoam/run.sh
@@ -5,4 +5,4 @@ blockMesh
 rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
-../../tools/run-openfoam.sh "$@"
\ No newline at end of file
+../../tools/run-openfoam.sh "$@"

From 7cfe1ffff83e5163571e92f0af5b38af65d14976 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 10:27:47 +0200
Subject: [PATCH 03/23] More formatting

---
 heat-exchanger/fluid-inner-openfoam/constant/.gitignore | 2 +-
 heat-exchanger/fluid-outer-openfoam/constant/.gitignore | 2 +-
 heat-exchanger/solid-calculix/.gitignore                | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/heat-exchanger/fluid-inner-openfoam/constant/.gitignore b/heat-exchanger/fluid-inner-openfoam/constant/.gitignore
index d57264fd1..825968042 100644
--- a/heat-exchanger/fluid-inner-openfoam/constant/.gitignore
+++ b/heat-exchanger/fluid-inner-openfoam/constant/.gitignore
@@ -1 +1 @@
-polyMesh/
\ No newline at end of file
+polyMesh/
diff --git a/heat-exchanger/fluid-outer-openfoam/constant/.gitignore b/heat-exchanger/fluid-outer-openfoam/constant/.gitignore
index d57264fd1..825968042 100644
--- a/heat-exchanger/fluid-outer-openfoam/constant/.gitignore
+++ b/heat-exchanger/fluid-outer-openfoam/constant/.gitignore
@@ -1 +1 @@
-polyMesh/
\ No newline at end of file
+polyMesh/
diff --git a/heat-exchanger/solid-calculix/.gitignore b/heat-exchanger/solid-calculix/.gitignore
index d04ab906c..99a7ca5ad 100644
--- a/heat-exchanger/solid-calculix/.gitignore
+++ b/heat-exchanger/solid-calculix/.gitignore
@@ -8,4 +8,4 @@ inner-interface.sur
 outer-interface.flm
 outer-interface.nam
 outer-interface.sur
-solid.inp
\ No newline at end of file
+solid.inp

From 0046c109aa5053b49a04777585b508a80164eca7 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 10:38:53 +0200
Subject: [PATCH 04/23] Format cleaning scripts

---
 elastic-tube-3d/fluid-openfoam/clean.sh       |  2 +-
 elastic-tube-3d/solid-calculix/clean.sh       |  2 +-
 .../fluid-openfoam/clean.sh                   |  2 +-
 .../solid-openfoam/clean.sh                   |  2 +-
 .../fluid-openfoam/clean.sh                   |  2 +-
 .../solid-codeaster/clean.sh                  |  2 +-
 .../fluid-openfoam/clean.sh                   |  2 +-
 flow-over-heated-plate/solid-fenics/clean.sh  |  2 +-
 flow-over-heated-plate/solid-nutils/clean.sh  |  2 +-
 .../solid-openfoam/clean.sh                   |  2 +-
 heat-exchanger/fluid-inner-openfoam/clean.sh  |  2 +-
 heat-exchanger/fluid-outer-openfoam/clean.sh  |  2 +-
 heat-exchanger/solid-calculix/clean.sh        |  2 +-
 .../fluid-openfoam/clean.sh                   |  2 +-
 .../solid-left-dealii/clean.sh                |  2 +-
 .../solid-right-dealii/clean.sh               |  2 +-
 .../dirichlet-calculix/clean.sh               |  2 +-
 .../neumann-calculix/clean.sh                 |  2 +-
 partitioned-heat-conduction/fenics/clean.sh   |  2 +-
 perpendicular-flap/fluid-nutils/clean.sh      |  2 +-
 perpendicular-flap/fluid-openfoam/clean.sh    |  2 +-
 perpendicular-flap/solid-calculix/clean.sh    |  2 +-
 perpendicular-flap/solid-dealii/clean.sh      |  2 +-
 perpendicular-flap/solid-fenics/clean.sh      |  2 +-
 tools/clean-tutorial-base.sh                  |  2 +-
 tools/cleaning-tools.sh                       | 19 ++++++-----
 tools/openfoam-remove-empty-dirs.sh           | 34 +++++++++----------
 turek-hron-fsi3/fluid-openfoam/clean.sh       |  2 +-
 turek-hron-fsi3/solid-dealii/clean.sh         |  2 +-
 turek-hron-fsi3/solid-fenics/clean.sh         |  2 +-
 30 files changed, 55 insertions(+), 54 deletions(-)

diff --git a/elastic-tube-3d/fluid-openfoam/clean.sh b/elastic-tube-3d/fluid-openfoam/clean.sh
index 45da1f562..295edc761 100755
--- a/elastic-tube-3d/fluid-openfoam/clean.sh
+++ b/elastic-tube-3d/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh, 0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh, 0.orig/ is copied to 0/
diff --git a/elastic-tube-3d/solid-calculix/clean.sh b/elastic-tube-3d/solid-calculix/clean.sh
index 7586ddc5b..e93f04f3c 100755
--- a/elastic-tube-3d/solid-calculix/clean.sh
+++ b/elastic-tube-3d/solid-calculix/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_calculix .
\ No newline at end of file
+clean_calculix .
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh
+++ b/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh b/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh
+++ b/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh
+++ b/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate-steady-state/solid-codeaster/clean.sh b/flow-over-heated-plate-steady-state/solid-codeaster/clean.sh
index a8be872d1..c5eddaea2 100755
--- a/flow-over-heated-plate-steady-state/solid-codeaster/clean.sh
+++ b/flow-over-heated-plate-steady-state/solid-codeaster/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_codeaster .
\ No newline at end of file
+clean_codeaster .
diff --git a/flow-over-heated-plate/fluid-openfoam/clean.sh b/flow-over-heated-plate/fluid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/flow-over-heated-plate/fluid-openfoam/clean.sh
+++ b/flow-over-heated-plate/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate/solid-fenics/clean.sh b/flow-over-heated-plate/solid-fenics/clean.sh
index 614c6f928..3a8b4619d 100755
--- a/flow-over-heated-plate/solid-fenics/clean.sh
+++ b/flow-over-heated-plate/solid-fenics/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_fenics .
\ No newline at end of file
+clean_fenics .
diff --git a/flow-over-heated-plate/solid-nutils/clean.sh b/flow-over-heated-plate/solid-nutils/clean.sh
index 49a202556..6893c1ea5 100755
--- a/flow-over-heated-plate/solid-nutils/clean.sh
+++ b/flow-over-heated-plate/solid-nutils/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_nutils .
\ No newline at end of file
+clean_nutils .
diff --git a/flow-over-heated-plate/solid-openfoam/clean.sh b/flow-over-heated-plate/solid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/flow-over-heated-plate/solid-openfoam/clean.sh
+++ b/flow-over-heated-plate/solid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/heat-exchanger/fluid-inner-openfoam/clean.sh b/heat-exchanger/fluid-inner-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/heat-exchanger/fluid-inner-openfoam/clean.sh
+++ b/heat-exchanger/fluid-inner-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/heat-exchanger/fluid-outer-openfoam/clean.sh b/heat-exchanger/fluid-outer-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/heat-exchanger/fluid-outer-openfoam/clean.sh
+++ b/heat-exchanger/fluid-outer-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/heat-exchanger/solid-calculix/clean.sh b/heat-exchanger/solid-calculix/clean.sh
index 7586ddc5b..e93f04f3c 100755
--- a/heat-exchanger/solid-calculix/clean.sh
+++ b/heat-exchanger/solid-calculix/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_calculix .
\ No newline at end of file
+clean_calculix .
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/clean.sh b/multiple-perpendicular-flaps/fluid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/multiple-perpendicular-flaps/fluid-openfoam/clean.sh
+++ b/multiple-perpendicular-flaps/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/multiple-perpendicular-flaps/solid-left-dealii/clean.sh b/multiple-perpendicular-flaps/solid-left-dealii/clean.sh
index 897f5d1b3..9ad81b8fb 100755
--- a/multiple-perpendicular-flaps/solid-left-dealii/clean.sh
+++ b/multiple-perpendicular-flaps/solid-left-dealii/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_dealii .
\ No newline at end of file
+clean_dealii .
diff --git a/multiple-perpendicular-flaps/solid-right-dealii/clean.sh b/multiple-perpendicular-flaps/solid-right-dealii/clean.sh
index 897f5d1b3..9ad81b8fb 100755
--- a/multiple-perpendicular-flaps/solid-right-dealii/clean.sh
+++ b/multiple-perpendicular-flaps/solid-right-dealii/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_dealii .
\ No newline at end of file
+clean_dealii .
diff --git a/partitioned-elastic-beam/dirichlet-calculix/clean.sh b/partitioned-elastic-beam/dirichlet-calculix/clean.sh
index 7586ddc5b..e93f04f3c 100755
--- a/partitioned-elastic-beam/dirichlet-calculix/clean.sh
+++ b/partitioned-elastic-beam/dirichlet-calculix/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_calculix .
\ No newline at end of file
+clean_calculix .
diff --git a/partitioned-elastic-beam/neumann-calculix/clean.sh b/partitioned-elastic-beam/neumann-calculix/clean.sh
index 7586ddc5b..e93f04f3c 100755
--- a/partitioned-elastic-beam/neumann-calculix/clean.sh
+++ b/partitioned-elastic-beam/neumann-calculix/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_calculix .
\ No newline at end of file
+clean_calculix .
diff --git a/partitioned-heat-conduction/fenics/clean.sh b/partitioned-heat-conduction/fenics/clean.sh
index 6938583b3..da80b515d 100755
--- a/partitioned-heat-conduction/fenics/clean.sh
+++ b/partitioned-heat-conduction/fenics/clean.sh
@@ -3,6 +3,6 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-rm -rf out 
+rm -rf out
 rm -f *.log
 rm -f *-events.json
diff --git a/perpendicular-flap/fluid-nutils/clean.sh b/perpendicular-flap/fluid-nutils/clean.sh
index 49a202556..6893c1ea5 100755
--- a/perpendicular-flap/fluid-nutils/clean.sh
+++ b/perpendicular-flap/fluid-nutils/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_nutils .
\ No newline at end of file
+clean_nutils .
diff --git a/perpendicular-flap/fluid-openfoam/clean.sh b/perpendicular-flap/fluid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/perpendicular-flap/fluid-openfoam/clean.sh
+++ b/perpendicular-flap/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/perpendicular-flap/solid-calculix/clean.sh b/perpendicular-flap/solid-calculix/clean.sh
index 3ac647dea..51404fba9 100755
--- a/perpendicular-flap/solid-calculix/clean.sh
+++ b/perpendicular-flap/solid-calculix/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_calculix .
-rm -fv Solid.log
\ No newline at end of file
+rm -fv Solid.log
diff --git a/perpendicular-flap/solid-dealii/clean.sh b/perpendicular-flap/solid-dealii/clean.sh
index 897f5d1b3..9ad81b8fb 100755
--- a/perpendicular-flap/solid-dealii/clean.sh
+++ b/perpendicular-flap/solid-dealii/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_dealii .
\ No newline at end of file
+clean_dealii .
diff --git a/perpendicular-flap/solid-fenics/clean.sh b/perpendicular-flap/solid-fenics/clean.sh
index 614c6f928..3a8b4619d 100755
--- a/perpendicular-flap/solid-fenics/clean.sh
+++ b/perpendicular-flap/solid-fenics/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_fenics .
\ No newline at end of file
+clean_fenics .
diff --git a/tools/clean-tutorial-base.sh b/tools/clean-tutorial-base.sh
index c1c0a2697..dd6fc4f26 100755
--- a/tools/clean-tutorial-base.sh
+++ b/tools/clean-tutorial-base.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../tools/cleaning-tools.sh
 
-clean_tutorial .
\ No newline at end of file
+clean_tutorial .
diff --git a/tools/cleaning-tools.sh b/tools/cleaning-tools.sh
index f3a35dcdd..b712b8f2f 100755
--- a/tools/cleaning-tools.sh
+++ b/tools/cleaning-tools.sh
@@ -1,7 +1,8 @@
 #!/bin/sh
 
 error() {
-    echo "Error: $1" >&2; exit 1;
+    echo "Error: $1" >&2
+    exit 1
 }
 
 clean_tutorial() {
@@ -14,7 +15,7 @@ clean_tutorial() {
         for case in */; do
             if [ "${case}" = images/ ]; then
                 continue
-            fi;
+            fi
             (cd "${case}" && ./clean.sh)
         done
     )
@@ -26,12 +27,12 @@ clean_precice_logs() {
         cd "$1"
         echo "---- Cleaning up preCICE logs in $(pwd)"
         rm -fv ./precice-*-iterations.log \
-               ./precice-*-convergence.log \
-               ./precice-*-events.json \
-               ./precice-*-events-summary.log \
-               ./precice-postProcessingInfo.log \
-               ./precice-*-watchpoint-*.log \
-               ./precice-*-watchintegral-*.log
+            ./precice-*-convergence.log \
+            ./precice-*-events.json \
+            ./precice-*-events-summary.log \
+            ./precice-postProcessingInfo.log \
+            ./precice-*-watchpoint-*.log \
+            ./precice-*-watchintegral-*.log
     )
 }
 
@@ -107,4 +108,4 @@ clean_su2() {
         rm -fv ./restart_flow_*.dat forces_breakdown.dat ./surface_flow_*.csv ./flow_*.vtk ./history_*.vtk
         clean_precice_logs .
     )
-}
\ No newline at end of file
+}
diff --git a/tools/openfoam-remove-empty-dirs.sh b/tools/openfoam-remove-empty-dirs.sh
index 16a9fb640..44427cf8c 100755
--- a/tools/openfoam-remove-empty-dirs.sh
+++ b/tools/openfoam-remove-empty-dirs.sh
@@ -2,24 +2,24 @@
 
 openfoam_remove_empty_dirs() {
 	(
-	set -e -u
-	echo "Looking for any time directories without results (e.g. stray functionObjectProperties files, see openfoam-adapter issue #26 on GitHub)..."
+		set -e -u
+		echo "Looking for any time directories without results (e.g. stray functionObjectProperties files, see openfoam-adapter issue #26 on GitHub)..."
 
-	for f in [0-9]* [0-9]*.[0-9]*; do
-		if ! [ -f "${f}/U" ] && ! [ -f "${f}/T" ]; then
-			rm -rfv "${f}"
-		fi
-	done
-	if [ -d processor0 ]; then
-		for d in processor*; do
-			cd "${d}"
-			for f in [0-9]* [0-9]*.[0-9]*; do
-				if ! [ -f "${f}"/U ] && ! [ -f "${f}"/T ]; then
-					rm -rfv "${f}"
-				fi
-			done
-			cd ..
+		for f in [0-9]* [0-9]*.[0-9]*; do
+			if ! [ -f "${f}/U" ] && ! [ -f "${f}/T" ]; then
+				rm -rfv "${f}"
+			fi
 		done
-	fi
+		if [ -d processor0 ]; then
+			for d in processor*; do
+				cd "${d}"
+				for f in [0-9]* [0-9]*.[0-9]*; do
+					if ! [ -f "${f}"/U ] && ! [ -f "${f}"/T ]; then
+						rm -rfv "${f}"
+					fi
+				done
+				cd ..
+			done
+		fi
 	)
 }
diff --git a/turek-hron-fsi3/fluid-openfoam/clean.sh b/turek-hron-fsi3/fluid-openfoam/clean.sh
index 1305ae185..ea57408fe 100755
--- a/turek-hron-fsi3/fluid-openfoam/clean.sh
+++ b/turek-hron-fsi3/fluid-openfoam/clean.sh
@@ -4,4 +4,4 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
\ No newline at end of file
+rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/turek-hron-fsi3/solid-dealii/clean.sh b/turek-hron-fsi3/solid-dealii/clean.sh
index 897f5d1b3..9ad81b8fb 100755
--- a/turek-hron-fsi3/solid-dealii/clean.sh
+++ b/turek-hron-fsi3/solid-dealii/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_dealii .
\ No newline at end of file
+clean_dealii .
diff --git a/turek-hron-fsi3/solid-fenics/clean.sh b/turek-hron-fsi3/solid-fenics/clean.sh
index 614c6f928..3a8b4619d 100755
--- a/turek-hron-fsi3/solid-fenics/clean.sh
+++ b/turek-hron-fsi3/solid-fenics/clean.sh
@@ -3,4 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-clean_fenics .
\ No newline at end of file
+clean_fenics .

From 37e9d1cab20aa6d01ffada5efe26e60fd87c66af Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 10:48:18 +0200
Subject: [PATCH 05/23] perpendicular-flap OpenFOAM: move 0.orig to 0

---
 perpendicular-flap/fluid-openfoam/{0.orig => 0}/U                | 0
 perpendicular-flap/fluid-openfoam/{0.orig => 0}/p                | 0
 perpendicular-flap/fluid-openfoam/{0.orig => 0}/phi              | 0
 .../fluid-openfoam/{0.orig => 0}/pointDisplacement               | 0
 perpendicular-flap/fluid-openfoam/clean.sh                       | 1 -
 perpendicular-flap/fluid-openfoam/run.sh                         | 1 -
 6 files changed, 2 deletions(-)
 rename perpendicular-flap/fluid-openfoam/{0.orig => 0}/U (100%)
 rename perpendicular-flap/fluid-openfoam/{0.orig => 0}/p (100%)
 rename perpendicular-flap/fluid-openfoam/{0.orig => 0}/phi (100%)
 rename perpendicular-flap/fluid-openfoam/{0.orig => 0}/pointDisplacement (100%)

diff --git a/perpendicular-flap/fluid-openfoam/0.orig/U b/perpendicular-flap/fluid-openfoam/0/U
similarity index 100%
rename from perpendicular-flap/fluid-openfoam/0.orig/U
rename to perpendicular-flap/fluid-openfoam/0/U
diff --git a/perpendicular-flap/fluid-openfoam/0.orig/p b/perpendicular-flap/fluid-openfoam/0/p
similarity index 100%
rename from perpendicular-flap/fluid-openfoam/0.orig/p
rename to perpendicular-flap/fluid-openfoam/0/p
diff --git a/perpendicular-flap/fluid-openfoam/0.orig/phi b/perpendicular-flap/fluid-openfoam/0/phi
similarity index 100%
rename from perpendicular-flap/fluid-openfoam/0.orig/phi
rename to perpendicular-flap/fluid-openfoam/0/phi
diff --git a/perpendicular-flap/fluid-openfoam/0.orig/pointDisplacement b/perpendicular-flap/fluid-openfoam/0/pointDisplacement
similarity index 100%
rename from perpendicular-flap/fluid-openfoam/0.orig/pointDisplacement
rename to perpendicular-flap/fluid-openfoam/0/pointDisplacement
diff --git a/perpendicular-flap/fluid-openfoam/clean.sh b/perpendicular-flap/fluid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/perpendicular-flap/fluid-openfoam/clean.sh
+++ b/perpendicular-flap/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/perpendicular-flap/fluid-openfoam/run.sh b/perpendicular-flap/fluid-openfoam/run.sh
index 833d8a1cd..3b319414d 100755
--- a/perpendicular-flap/fluid-openfoam/run.sh
+++ b/perpendicular-flap/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid.foam
 
 ../../tools/run-openfoam.sh "$@"

From 86f5fbc333240237ec5a5b7bb71302c9afb3e775 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 11:18:29 +0200
Subject: [PATCH 06/23] Drop 0.orig from most OpenFOAM cases

---
 elastic-tube-3d/fluid-openfoam/{0.orig => 0}/U                  | 0
 elastic-tube-3d/fluid-openfoam/{0.orig => 0}/p                  | 0
 elastic-tube-3d/fluid-openfoam/{0.orig => 0}/pointDisplacement  | 0
 elastic-tube-3d/fluid-openfoam/clean.sh                         | 1 -
 elastic-tube-3d/fluid-openfoam/run.sh                           | 1 -
 .../fluid-openfoam/{0.orig => 0}/T                              | 0
 .../fluid-openfoam/{0.orig => 0}/U                              | 0
 .../fluid-openfoam/{0.orig => 0}/alphat                         | 0
 .../fluid-openfoam/{0.orig => 0}/epsilon                        | 0
 .../fluid-openfoam/{0.orig => 0}/k                              | 0
 .../fluid-openfoam/{0.orig => 0}/nut                            | 0
 .../fluid-openfoam/{0.orig => 0}/p                              | 0
 .../fluid-openfoam/{0.orig => 0}/p_rgh                          | 0
 .../fluid-openfoam/clean.sh                                     | 1 -
 flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh | 1 -
 .../solid-openfoam/{0.orig => 0}/T                              | 0
 .../solid-openfoam/clean.sh                                     | 1 -
 flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh | 1 -
 .../fluid-openfoam/{0.orig => 0}/T                              | 0
 .../fluid-openfoam/{0.orig => 0}/U                              | 0
 .../fluid-openfoam/{0.orig => 0}/alphat                         | 0
 .../fluid-openfoam/{0.orig => 0}/epsilon                        | 0
 .../fluid-openfoam/{0.orig => 0}/k                              | 0
 .../fluid-openfoam/{0.orig => 0}/nut                            | 0
 .../fluid-openfoam/{0.orig => 0}/p                              | 0
 .../fluid-openfoam/{0.orig => 0}/p_rgh                          | 0
 flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh     | 1 -
 flow-over-heated-plate-steady-state/fluid-openfoam/run.sh       | 1 -
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/T           | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/U           | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/alphat      | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/epsilon     | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/k           | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/nut         | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/p           | 0
 flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/p_rgh       | 0
 flow-over-heated-plate/fluid-openfoam/clean.sh                  | 1 -
 flow-over-heated-plate/fluid-openfoam/run.sh                    | 1 -
 flow-over-heated-plate/solid-openfoam/{0.orig => 0}/T           | 0
 flow-over-heated-plate/solid-openfoam/clean.sh                  | 1 -
 flow-over-heated-plate/solid-openfoam/run.sh                    | 1 -
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/T             | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/U             | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/alphat        | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/epsilon       | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/k             | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/nut           | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/p             | 0
 heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/p_rgh         | 0
 heat-exchanger/fluid-inner-openfoam/clean.sh                    | 1 -
 heat-exchanger/fluid-inner-openfoam/run.sh                      | 1 -
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/T             | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/U             | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/alphat        | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/epsilon       | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/k             | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/nut           | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/p             | 0
 heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/p_rgh         | 0
 heat-exchanger/fluid-outer-openfoam/clean.sh                    | 1 -
 heat-exchanger/fluid-outer-openfoam/run.sh                      | 1 -
 multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/U     | 0
 multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/p     | 0
 multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/phi   | 0
 .../fluid-openfoam/{0.orig => 0}/pointDisplacement              | 0
 multiple-perpendicular-flaps/fluid-openfoam/clean.sh            | 1 -
 multiple-perpendicular-flaps/fluid-openfoam/run.sh              | 1 -
 perpendicular-flap/fluid-openfoam/run.sh                        | 2 +-
 68 files changed, 1 insertion(+), 19 deletions(-)
 rename elastic-tube-3d/fluid-openfoam/{0.orig => 0}/U (100%)
 rename elastic-tube-3d/fluid-openfoam/{0.orig => 0}/p (100%)
 rename elastic-tube-3d/fluid-openfoam/{0.orig => 0}/pointDisplacement (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/T (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/U (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/alphat (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/epsilon (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/k (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/nut (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/p (100%)
 rename flow-over-heated-plate-nearest-projection/fluid-openfoam/{0.orig => 0}/p_rgh (100%)
 rename flow-over-heated-plate-nearest-projection/solid-openfoam/{0.orig => 0}/T (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/T (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/U (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/alphat (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/epsilon (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/k (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/nut (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/p (100%)
 rename flow-over-heated-plate-steady-state/fluid-openfoam/{0.orig => 0}/p_rgh (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/T (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/U (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/alphat (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/epsilon (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/k (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/nut (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/p (100%)
 rename flow-over-heated-plate/fluid-openfoam/{0.orig => 0}/p_rgh (100%)
 rename flow-over-heated-plate/solid-openfoam/{0.orig => 0}/T (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/T (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/U (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/alphat (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/epsilon (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/k (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/nut (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/p (100%)
 rename heat-exchanger/fluid-inner-openfoam/{0.orig => 0}/p_rgh (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/T (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/U (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/alphat (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/epsilon (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/k (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/nut (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/p (100%)
 rename heat-exchanger/fluid-outer-openfoam/{0.orig => 0}/p_rgh (100%)
 rename multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/U (100%)
 rename multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/p (100%)
 rename multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/phi (100%)
 rename multiple-perpendicular-flaps/fluid-openfoam/{0.orig => 0}/pointDisplacement (100%)

diff --git a/elastic-tube-3d/fluid-openfoam/0.orig/U b/elastic-tube-3d/fluid-openfoam/0/U
similarity index 100%
rename from elastic-tube-3d/fluid-openfoam/0.orig/U
rename to elastic-tube-3d/fluid-openfoam/0/U
diff --git a/elastic-tube-3d/fluid-openfoam/0.orig/p b/elastic-tube-3d/fluid-openfoam/0/p
similarity index 100%
rename from elastic-tube-3d/fluid-openfoam/0.orig/p
rename to elastic-tube-3d/fluid-openfoam/0/p
diff --git a/elastic-tube-3d/fluid-openfoam/0.orig/pointDisplacement b/elastic-tube-3d/fluid-openfoam/0/pointDisplacement
similarity index 100%
rename from elastic-tube-3d/fluid-openfoam/0.orig/pointDisplacement
rename to elastic-tube-3d/fluid-openfoam/0/pointDisplacement
diff --git a/elastic-tube-3d/fluid-openfoam/clean.sh b/elastic-tube-3d/fluid-openfoam/clean.sh
index 295edc761..c31d9fc76 100755
--- a/elastic-tube-3d/fluid-openfoam/clean.sh
+++ b/elastic-tube-3d/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh, 0.orig/ is copied to 0/
diff --git a/elastic-tube-3d/fluid-openfoam/run.sh b/elastic-tube-3d/fluid-openfoam/run.sh
index f47e31861..03c4c9c14 100755
--- a/elastic-tube-3d/fluid-openfoam/run.sh
+++ b/elastic-tube-3d/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 cp -r constant/polyMesh.orig constant/polyMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/T b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/T
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/T
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/T
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/U b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/U
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/U
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/U
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/alphat b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/alphat
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/alphat
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/alphat
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/epsilon b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/epsilon
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/epsilon
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/epsilon
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/k b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/k
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/k
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/k
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/nut b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/nut
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/nut
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/nut
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/p b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/p
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/p
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/p
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/p_rgh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/0/p_rgh
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/fluid-openfoam/0.orig/p_rgh
rename to flow-over-heated-plate-nearest-projection/fluid-openfoam/0/p_rgh
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh
+++ b/flow-over-heated-plate-nearest-projection/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
index 78f7d8a42..d5427df4a 100755
--- a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/0.orig/T b/flow-over-heated-plate-nearest-projection/solid-openfoam/0/T
similarity index 100%
rename from flow-over-heated-plate-nearest-projection/solid-openfoam/0.orig/T
rename to flow-over-heated-plate-nearest-projection/solid-openfoam/0/T
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh b/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh
+++ b/flow-over-heated-plate-nearest-projection/solid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
index 7d859fa54..21d71edb6 100755
--- a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch solid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/T b/flow-over-heated-plate-steady-state/fluid-openfoam/0/T
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/T
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/T
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/U b/flow-over-heated-plate-steady-state/fluid-openfoam/0/U
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/U
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/U
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/alphat b/flow-over-heated-plate-steady-state/fluid-openfoam/0/alphat
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/alphat
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/alphat
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/epsilon b/flow-over-heated-plate-steady-state/fluid-openfoam/0/epsilon
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/epsilon
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/epsilon
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/k b/flow-over-heated-plate-steady-state/fluid-openfoam/0/k
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/k
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/k
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/nut b/flow-over-heated-plate-steady-state/fluid-openfoam/0/nut
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/nut
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/nut
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p b/flow-over-heated-plate-steady-state/fluid-openfoam/0/p
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/p
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p_rgh b/flow-over-heated-plate-steady-state/fluid-openfoam/0/p_rgh
similarity index 100%
rename from flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p_rgh
rename to flow-over-heated-plate-steady-state/fluid-openfoam/0/p_rgh
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh
+++ b/flow-over-heated-plate-steady-state/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
index 78f7d8a42..d5427df4a 100755
--- a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/T b/flow-over-heated-plate/fluid-openfoam/0/T
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/T
rename to flow-over-heated-plate/fluid-openfoam/0/T
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/U b/flow-over-heated-plate/fluid-openfoam/0/U
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/U
rename to flow-over-heated-plate/fluid-openfoam/0/U
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/alphat b/flow-over-heated-plate/fluid-openfoam/0/alphat
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/alphat
rename to flow-over-heated-plate/fluid-openfoam/0/alphat
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/epsilon b/flow-over-heated-plate/fluid-openfoam/0/epsilon
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/epsilon
rename to flow-over-heated-plate/fluid-openfoam/0/epsilon
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/k b/flow-over-heated-plate/fluid-openfoam/0/k
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/k
rename to flow-over-heated-plate/fluid-openfoam/0/k
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/nut b/flow-over-heated-plate/fluid-openfoam/0/nut
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/nut
rename to flow-over-heated-plate/fluid-openfoam/0/nut
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/p b/flow-over-heated-plate/fluid-openfoam/0/p
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/p
rename to flow-over-heated-plate/fluid-openfoam/0/p
diff --git a/flow-over-heated-plate/fluid-openfoam/0.orig/p_rgh b/flow-over-heated-plate/fluid-openfoam/0/p_rgh
similarity index 100%
rename from flow-over-heated-plate/fluid-openfoam/0.orig/p_rgh
rename to flow-over-heated-plate/fluid-openfoam/0/p_rgh
diff --git a/flow-over-heated-plate/fluid-openfoam/clean.sh b/flow-over-heated-plate/fluid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/flow-over-heated-plate/fluid-openfoam/clean.sh
+++ b/flow-over-heated-plate/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate/fluid-openfoam/run.sh b/flow-over-heated-plate/fluid-openfoam/run.sh
index 78f7d8a42..d5427df4a 100755
--- a/flow-over-heated-plate/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/flow-over-heated-plate/solid-openfoam/0.orig/T b/flow-over-heated-plate/solid-openfoam/0/T
similarity index 100%
rename from flow-over-heated-plate/solid-openfoam/0.orig/T
rename to flow-over-heated-plate/solid-openfoam/0/T
diff --git a/flow-over-heated-plate/solid-openfoam/clean.sh b/flow-over-heated-plate/solid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/flow-over-heated-plate/solid-openfoam/clean.sh
+++ b/flow-over-heated-plate/solid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/flow-over-heated-plate/solid-openfoam/run.sh b/flow-over-heated-plate/solid-openfoam/run.sh
index 7d859fa54..21d71edb6 100755
--- a/flow-over-heated-plate/solid-openfoam/run.sh
+++ b/flow-over-heated-plate/solid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch solid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/T b/heat-exchanger/fluid-inner-openfoam/0/T
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/T
rename to heat-exchanger/fluid-inner-openfoam/0/T
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/U b/heat-exchanger/fluid-inner-openfoam/0/U
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/U
rename to heat-exchanger/fluid-inner-openfoam/0/U
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/alphat b/heat-exchanger/fluid-inner-openfoam/0/alphat
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/alphat
rename to heat-exchanger/fluid-inner-openfoam/0/alphat
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/epsilon b/heat-exchanger/fluid-inner-openfoam/0/epsilon
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/epsilon
rename to heat-exchanger/fluid-inner-openfoam/0/epsilon
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/k b/heat-exchanger/fluid-inner-openfoam/0/k
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/k
rename to heat-exchanger/fluid-inner-openfoam/0/k
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/nut b/heat-exchanger/fluid-inner-openfoam/0/nut
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/nut
rename to heat-exchanger/fluid-inner-openfoam/0/nut
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/p b/heat-exchanger/fluid-inner-openfoam/0/p
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/p
rename to heat-exchanger/fluid-inner-openfoam/0/p
diff --git a/heat-exchanger/fluid-inner-openfoam/0.orig/p_rgh b/heat-exchanger/fluid-inner-openfoam/0/p_rgh
similarity index 100%
rename from heat-exchanger/fluid-inner-openfoam/0.orig/p_rgh
rename to heat-exchanger/fluid-inner-openfoam/0/p_rgh
diff --git a/heat-exchanger/fluid-inner-openfoam/clean.sh b/heat-exchanger/fluid-inner-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/heat-exchanger/fluid-inner-openfoam/clean.sh
+++ b/heat-exchanger/fluid-inner-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/heat-exchanger/fluid-inner-openfoam/run.sh b/heat-exchanger/fluid-inner-openfoam/run.sh
index 7a53b5c01..256501ccb 100755
--- a/heat-exchanger/fluid-inner-openfoam/run.sh
+++ b/heat-exchanger/fluid-inner-openfoam/run.sh
@@ -1,7 +1,6 @@
 #!/bin/sh
 set -e -u
 
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-inner-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/T b/heat-exchanger/fluid-outer-openfoam/0/T
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/T
rename to heat-exchanger/fluid-outer-openfoam/0/T
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/U b/heat-exchanger/fluid-outer-openfoam/0/U
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/U
rename to heat-exchanger/fluid-outer-openfoam/0/U
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/alphat b/heat-exchanger/fluid-outer-openfoam/0/alphat
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/alphat
rename to heat-exchanger/fluid-outer-openfoam/0/alphat
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/epsilon b/heat-exchanger/fluid-outer-openfoam/0/epsilon
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/epsilon
rename to heat-exchanger/fluid-outer-openfoam/0/epsilon
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/k b/heat-exchanger/fluid-outer-openfoam/0/k
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/k
rename to heat-exchanger/fluid-outer-openfoam/0/k
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/nut b/heat-exchanger/fluid-outer-openfoam/0/nut
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/nut
rename to heat-exchanger/fluid-outer-openfoam/0/nut
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/p b/heat-exchanger/fluid-outer-openfoam/0/p
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/p
rename to heat-exchanger/fluid-outer-openfoam/0/p
diff --git a/heat-exchanger/fluid-outer-openfoam/0.orig/p_rgh b/heat-exchanger/fluid-outer-openfoam/0/p_rgh
similarity index 100%
rename from heat-exchanger/fluid-outer-openfoam/0.orig/p_rgh
rename to heat-exchanger/fluid-outer-openfoam/0/p_rgh
diff --git a/heat-exchanger/fluid-outer-openfoam/clean.sh b/heat-exchanger/fluid-outer-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/heat-exchanger/fluid-outer-openfoam/clean.sh
+++ b/heat-exchanger/fluid-outer-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/heat-exchanger/fluid-outer-openfoam/run.sh b/heat-exchanger/fluid-outer-openfoam/run.sh
index e0d5de389..30a484110 100755
--- a/heat-exchanger/fluid-outer-openfoam/run.sh
+++ b/heat-exchanger/fluid-outer-openfoam/run.sh
@@ -1,7 +1,6 @@
 #!/bin/sh
 set -e -u
 
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-outer-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/U b/multiple-perpendicular-flaps/fluid-openfoam/0/U
similarity index 100%
rename from multiple-perpendicular-flaps/fluid-openfoam/0.orig/U
rename to multiple-perpendicular-flaps/fluid-openfoam/0/U
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/p b/multiple-perpendicular-flaps/fluid-openfoam/0/p
similarity index 100%
rename from multiple-perpendicular-flaps/fluid-openfoam/0.orig/p
rename to multiple-perpendicular-flaps/fluid-openfoam/0/p
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/phi b/multiple-perpendicular-flaps/fluid-openfoam/0/phi
similarity index 100%
rename from multiple-perpendicular-flaps/fluid-openfoam/0.orig/phi
rename to multiple-perpendicular-flaps/fluid-openfoam/0/phi
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/pointDisplacement b/multiple-perpendicular-flaps/fluid-openfoam/0/pointDisplacement
similarity index 100%
rename from multiple-perpendicular-flaps/fluid-openfoam/0.orig/pointDisplacement
rename to multiple-perpendicular-flaps/fluid-openfoam/0/pointDisplacement
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/clean.sh b/multiple-perpendicular-flaps/fluid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/multiple-perpendicular-flaps/fluid-openfoam/clean.sh
+++ b/multiple-perpendicular-flaps/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/run.sh b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
index 78f7d8a42..d5427df4a 100755
--- a/multiple-perpendicular-flaps/fluid-openfoam/run.sh
+++ b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
diff --git a/perpendicular-flap/fluid-openfoam/run.sh b/perpendicular-flap/fluid-openfoam/run.sh
index 3b319414d..d5427df4a 100755
--- a/perpendicular-flap/fluid-openfoam/run.sh
+++ b/perpendicular-flap/fluid-openfoam/run.sh
@@ -2,6 +2,6 @@
 set -e -u
 
 blockMesh
-touch fluid.foam
+touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"

From e403b5f10abed9a12cec7447bc601241483ec73e Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 12:41:15 +0200
Subject: [PATCH 07/23] Move 0.orig to 0 also for turek-hron-fsi3

---
 turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/U                 | 0
 turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/p                 | 0
 turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/pointDisplacement | 0
 turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/vorticity         | 0
 turek-hron-fsi3/fluid-openfoam/clean.sh                        | 1 -
 turek-hron-fsi3/fluid-openfoam/run.sh                          | 1 -
 6 files changed, 2 deletions(-)
 rename turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/U (100%)
 rename turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/p (100%)
 rename turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/pointDisplacement (100%)
 rename turek-hron-fsi3/fluid-openfoam/{0.orig => 0}/vorticity (100%)

diff --git a/turek-hron-fsi3/fluid-openfoam/0.orig/U b/turek-hron-fsi3/fluid-openfoam/0/U
similarity index 100%
rename from turek-hron-fsi3/fluid-openfoam/0.orig/U
rename to turek-hron-fsi3/fluid-openfoam/0/U
diff --git a/turek-hron-fsi3/fluid-openfoam/0.orig/p b/turek-hron-fsi3/fluid-openfoam/0/p
similarity index 100%
rename from turek-hron-fsi3/fluid-openfoam/0.orig/p
rename to turek-hron-fsi3/fluid-openfoam/0/p
diff --git a/turek-hron-fsi3/fluid-openfoam/0.orig/pointDisplacement b/turek-hron-fsi3/fluid-openfoam/0/pointDisplacement
similarity index 100%
rename from turek-hron-fsi3/fluid-openfoam/0.orig/pointDisplacement
rename to turek-hron-fsi3/fluid-openfoam/0/pointDisplacement
diff --git a/turek-hron-fsi3/fluid-openfoam/0.orig/vorticity b/turek-hron-fsi3/fluid-openfoam/0/vorticity
similarity index 100%
rename from turek-hron-fsi3/fluid-openfoam/0.orig/vorticity
rename to turek-hron-fsi3/fluid-openfoam/0/vorticity
diff --git a/turek-hron-fsi3/fluid-openfoam/clean.sh b/turek-hron-fsi3/fluid-openfoam/clean.sh
index ea57408fe..c31d9fc76 100755
--- a/turek-hron-fsi3/fluid-openfoam/clean.sh
+++ b/turek-hron-fsi3/fluid-openfoam/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_openfoam .
-rm -rfv ./0/ # in run.sh,0.orig/ is copied to 0/
diff --git a/turek-hron-fsi3/fluid-openfoam/run.sh b/turek-hron-fsi3/fluid-openfoam/run.sh
index 78f7d8a42..d5427df4a 100755
--- a/turek-hron-fsi3/fluid-openfoam/run.sh
+++ b/turek-hron-fsi3/fluid-openfoam/run.sh
@@ -2,7 +2,6 @@
 set -e -u
 
 blockMesh
-rm -rfv 0/ && cp -r 0.orig/ 0/
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"

From 54494d86458103aea6ffc8a9c5244095c4801dc4 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 12:51:54 +0200
Subject: [PATCH 08/23] Simplify CalculiX run scripts

---
 elastic-tube-3d/solid-calculix/run.sh           | 17 +++++------------
 heat-exchanger/solid-calculix/run.sh            | 16 +++-------------
 .../dirichlet-calculix/run.sh                   | 17 +++++------------
 .../neumann-calculix/run.sh                     | 17 +++++------------
 perpendicular-flap/solid-calculix/run.sh        | 16 +++-------------
 5 files changed, 21 insertions(+), 62 deletions(-)

diff --git a/elastic-tube-3d/solid-calculix/run.sh b/elastic-tube-3d/solid-calculix/run.sh
index 936f6bbe7..5f1ff6813 100755
--- a/elastic-tube-3d/solid-calculix/run.sh
+++ b/elastic-tube-3d/solid-calculix/run.sh
@@ -1,13 +1,6 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    # Run from this directory
+#!/bin/sh
+set -e -u
 
-# This script prepares and runs the CalculiX solver
-
-# =============== Participant: Solid ===========================
-Solver="ccx_preCICE"
-
-    # Run and get the process id
-    echo "Starting the CalculiX..."
-    export OMP_NUM_THREADS=1
-    export CCX_NPROC_EQUATION_SOLVER=1
-    ${Solver} -i tube -precice-participant Calculix 
+export OMP_NUM_THREADS=1
+export CCX_NPROC_EQUATION_SOLVER=1
+ccx_preCICE -i tube -precice-participant Calculix
diff --git a/heat-exchanger/solid-calculix/run.sh b/heat-exchanger/solid-calculix/run.sh
index ef3b4373c..33d6d65c3 100755
--- a/heat-exchanger/solid-calculix/run.sh
+++ b/heat-exchanger/solid-calculix/run.sh
@@ -1,21 +1,11 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    # Run from this directory
-
-# This script prepares and runs all the participants in one terminal,
-# forwarding the solvers' output to log files.
-# You need to first download the mesh files separately using the Download_meshes script.
-# The script "Allclean" cleans-up the result and log files.
+#!/bin/sh
+set -e -u
 
 if [ ! -f all.msh ]; then
     echo "Mesh files not found. Use the Download_meshes script to download them."
     exit
 fi
 
-Participant="Solid"
-Solver="ccx_preCICE"
-
-# Run and get the process id
-echo "Starting the ${Participant} participant..."
 export OMP_NUM_THREADS=1
 export CCX_NPROC_EQUATION_SOLVER=1
-${Solver} -i solid -precice-participant ${Participant}
+ccx_preCICE -i solid -precice-participant Solid
diff --git a/partitioned-elastic-beam/dirichlet-calculix/run.sh b/partitioned-elastic-beam/dirichlet-calculix/run.sh
index b1371f82a..4e020fcd1 100755
--- a/partitioned-elastic-beam/dirichlet-calculix/run.sh
+++ b/partitioned-elastic-beam/dirichlet-calculix/run.sh
@@ -1,13 +1,6 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    # Run from this directory
+#!/bin/sh
+set -e -u
 
-# This script prepares and runs the CalculiX solver
-
-# =============== Participant: Solid ===========================
-Solver="ccx_preCICE"
-
-    # Run and get the process id
-    echo "Starting the CalculiX..."
-    export OMP_NUM_THREADS=1
-    export CCX_NPROC_EQUATION_SOLVER=1
-    ${Solver} -i beam1 -precice-participant Calculix1 
+export OMP_NUM_THREADS=1
+export CCX_NPROC_EQUATION_SOLVER=1
+ccx_preCICE -i beam1 -precice-participant Calculix1
diff --git a/partitioned-elastic-beam/neumann-calculix/run.sh b/partitioned-elastic-beam/neumann-calculix/run.sh
index 455605669..e1730a420 100755
--- a/partitioned-elastic-beam/neumann-calculix/run.sh
+++ b/partitioned-elastic-beam/neumann-calculix/run.sh
@@ -1,13 +1,6 @@
-#!/bin/bash
-cd ${0%/*} || exit 1    # Run from this directory
+#!/bin/sh
+set -e -u
 
-# This script prepares and runs the CalculiX solver
-
-# =============== Participant: Solid ===========================
-Solver="ccx_preCICE"
-
-    # Run and get the process id
-    echo "Starting the CalculiX..."
-    export OMP_NUM_THREADS=1
-    export CCX_NPROC_EQUATION_SOLVER=1
-    ${Solver} -i beam2 -precice-participant Calculix2
+export OMP_NUM_THREADS=1
+export CCX_NPROC_EQUATION_SOLVER=1
+ccx_preCICE -i beam2 -precice-participant Calculix2
diff --git a/perpendicular-flap/solid-calculix/run.sh b/perpendicular-flap/solid-calculix/run.sh
index 34720eada..0cc701cc5 100755
--- a/perpendicular-flap/solid-calculix/run.sh
+++ b/perpendicular-flap/solid-calculix/run.sh
@@ -1,14 +1,4 @@
-#!/bin/bash
+#!/bin/sh
+set -e -u
 
-# Solid participant
-
-# Run this script in one terminal and the "runFluid" script in another terminal.
-# These scripts present how the two participants would be started manually.
-# Alternatively, you may execute the "Allrun" script in one terminal.
-
-# The script "Allclean" cleans-up the result and log files.
-
-echo "Running the Solid participant..."
-
-# Run
-ccx_preCICE -i flap -precice-participant Solid 2>&1 | tee Solid.log
+ccx_preCICE -i flap -precice-participant Solid

From 4aa795fab9f2aeafc979666da3307561bcc1c8f7 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 12:57:09 +0200
Subject: [PATCH 09/23] Simplify SU2 runscript

---
 perpendicular-flap/fluid-su2/run.sh | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/perpendicular-flap/fluid-su2/run.sh b/perpendicular-flap/fluid-su2/run.sh
index c62c49063..4ac37320a 100755
--- a/perpendicular-flap/fluid-su2/run.sh
+++ b/perpendicular-flap/fluid-su2/run.sh
@@ -1,25 +1,8 @@
-#!/bin/bash
+#!/bin/sh
+set -e -u
 
-# Fluid participant
-
-# Run this script in one terminal and the "runSolid" script in another terminal.
-# These scripts present how the two participants would be started manually.
-# Alternatively, you may execute the "Allrun" script in one terminal.
-
-# Run this script with "-parallel" for parallel simulations
-
-# The script "Allclean" cleans-up the result and log files.
-
-# 1 for true, 0 for false
-parallel=0
 if [ "$1" = "-parallel" ]; then
-    parallel=1
-fi
-
-echo "Preparing and running the Fluid participant..."
-
-if [ $parallel -eq 1 ]; then
-    mpirun -n 2 SU2_CFD euler_config_coupled.cfg 2>&1 | tee fluid-su2.log
+    mpirun -n 2 SU2_CFD euler_config_coupled.cfg
 else
-    SU2_CFD euler_config_coupled.cfg 2>&1 | tee fluid-su2.log
+    SU2_CFD euler_config_coupled.cfg
 fi

From d9c9121760bd8ff0a33893427960c4e14c97158b Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 12:58:28 +0200
Subject: [PATCH 10/23] Remove duplicate plotDisplacement.sh

---
 perpendicular-flap/plotDisplacement.sh | 21 ---------------------
 1 file changed, 21 deletions(-)
 delete mode 100644 perpendicular-flap/plotDisplacement.sh

diff --git a/perpendicular-flap/plotDisplacement.sh b/perpendicular-flap/plotDisplacement.sh
deleted file mode 100644
index c34258961..000000000
--- a/perpendicular-flap/plotDisplacement.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = "" ]; then
-    echo "No target directory specified. Please specify the directory of the solid participant containing the watchpoint, e.g. ./plot-displacement.sh solid-fenics."
-    exit 1
-fi
-
-FILE="$1/precice-Solid-watchpoint-Flap-Tip.log"
-
-if [ ! -f "$FILE" ]; then
-    echo "Unable to locate the watchpoint file (precice-Solid-watchpoint-Flap-Tip.log) in the specified solid directory '${1}'. Make sure the specified directory matches the solid participant you used for the calculations."
-    exit 1
-fi
- 
-gnuplot -p << EOF                                                               
-	set grid                                                                        
-	set title 'x-displacement of the flap tip'                                        
-	set xlabel 'time [s]'                                                           
-	set ylabel 'x-displacement [m]'                                                 
-	plot "$1/precice-Solid-watchpoint-Flap-Tip.log" using 1:4 with lines title "$1"
-EOF

From cd2b6196a85a6f96768f1efb1cc2e0afa23766c6 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 13:01:55 +0200
Subject: [PATCH 11/23] Remove deprecated log cleaning commands

---
 perpendicular-flap/fluid-su2/clean.sh      | 1 -
 perpendicular-flap/solid-calculix/clean.sh | 1 -
 2 files changed, 2 deletions(-)

diff --git a/perpendicular-flap/fluid-su2/clean.sh b/perpendicular-flap/fluid-su2/clean.sh
index 231d56948..54a3623e3 100755
--- a/perpendicular-flap/fluid-su2/clean.sh
+++ b/perpendicular-flap/fluid-su2/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_su2 .
-rm -fv fluid-su2.log
diff --git a/perpendicular-flap/solid-calculix/clean.sh b/perpendicular-flap/solid-calculix/clean.sh
index 51404fba9..e93f04f3c 100755
--- a/perpendicular-flap/solid-calculix/clean.sh
+++ b/perpendicular-flap/solid-calculix/clean.sh
@@ -4,4 +4,3 @@ set -e -u
 . ../../tools/cleaning-tools.sh
 
 clean_calculix .
-rm -fv Solid.log

From 43a6e31c404d3477944b8825ab553ee8319b0937 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 13:12:25 +0200
Subject: [PATCH 12/23] Tidy up FEniCS run and clean scripts

---
 flow-over-heated-plate/solid-fenics/run.sh       | 11 ++---------
 .../fenics/Allclean                              | 11 -----------
 .../fenics/clean.sh                              |  6 ++++++
 .../fenics/run.sh                                | 13 +++++++++++++
 partitioned-heat-conduction/fenics/.gitignore    |  5 -----
 partitioned-heat-conduction/fenics/clean.sh      |  4 +---
 partitioned-heat-conduction/fenics/run.sh        |  4 +++-
 perpendicular-flap/solid-fenics/run.sh           | 16 +++-------------
 tools/cleaning-tools.sh                          |  2 +-
 turek-hron-fsi3/solid-fenics/run.sh              |  4 ++++
 10 files changed, 33 insertions(+), 43 deletions(-)
 delete mode 100755 partitioned-heat-conduction-complex/fenics/Allclean
 create mode 100755 partitioned-heat-conduction-complex/fenics/clean.sh
 create mode 100755 partitioned-heat-conduction-complex/fenics/run.sh
 create mode 100755 turek-hron-fsi3/solid-fenics/run.sh

diff --git a/flow-over-heated-plate/solid-fenics/run.sh b/flow-over-heated-plate/solid-fenics/run.sh
index 9c6b96a51..15315c67d 100755
--- a/flow-over-heated-plate/solid-fenics/run.sh
+++ b/flow-over-heated-plate/solid-fenics/run.sh
@@ -1,11 +1,4 @@
-#!/bin/bash
-
-# Solid participant
-
-# Run this script in one terminal and the "runFluid" script in another terminal.
-# These scripts present how the two participants would be started manually.
-# Alternatively, you may execute the "Allrun" script in one terminal.
-
-# The script "Allclean" cleans-up the result and log files.
+#!/bin/sh
+set -e -u
 
 python3 solid.py
diff --git a/partitioned-heat-conduction-complex/fenics/Allclean b/partitioned-heat-conduction-complex/fenics/Allclean
deleted file mode 100755
index 1dbf98f13..000000000
--- a/partitioned-heat-conduction-complex/fenics/Allclean
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-echo "Cleaning logs and output files from previous runs..."
-
-rm -r precice-run/
-
-rm out/* 
-
-rm -f *.log
-
-echo "Cleaning successful!"
diff --git a/partitioned-heat-conduction-complex/fenics/clean.sh b/partitioned-heat-conduction-complex/fenics/clean.sh
new file mode 100755
index 000000000..3a8b4619d
--- /dev/null
+++ b/partitioned-heat-conduction-complex/fenics/clean.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e -u
+
+. ../../tools/cleaning-tools.sh
+
+clean_fenics .
diff --git a/partitioned-heat-conduction-complex/fenics/run.sh b/partitioned-heat-conduction-complex/fenics/run.sh
new file mode 100755
index 000000000..0109ad26c
--- /dev/null
+++ b/partitioned-heat-conduction-complex/fenics/run.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e -u
+
+while getopts ":dn" opt; do
+  case ${opt} in
+    d ) python3 heat.py -d --error-tol 10e-3
+      ;;
+    n ) python3 heat.py -n --error-tol 10e-3
+      ;;
+    \? ) echo "Usage: cmd [-d] [-n]"
+      ;;
+  esac
+done
diff --git a/partitioned-heat-conduction/fenics/.gitignore b/partitioned-heat-conduction/fenics/.gitignore
index 3cf3e6819..7c6571e48 100644
--- a/partitioned-heat-conduction/fenics/.gitignore
+++ b/partitioned-heat-conduction/fenics/.gitignore
@@ -1,7 +1,2 @@
-*.txt
 venv
-.idea
 *.pyc
-out
-*.log
-*events.json
diff --git a/partitioned-heat-conduction/fenics/clean.sh b/partitioned-heat-conduction/fenics/clean.sh
index da80b515d..3a8b4619d 100755
--- a/partitioned-heat-conduction/fenics/clean.sh
+++ b/partitioned-heat-conduction/fenics/clean.sh
@@ -3,6 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-rm -rf out
-rm -f *.log
-rm -f *-events.json
+clean_fenics .
diff --git a/partitioned-heat-conduction/fenics/run.sh b/partitioned-heat-conduction/fenics/run.sh
index 0075dfac2..0109ad26c 100755
--- a/partitioned-heat-conduction/fenics/run.sh
+++ b/partitioned-heat-conduction/fenics/run.sh
@@ -1,3 +1,6 @@
+#!/bin/sh
+set -e -u
+
 while getopts ":dn" opt; do
   case ${opt} in
     d ) python3 heat.py -d --error-tol 10e-3
@@ -8,4 +11,3 @@ while getopts ":dn" opt; do
       ;;
   esac
 done
-
diff --git a/perpendicular-flap/solid-fenics/run.sh b/perpendicular-flap/solid-fenics/run.sh
index 74e2547aa..de18f9e63 100755
--- a/perpendicular-flap/solid-fenics/run.sh
+++ b/perpendicular-flap/solid-fenics/run.sh
@@ -1,14 +1,4 @@
-#!/bin/bash
+#!/bin/sh
+set -e -u
 
-# Solid participant
-
-# Run this script in one terminal and the "runFluid" script in another terminal.
-# These scripts present how the two participants would be started manually.
-# Alternatively, you may execute the "Allrun" script in one terminal.
-
-# The script "Allclean" cleans-up the result and log files.
-
-echo "Running the Solid participant..."
-
-# Run
-python3 perp-flap.py 2>&1 | tee solid-fenics.log
+python3 perp-flap.py
diff --git a/tools/cleaning-tools.sh b/tools/cleaning-tools.sh
index b712b8f2f..c55a45559 100755
--- a/tools/cleaning-tools.sh
+++ b/tools/cleaning-tools.sh
@@ -72,7 +72,7 @@ clean_fenics() {
         set -e -u
         cd "$1"
         echo "--- Cleaning up FEniCS case in $(pwd)"
-        rm -fv ./*.pvd spooles.out FSI-S/*
+        rm -fv ./*.pvd spooles.out out FSI-S/*
         clean_precice_logs .
     )
 }
diff --git a/turek-hron-fsi3/solid-fenics/run.sh b/turek-hron-fsi3/solid-fenics/run.sh
new file mode 100755
index 000000000..452b2b9d9
--- /dev/null
+++ b/turek-hron-fsi3/solid-fenics/run.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e -u
+
+python3 cyl-flap.py

From 75fa6498674f30e30c7d20048fb0ec91c5fee10c Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 13:18:53 +0200
Subject: [PATCH 13/23] Tidy up Nutils run and clean scripts

---
 flow-over-heated-plate/solid-nutils/run.sh    |  4 +---
 .../fenics/run.sh                             | 15 +++++++-----
 partitioned-heat-conduction/fenics/run.sh     | 15 +++++++-----
 partitioned-heat-conduction/nutils/clean.sh   |  5 +---
 partitioned-heat-conduction/nutils/run.sh     | 23 +++++++++++--------
 perpendicular-flap/fluid-nutils/run.sh        |  7 ++----
 tools/cleaning-tools.sh                       |  1 +
 7 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/flow-over-heated-plate/solid-nutils/run.sh b/flow-over-heated-plate/solid-nutils/run.sh
index ca852ca51..21bd5c3b1 100755
--- a/flow-over-heated-plate/solid-nutils/run.sh
+++ b/flow-over-heated-plate/solid-nutils/run.sh
@@ -1,7 +1,5 @@
 #!/bin/bash
+set -e -u
 
-# Solid participant
-
-# Run
 python3 solid.py
 
diff --git a/partitioned-heat-conduction-complex/fenics/run.sh b/partitioned-heat-conduction-complex/fenics/run.sh
index 0109ad26c..e31f07a10 100755
--- a/partitioned-heat-conduction-complex/fenics/run.sh
+++ b/partitioned-heat-conduction-complex/fenics/run.sh
@@ -3,11 +3,14 @@ set -e -u
 
 while getopts ":dn" opt; do
   case ${opt} in
-    d ) python3 heat.py -d --error-tol 10e-3
-      ;;
-    n ) python3 heat.py -n --error-tol 10e-3
-      ;;
-    \? ) echo "Usage: cmd [-d] [-n]"
-      ;;
+  d)
+    python3 heat.py -d --error-tol 10e-3
+    ;;
+  n)
+    python3 heat.py -n --error-tol 10e-3
+    ;;
+  \?)
+    echo "Usage: cmd [-d] [-n]"
+    ;;
   esac
 done
diff --git a/partitioned-heat-conduction/fenics/run.sh b/partitioned-heat-conduction/fenics/run.sh
index 0109ad26c..e31f07a10 100755
--- a/partitioned-heat-conduction/fenics/run.sh
+++ b/partitioned-heat-conduction/fenics/run.sh
@@ -3,11 +3,14 @@ set -e -u
 
 while getopts ":dn" opt; do
   case ${opt} in
-    d ) python3 heat.py -d --error-tol 10e-3
-      ;;
-    n ) python3 heat.py -n --error-tol 10e-3
-      ;;
-    \? ) echo "Usage: cmd [-d] [-n]"
-      ;;
+  d)
+    python3 heat.py -d --error-tol 10e-3
+    ;;
+  n)
+    python3 heat.py -n --error-tol 10e-3
+    ;;
+  \?)
+    echo "Usage: cmd [-d] [-n]"
+    ;;
   esac
 done
diff --git a/partitioned-heat-conduction/nutils/clean.sh b/partitioned-heat-conduction/nutils/clean.sh
index b1450fa8e..6684cc729 100755
--- a/partitioned-heat-conduction/nutils/clean.sh
+++ b/partitioned-heat-conduction/nutils/clean.sh
@@ -3,7 +3,4 @@ set -e -u
 
 . ../../tools/cleaning-tools.sh
 
-rm -f Dirichlet-*.vtk
-rm -f Neumann-*.vtk
-rm -f *.log
-rm -f *-events.json
+clean_nutils
diff --git a/partitioned-heat-conduction/nutils/run.sh b/partitioned-heat-conduction/nutils/run.sh
index defb2b9d1..43e97b70f 100755
--- a/partitioned-heat-conduction/nutils/run.sh
+++ b/partitioned-heat-conduction/nutils/run.sh
@@ -1,13 +1,18 @@
+#!/bin/sh
+set -e -u
+
 while getopts ":dn" opt; do
   case ${opt} in
-    d ) rm -rf Dirichlet-*.vtk
-        python3 heat.py --side=Dirichlet
-      ;;
-    n ) rm -rf Neumann-*.vtk
-	python3 heat.py --side=Neumann
-      ;;
-    \? ) echo "Usage: cmd [-d] [-n]"
-      ;;
+  d)
+    rm -rf Dirichlet-*.vtk
+    python3 heat.py --side=Dirichlet
+    ;;
+  n)
+    rm -rf Neumann-*.vtk
+    python3 heat.py --side=Neumann
+    ;;
+  \?)
+    echo "Usage: cmd [-d] [-n]"
+    ;;
   esac
 done
-
diff --git a/perpendicular-flap/fluid-nutils/run.sh b/perpendicular-flap/fluid-nutils/run.sh
index d9d30595d..a3adfa5f8 100755
--- a/perpendicular-flap/fluid-nutils/run.sh
+++ b/perpendicular-flap/fluid-nutils/run.sh
@@ -1,7 +1,4 @@
-#!/bin/bash
+#!/bin/sh
+set -e -u
 
-# Solid participant
-
-# Run
 python3 nsale.py
-
diff --git a/tools/cleaning-tools.sh b/tools/cleaning-tools.sh
index c55a45559..f7bba32e6 100755
--- a/tools/cleaning-tools.sh
+++ b/tools/cleaning-tools.sh
@@ -82,6 +82,7 @@ clean_nutils() {
         set -e -u
         cd "$1"
         echo "--- Cleaning up Nutils case in $(pwd)"
+        rm -fv ./*.vtk
         clean_precice_logs .
     )
 }

From 240973875fe955285ab0459b421718a1adb35ab1 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 13:21:13 +0200
Subject: [PATCH 14/23] Tidy up code_aster run script

---
 .../solid-codeaster/run.sh                             | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/flow-over-heated-plate-steady-state/solid-codeaster/run.sh b/flow-over-heated-plate-steady-state/solid-codeaster/run.sh
index 9cf027fc9..26c5f3d18 100755
--- a/flow-over-heated-plate-steady-state/solid-codeaster/run.sh
+++ b/flow-over-heated-plate-steady-state/solid-codeaster/run.sh
@@ -1,4 +1,6 @@
-#!/bin/bash
-    export TUTORIAL_ROOT=${PWD}
-    export PRECICE_PARTICIPANT=Solid
-    as_run --run solid.export
+#!/bin/sh
+set -e -u
+
+export TUTORIAL_ROOT=${PWD}
+export PRECICE_PARTICIPANT=Solid
+as_run --run solid.export

From 45b3876f6acb82bf85df625b837e028dcfc69a51 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 15:27:56 +0200
Subject: [PATCH 15/23] Clarify heat exchanger CalculiX gitignore, add 'dummy'
 to clean targets

---
 heat-exchanger/solid-calculix/.gitignore | 3 +--
 tools/cleaning-tools.sh                  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/heat-exchanger/solid-calculix/.gitignore b/heat-exchanger/solid-calculix/.gitignore
index 99a7ca5ad..b138a63c9 100644
--- a/heat-exchanger/solid-calculix/.gitignore
+++ b/heat-exchanger/solid-calculix/.gitignore
@@ -1,7 +1,6 @@
-# Auxiliary files, or files downloaded via download-meshes.sh
+# Files distributed separately, downloaded via download-meshes.sh
 adiabatic.dfl
 all.msh
-dummy
 inner-interface.flm
 inner-interface.nam
 inner-interface.sur
diff --git a/tools/cleaning-tools.sh b/tools/cleaning-tools.sh
index f7bba32e6..d848af4fb 100755
--- a/tools/cleaning-tools.sh
+++ b/tools/cleaning-tools.sh
@@ -41,7 +41,7 @@ clean_calculix() {
         set -e -u
         cd "$1"
         echo "--- Cleaning up CalculiX case in $(pwd)"
-        rm -fv ./*.cvg ./*.dat ./*.frd ./*.sta ./*.12d spooles.out
+        rm -fv ./*.cvg ./*.dat ./*.frd ./*.sta ./*.12d spooles.out dummy
         clean_precice_logs .
     )
 }

From 5b5acab897f8dc880bff0c25d9a530b7ebd58145 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 17:33:19 +0200
Subject: [PATCH 16/23] Add warning for preparing code_aster case

---
 flow-over-heated-plate-steady-state/solid-codeaster/run.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/flow-over-heated-plate-steady-state/solid-codeaster/run.sh b/flow-over-heated-plate-steady-state/solid-codeaster/run.sh
index 26c5f3d18..a3ebd9d8a 100755
--- a/flow-over-heated-plate-steady-state/solid-codeaster/run.sh
+++ b/flow-over-heated-plate-steady-state/solid-codeaster/run.sh
@@ -1,6 +1,10 @@
 #!/bin/sh
 set -e -u
 
+echo "Warning: this case requires a manual preparation step for code_aster."
+echo "See the tutorial and code_aster adapter documentation pages for more:"
+echo "https://www.precice.org/adapter-code_aster.html\n"
+
 export TUTORIAL_ROOT=${PWD}
 export PRECICE_PARTICIPANT=Solid
 as_run --run solid.export

From 577af4f56cd0964d7db7816043bb9f522ec1e0e0 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 18:32:45 +0200
Subject: [PATCH 17/23] Update documentation

---
 README.md                                          | 14 ++++++++------
 .../README.md                                      |  2 +-
 flow-over-heated-plate-steady-state/README.md      |  8 +++-----
 flow-over-heated-plate/README.md                   | 10 +++++-----
 heat-exchanger/README.md                           |  8 ++++----
 multiple-perpendicular-flaps/README.md             |  2 +-
 partitioned-elastic-beam/README.md                 |  2 +-
 partitioned-heat-conduction/README.md              | 13 ++++++-------
 perpendicular-flap/README.md                       |  2 +-
 turek-hron-fsi3/README.md                          | 13 +++++--------
 10 files changed, 35 insertions(+), 39 deletions(-)

diff --git a/README.md b/README.md
index 7d9a00a42..a9108cdff 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,18 @@
 # preCICE Tutorials
 
 This repository contains ready-to-run tutorial cases for the coupling library [preCICE](http://www.precice.org/).
+The purpose of these cases are not to teach you how to use preCICE, but to serve as starting points for setting up similar simulation cases.
 
-You may find step-by-step instructions for each case in the [preCICE wiki](https://github.com/precice/precice/wiki). *More tutorials come with each adapter* and you can also find them in the wiki.
+Each folder in this directory represents a stand-alone tutorial case containing:
+* a `README.md` with general instructions on how to run the simulation. This is the same content you see on the [preCICE tutorials](https://www.precice.org/tutorials.html) documentation section.
+* multiple participant folders with the format `<participant>-<solver>`. Pick a solver for each participant and start them to run the simulation.
+* a `clean.sh` script to clean each individual participant case, a `clean-tutorial.sh` to clean all participants of a tutorial case, a `clean-all.sh` to clean all tutorial cases.
 
+As a general rule, you can start each participant from inside their `<participant>-<solver>` using `./run.sh`. Look into these short scripts and copy the parts you need for your new case.
 
-Each folder in this directory represents a stand-alone tutorial containing:
-* a `README.md` with general instructions on how to run the simulation
-* multiple participant folders with the format `<participant>_<solver>`. Pick a solver for each participant and start them to run the simulation.
+## For contributors
 
-
-The website import relies on the following rules:
+The [preCICE tutorials](https://www.precice.org/tutorials.html) documentation section displays material from this repository. This website import relies on the following rules:
 * tutorials use dashes to separate words `flow-over-heated-plate`.
 * a tutorial contains a `REAMDE.md` with a Jekyll front-matter and a `permalink: /tutorials-flow-over-heated-plate.html`.
 * a tutorial may contain a folder `images/` with images to be displayed in the `README.md`.  
diff --git a/flow-over-heated-plate-nearest-projection/README.md b/flow-over-heated-plate-nearest-projection/README.md
index 0dd77c0f4..29a010d9e 100644
--- a/flow-over-heated-plate-nearest-projection/README.md
+++ b/flow-over-heated-plate-nearest-projection/README.md
@@ -67,6 +67,6 @@ Visualizing these files (e.g. using ParaView) will show a triangular mesh, even
 
 ![triangulated](https://user-images.githubusercontent.com/33414590/55974257-96b07d80-5c87-11e9-9965-972b922c483d.png)
 
-Note: Connectivity is defined on meshes associated with mesh nodes, which are named respectively e.g. `Fluid-Mesh-Nodes`. In this case, you could directly see the interface without applying filters by loading the `.vtk` files. In order to visualize additionally center based meshes, where no connectivity is provided, select a Glyph filter in ParaView. Furthermore, it makes a difference, on which participant the `<export...` tag is defined in your `precice-config.xml` file. Each participant exports interface meshes, which he provides or receives. The receiving participant filters out mesh parts that it does not need (for the mapping). Hence, a received mesh might look incomplete.
+Connectivity is defined on meshes associated with mesh nodes, which are named respectively e.g. `Fluid-Mesh-Nodes`. In this case, you could directly see the interface without applying filters by loading the `.vtk` files. In order to visualize additionally center based meshes, where no connectivity is provided, select a Glyph filter in ParaView. Furthermore, it makes a difference, on which participant the `<export...` tag is defined in your `precice-config.xml` file. Each participant exports interface meshes, which he provides or receives. The receiving participant filters out mesh parts that it does not need (for the mapping). Hence, a received mesh might look incomplete.
 
 {% include disclaimer.html content="This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM®  and OpenCFD®  trade marks." %}
diff --git a/flow-over-heated-plate-steady-state/README.md b/flow-over-heated-plate-steady-state/README.md
index 5d42e29a2..200797b82 100644
--- a/flow-over-heated-plate-steady-state/README.md
+++ b/flow-over-heated-plate-steady-state/README.md
@@ -9,7 +9,7 @@ summary: Using a steady-state OpenFOAM solver for a CHT coupling with Code_Aster
 
 ## Setup
 
-The setup for this tutorial is similar to the [flow over a heated plate](tutorials-flow-over-heated-plate.html) using OpenFOAM. In this tutorial OpenFOAM is used as the solver for the fluid domain, and Code-Aster is the solver for the solid domain. A difference here is that we are using a steady-state OpenFOAM solver for demonstration purposes, therefore the results between the two tutorials are not comparable.
+The setup for this tutorial is similar to the [flow over a heated plate](tutorials-flow-over-heated-plate.html) using OpenFOAM. In this tutorial OpenFOAM is used as the solver for the fluid domain, and code_aster is the solver for the solid domain. A difference here is that we are using a steady-state OpenFOAM solver for demonstration purposes, therefore the results between the two tutorials are not comparable.
 
 
 ## Available solvers
@@ -20,7 +20,7 @@ Fluid participant:
 
 Solid participant:
 
-* Code_Aster. The [Code_Aster adapter documentation](adapter-code_aster.html) is oriented on this tutorial case. In particular the described configuration settings.
+* Code_Aster. The [code_aster adapter documentation](adapter-code_aster.html) is oriented on this tutorial case. In particular the described configuration settings.
 
 ## Running the Simulation
 
@@ -30,12 +30,10 @@ Open two separate terminals and start each participant by calling the respective
 
 Firstly, enable the ParaViS view in Salome-Meca by selecting the icon in the top of the screen.
 
-For visualizing the results of the fluid solver, go to `File -> Open ParaView File` and select the `.foam` file. If you're asked to choose a reader, please select `OpenFOAMReader` and click `Apply` to visualize the result.
+For visualizing the results of the fluid solver, go to `File -> Open ParaView File` and select the `fluid-openfoam.foam` file. If you're asked to choose a reader, please select `OpenFOAMReader` and click `Apply` to visualize the result.
 
 For visualizing the result of the solid solver, press again `Open ParaView File` and select the `output-..rmed` group. Again, click `Apply` to visualize the result. After setting the temperature scale for both domains to 300-310 K, the following result is given for timestep 200:
 
 ![post-processing](images/tutorials-flow-over-heated-plate-steady-state-post-processing.png)
 
 {% include disclaimer.html content="This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM®  and OpenCFD®  trade marks." %}
-
-{% include disclaimer.html content="This offering is not approved or endorsed by Électricité de France (EDF), producer and distributor of the Code_Aster software via www.code-aster.org, and owner of the Code_Aster trademark." %}
diff --git a/flow-over-heated-plate/README.md b/flow-over-heated-plate/README.md
index 5304b480e..b810d9150 100644
--- a/flow-over-heated-plate/README.md
+++ b/flow-over-heated-plate/README.md
@@ -10,13 +10,13 @@ summary: This tutorial describes how to run a conjugate heat transfer coupled si
 
 ## Setup
 
-This scenario consists of one fluid and one solid participant and it is inspired by Vynnycky et al. [1]. A fluid enters a channel with temperature `T_\infty`, where it comes in contact with a solid plate. The plate is heated at its bottom and has a constant temperature of `T_hot`.
+This scenario consists of one fluid and one solid participant and it is inspired by Vynnycky et al. [1]. A fluid enters a channel with temperature $$ T_\infty $$, where it comes in contact with a solid plate. The plate is heated at its bottom and has a constant temperature of $$ T_{hot} $$.
 
 ![img](images/tutorials-flow-over-heated-plate-example.png)
 
 The test case is two-dimensional and a serial-implicit coupling with Aitken underrelaxation is used for the coupling.
 
-The inlet velocity is `u_\infty = 0.1 m/s`, the inlet temperature is `T_\infty = 300K`. The fluid and solid have the same thermal conductivities `k_S = k_F = 100 W/m/K`. Further material properties of the fluid are its viscosity `mu = 0.0002 kg/m/s` and specific heat capacity `c_p = 5000 J/kg/K`. The Prandtl number `Pr = 0.01` follows from thermal conductivity, viscosity and specific heat capacity. The solid has the thermal diffusivity `\alpha = 1 m^2/s`. The gravitational acceleration is `g = 9.81 m/s^2`.
+The inlet velocity is $$ u_{\infty} = 0.1 m/s $$, the inlet temperature is $$ T_{\infty} = 300K $$. The fluid and solid have the same thermal conductivities $$ k_S = k_F = 100 W/m/K $$. Further material properties of the fluid are its viscosity $$ mu = 0.0002 kg/m/s $$ and specific heat capacity $$ c_p = 5000 J/kg/K $$. The Prandtl number $$ Pr = 0.01 $$ follows from thermal conductivity, viscosity and specific heat capacity. The solid has the thermal diffusivity $$ \alpha = 1 m^2/s $$. The gravitational acceleration is $$ g = 9.81 m/s^2 $$.
 
 ## Available solvers
 
@@ -45,18 +45,18 @@ and
 cd solid-fenics
 ./run.sh
 ```
-in order to use OpenFOAM and FEniCS for this test case.
+in order to use OpenFOAM and FEniCS for this test case. Feel free to try different combinations, they should all run and give approximately similar results.
 
 ## Post-processing
 
-How to visualize the simulation results depends on the selected solvers. Most of the solvers generate `vtk` files which can visualized using, e.g., ParaView.
+How to visualize the simulation results depends on the selected solvers. Most of the solvers generate VTK files which can visualized using ParaView or similar tools.
 An example of the visualized expected results looks as follows:
 
 ![result](images/tutorials-flow-over-heated-plate-result-openfoam.png)
 
 Observe that the temperature at the bottom of the plate is 310K and at the inlet 300K. On the interface, the temperature is between these values. An area of higher temperature is formed above the plate, which is shifted towards the front, driven by the flow.
 
-You may use additional filters, such as the Calculator and the Plot Over Line, to obtain the distribution of the non-dimensional temperature (T-T_inlet)/(T_solid-T_inlet):
+You may use additional filters, such as the Calculator and the Plot Over Line, to obtain the distribution of the non-dimensional temperature $$ (T-T_{inlet})/(T_{solid}-T_{inlet}) $$:
 
 ![graph](images/tutorials-flow-over-heated-plate-graph-result.png)
 
diff --git a/heat-exchanger/README.md b/heat-exchanger/README.md
index 3ceaeee3b..f4d3a8e4a 100644
--- a/heat-exchanger/README.md
+++ b/heat-exchanger/README.md
@@ -11,8 +11,6 @@ This tutorial describes how to run a conjugate heat transfer simulation with two
 
 This tutorial is based on [a case](https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/) prepared with [SimScale](https://www.simscale.com/) by [Lucia Cheung Yau](https://github.com/ludcila) for her [Master's Thesis](https://www5.in.tum.de/pub/Cheung2016_Thesis.pdf).
 
-{% include note.html content="Since the already prepared case contains mesh files of approx. 50MB in size, we host these files outside of the repository and you can download and extract them automatically in the appropriate locations by running the Download_meshes script. We plan to integrate the preparation part in this tutorial in the future." %}
-
 
 ## Setup
 
@@ -32,15 +30,17 @@ We define the participants `Inner-Fluid`, `Solid`, and `Outer-Fluid` and two int
 
 ## Running the Simulation
 
+{% include note.html content="Since the already prepared case contains mesh files of approx. 50MB in size, we currently host these files outside of the tutorials repository and you can download and extract them automatically in the appropriate locations by running the download-meshes.sh script." %}
+
 Before starting the simulation for the first time you need to download the mesh files and copy them into the appropriate location. The shell script `./download-meshes.sh` will handle these things automatically. Afterwards, the simulation setup is ready to run.
 
-In order to run the coupled simulation, you can simply step into the participant directories and execute`./run.sh` for run (or `./run.sh -parallel`) for a parallel run. The simulation will need approximately one hour on a modern laptop to end (t=500). Before repeating the simulation, you can use the `clean.sh` script to clean-up any previous results and log files.
+In order to run the coupled simulation, you can simply step into the participant directories and execute`./run.sh` (or `./run.sh -parallel` for running a fluid participant in parallel). The simulation will need several minutes or up to an hour on a laptop to end (t=500). Before repeating the simulation, you can use the `clean-tutorial.sh` script to clean-up any previous results and log files.
 
 ## Post-processing
 
 After the first results are written (a new time directory will be created), you may visualize the results.
 
-For the OpenFOAM results, you can use ParaView and open the allready-provided `fluid-inner-openfoam.foam` and `fluid-outer-openfoam.foam` files. If it is installed you may better use `paraFoam -case fluid-inner-openfoam` and load the fluid-outer-openfoam.foam through the ParaView menu. You can then group the two cases and visualize them together.
+For the OpenFOAM results, you can use ParaView and open the allready-provided `fluid-inner-openfoam.foam` and `fluid-outer-openfoam.foam` files. You can then group the two cases and visualize them together.
 
 Unfortunately, ParaView does not support CalculiX result files. You may see the results in CGX or convert them using 3rd-party tools.
 
diff --git a/multiple-perpendicular-flaps/README.md b/multiple-perpendicular-flaps/README.md
index 29d2cbd46..91f54fe58 100644
--- a/multiple-perpendicular-flaps/README.md
+++ b/multiple-perpendicular-flaps/README.md
@@ -93,7 +93,7 @@ The scenario settings are implemented similarly for the nonlinear case.
 
 ## Postprocessing
 
-After the simulation has finished, you can visualize your results using e.g. ParaView. Fluid results are in the OpenFOAM format and you may load the `Fluid.foam` file. Looking at the fluid results is enough to obtain information about the behaviour of the flaps. You can also visualize the solid participants' vtks though.
+After the simulation has finished, you can visualize your results using e.g. ParaView. Fluid results are in the OpenFOAM format and you may load the `fluid-openfoam.foam` file. Looking at the fluid results is enough to obtain information about the behaviour of the flaps. You can also visualize the solid participants' vtks though.
 
 ![](images/tutorials-multiple-perpendicular-flaps-results.png)
 
diff --git a/partitioned-elastic-beam/README.md b/partitioned-elastic-beam/README.md
index b47f4082b..18bfb044a 100644
--- a/partitioned-elastic-beam/README.md
+++ b/partitioned-elastic-beam/README.md
@@ -24,7 +24,7 @@ The prepared case already contains configuration and mesh files, so that the sim
 
 ## Post-processing
 
-To see an animated visualization of the results, you can run the script `./visualize.py`. It joins the `*.frd` output files of both participants to form a new file with the entire beam. Then, it calls `cgx`, since CalculiX results can only be visualized with this graphic tool. If you want to use e.g. Paraview, you may use converting tools.
+To see an animated visualization of the results, you can run the script `./visualize.py`. It joins the `*.frd` output files of both participants to form a new file with the entire beam. Then, it calls `cgx`, since CalculiX results can only be visualized with this graphic tool. If you want to use e.g. ParaView, you may use converting tools.
 
 ![beam results](images/tutorials-partitioned-elastic-beam-results.png)
 
diff --git a/partitioned-heat-conduction/README.md b/partitioned-heat-conduction/README.md
index bdbebbbd9..4705e4c22 100644
--- a/partitioned-heat-conduction/README.md
+++ b/partitioned-heat-conduction/README.md
@@ -15,7 +15,7 @@ We solve a partitioned heat equation. For information on the non-partitioned cas
 
 Case setup from [3]. `D` denotes the Dirichlet participant and `N` denotes the Neumann participant.
 
-The heat equation is solved on a rectangular domain `Omega = [0,2] x [0,1]` with given Dirichlet boundary conditions. We split the domain at `x_c = 1` using a straight vertical line, the coupling interface. The left part of the domain will be referred to as the Dirichlet partition and the right part as the Neumann partition. To couple the two participant we use Dirichlet-Neumann coupling. Here, the Dirichlet participant receives Dirichlet boundary conditions (`Temperature`) at the coupling interface and solves the heat equation using these boundary conditions on the left part of the domain. Then the Dirichlet participant computes the resulting heat flux (`Flux`) from the solution and sends it to the Neumann participant. The Neumann participant uses the flux as a Neumann boundary condition to solve the heat equation on the right part of the domain. We then extract the temperature from the solution and send it back to the Dirichlet participant. This establishes the coupling between the two participants.
+The heat equation is solved on a rectangular domain `Omega = [0,2] x [0,1]` with given Dirichlet boundary conditions. We split the domain at `x_c = 1` using a straight vertical line, the coupling interface. The left part of the domain will be referred to as the Dirichlet partition and the right part as the Neumann partition. To couple the two participants we use Dirichlet-Neumann coupling. Here, the Dirichlet participant receives Dirichlet boundary conditions (`Temperature`) at the coupling interface and solves the heat equation using these boundary conditions on the left part of the domain. Then the Dirichlet participant computes the resulting heat flux (`Flux`) from the solution and sends it to the Neumann participant. The Neumann participant uses the flux as a Neumann boundary condition to solve the heat equation on the right part of the domain. We then extract the temperature from the solution and send it back to the Dirichlet participant. This establishes the coupling between the two participants.
 
 This simple case allows us to compare the solution for the partitioned case to a known analytical solution (method of manufactures solutions, see [1, p.37ff]). For more usage examples and details, please refer to [3, sect. 4.1].
 
@@ -23,10 +23,9 @@ This simple case allows us to compare the solution for the partitioned case to a
 
 You can either couple a solver with itself or different solvers with each other. In any case you will need to have preCICE and the python bindings installed on your system.
 
-* `fenics`, requires you to install [FEniCS](https://fenicsproject.org/download/) and the [FEniCS-adapter](https://github.com/precice/fenics-adapter). The code is largely based on this [fenics-tutorial](https://github.com/hplgit/fenics-tutorial/blob/master/pub/python/vol1/ft03_heat.py) from [1].
+* FEniCS. Install [FEniCS](https://fenicsproject.org/download/) and the [FEniCS-adapter](https://github.com/precice/fenics-adapter). The code is largely based on this [fenics-tutorial](https://github.com/hplgit/fenics-tutorial/blob/master/pub/python/vol1/ft03_heat.py) from [1].
 
-
-* `nutils`, requires you to install [Nutils](http://www.nutils.org/en/latest/).
+* Nutils. Install [Nutils](http://www.nutils.org/en/latest/).
 
 ## Running the simulation
 
@@ -41,20 +40,20 @@ For running the case, open two terminals run:
 
 ```
 cd fenics
-python3 ./run.sh -d
+./run.sh -d
 ```
 
 and
 
 ```
 cd fenics
-python3 ./run.sh -n
+./run.sh -n
 ```
 
 If you want to use Nutils for one or both sides of the setup, just `cd nutils`. The FEniCS case also supports parallel runs. Here, you cannot use the `run.sh` script, but must simply execute
 
 ```
-mpirun -n <N_PROC> python3 heat.py -d
+mpirun -n <N_PROC> heat.py -d
 ```
 
 ### Note on the combination of Nutils & FEniCS
diff --git a/perpendicular-flap/README.md b/perpendicular-flap/README.md
index e682d2940..69a21851e 100644
--- a/perpendicular-flap/README.md
+++ b/perpendicular-flap/README.md
@@ -13,7 +13,7 @@ We model a two-dimensional fluid flowing through a channel. A solid, elastic fla
 
 ![Flap setup](images/tutorials-perpendicular-flap-setup-drawing.png)
 
-The simulated flow domain is 6 units long (x) and 4 units tall (y). The flap is located at the center of the bottom (x=0) and is 1 unit long (y) and 0.1 units thick (x). We set the fluid density $\{rho}_F= 1.0kg/m^{3}$, the kinematic viscosity $\{nu}_f= 1.0m^{2}/s$, the solid density $\{rho}_s= 3.0·10^{3}kg/m^{3}$, the Young’s modulus to $E= 4.0·10^{6} kg/ms^{2}$and the Poisson ratio $\{nu}_s = 0.3$. On the left boundary a constant inflow profile in x-direction of 10m/s is prescribed. The right boundary is an outflow and the top and bottom of the channel as well as the surface of the flap are no-slip walls.
+The simulated flow domain is 6 units long (x) and 4 units tall (y). The flap is located at the center of the bottom (x=0) and is 1 unit long (y) and 0.1 units thick (x). We set the fluid density $$ \{rho}_F= 1.0kg/m^{3} $$, the kinematic viscosity $$ \{nu}_f= 1.0m^{2}/s $$, the solid density $$ \{rho}_s= 3.0·10^{3}kg/m^{3} $$, the Young’s modulus to $$ E= 4.0·10^{6} kg/ms^{2} $$ and the Poisson ratio $$ \{nu}_s = 0.3 $$. On the left boundary a constant inflow profile in x-direction of 10m/s is prescribed. The right boundary is an outflow and the top and bottom of the channel as well as the surface of the flap are no-slip walls.
 
 ## Available solvers
 
diff --git a/turek-hron-fsi3/README.md b/turek-hron-fsi3/README.md
index e774c1a06..b1ea09281 100644
--- a/turek-hron-fsi3/README.md
+++ b/turek-hron-fsi3/README.md
@@ -26,7 +26,9 @@ Fluid participant:
 Solid participant:
 
 * deal.II. For more information, have a look at the [deal.II adapter documentation](adapter-dealii-overview.html). This tutorial requires the nonlinear solid solver. Please copy the nonlinear solver executable to the `solid-dealii` folder or make it discoverable at runtime and update the `solid-dealii/run.sh` script.
-* FEniCS.
+* FEniCS. For more information, have a look at the [FEniCS adapter documentation](adapter-fenics.html).
+
+As this is a benchmark case, note that we currently only consider the OpenFOAM-deal.II results as valid.
 
 ## Running the Simulation
 
@@ -41,11 +43,6 @@ and
 cd solid-dealii
 ./run.sh
 ```
-or
-```
-cd solid-fenics
-./run.sh
-```
 
 You can also run OpenFOAM in parallel by `./run.sh -parallel`. The default setting here uses 25 MPI ranks. You can change this setting in `fluid-openfoam/system/decomposeParDict`.
 For older OpenFOAM versions, the solver name will differ. If you are using OpenFOAM v1712 / 5.x or older have a look in the `fluid-openfoam/system/controlDict` file and set the appropriate solver name.
@@ -57,7 +54,7 @@ In the first few timesteps, many coupling iterations are required for convergenc
 
 ## Post-processing
 
-You can visualize the results of the coupled simulation using e.g. ParaView. Fluid results are in the OpenFOAM format and you may load the `Fluid.foam` file. Solid results are in VTK format.
+You can visualize the results of the coupled simulation using e.g. ParaView. Fluid results are in the OpenFOAM format and you may load the `fluid-openfoam.foam` file. Solid results are in VTK format.
 
 If you want to visualize both domains with ParaView, keep in mind that the deal.II solver writes results every few timesteps, while the OpenFOAM solver writes in reference to simulated time. For this reason, make sure that you use compatible write intervals. You may also need to convert the OpenFOAM results to VTK (with the command `foamToVTK`).
 
@@ -68,7 +65,7 @@ Moreover, as we defined a watchpoint at the flap tip (see `precice-config.xml`),
 
 ![FSI3 watchpoint](images/tutorials-turek-hron-fsi3-tip-plot.png)
 
-Before running the simulation again, you may want to cleanup any result files using the script `Allclean`.
+Before running the simulation again, you may want to cleanup any result files using the script `clean-tutorial.sh`.
 
 ## Mesh refinement
 

From e169ad334fceea274f53c11085177645ee3abe7b Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 18:48:09 +0200
Subject: [PATCH 18/23] Move call to openfoam_remove_empty_dirs to run.sh

---
 elastic-tube-3d/fluid-openfoam/run.sh                           | 1 +
 flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh | 1 +
 flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh | 1 +
 flow-over-heated-plate-steady-state/fluid-openfoam/run.sh       | 1 +
 flow-over-heated-plate/fluid-openfoam/run.sh                    | 1 +
 flow-over-heated-plate/solid-openfoam/run.sh                    | 1 +
 heat-exchanger/fluid-inner-openfoam/run.sh                      | 1 +
 heat-exchanger/fluid-outer-openfoam/run.sh                      | 1 +
 multiple-perpendicular-flaps/fluid-openfoam/run.sh              | 1 +
 perpendicular-flap/fluid-openfoam/run.sh                        | 1 +
 tools/run-openfoam.sh                                           | 2 --
 turek-hron-fsi3/fluid-openfoam/run.sh                           | 1 +
 12 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/elastic-tube-3d/fluid-openfoam/run.sh b/elastic-tube-3d/fluid-openfoam/run.sh
index 03c4c9c14..c305d6d9b 100755
--- a/elastic-tube-3d/fluid-openfoam/run.sh
+++ b/elastic-tube-3d/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ cp -r constant/polyMesh.orig constant/polyMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
index d5427df4a..c191b9e48 100755
--- a/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
index 21d71edb6..57e9395ee 100755
--- a/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
+++ b/flow-over-heated-plate-nearest-projection/solid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch solid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
index d5427df4a..c191b9e48 100755
--- a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/flow-over-heated-plate/fluid-openfoam/run.sh b/flow-over-heated-plate/fluid-openfoam/run.sh
index d5427df4a..c191b9e48 100755
--- a/flow-over-heated-plate/fluid-openfoam/run.sh
+++ b/flow-over-heated-plate/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/flow-over-heated-plate/solid-openfoam/run.sh b/flow-over-heated-plate/solid-openfoam/run.sh
index 21d71edb6..57e9395ee 100755
--- a/flow-over-heated-plate/solid-openfoam/run.sh
+++ b/flow-over-heated-plate/solid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch solid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/heat-exchanger/fluid-inner-openfoam/run.sh b/heat-exchanger/fluid-inner-openfoam/run.sh
index 256501ccb..6f176ba93 100755
--- a/heat-exchanger/fluid-inner-openfoam/run.sh
+++ b/heat-exchanger/fluid-inner-openfoam/run.sh
@@ -4,3 +4,4 @@ set -e -u
 touch fluid-inner-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/heat-exchanger/fluid-outer-openfoam/run.sh b/heat-exchanger/fluid-outer-openfoam/run.sh
index 30a484110..8816441f2 100755
--- a/heat-exchanger/fluid-outer-openfoam/run.sh
+++ b/heat-exchanger/fluid-outer-openfoam/run.sh
@@ -4,3 +4,4 @@ set -e -u
 touch fluid-outer-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/multiple-perpendicular-flaps/fluid-openfoam/run.sh b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
index d5427df4a..c191b9e48 100755
--- a/multiple-perpendicular-flaps/fluid-openfoam/run.sh
+++ b/multiple-perpendicular-flaps/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/perpendicular-flap/fluid-openfoam/run.sh b/perpendicular-flap/fluid-openfoam/run.sh
index d5427df4a..c191b9e48 100755
--- a/perpendicular-flap/fluid-openfoam/run.sh
+++ b/perpendicular-flap/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/tools/run-openfoam.sh b/tools/run-openfoam.sh
index b57aa47ef..e0667aa16 100755
--- a/tools/run-openfoam.sh
+++ b/tools/run-openfoam.sh
@@ -13,5 +13,3 @@ if [ "${1:-}" = "-parallel" ]; then
 else
     ${solver}
 fi
-
-. openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/turek-hron-fsi3/fluid-openfoam/run.sh b/turek-hron-fsi3/fluid-openfoam/run.sh
index d5427df4a..c191b9e48 100755
--- a/turek-hron-fsi3/fluid-openfoam/run.sh
+++ b/turek-hron-fsi3/fluid-openfoam/run.sh
@@ -5,3 +5,4 @@ blockMesh
 touch fluid-openfoam.foam
 
 ../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs

From 4d584da3b182bf99188124ab441e35fa174d6649 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 18:55:12 +0200
Subject: [PATCH 19/23] Fix clean_fenics

---
 tools/cleaning-tools.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/cleaning-tools.sh b/tools/cleaning-tools.sh
index d848af4fb..d85505fff 100755
--- a/tools/cleaning-tools.sh
+++ b/tools/cleaning-tools.sh
@@ -72,7 +72,8 @@ clean_fenics() {
         set -e -u
         cd "$1"
         echo "--- Cleaning up FEniCS case in $(pwd)"
-        rm -fv ./*.pvd spooles.out out FSI-S/*
+        rm -fv ./*.pvd spooles.out FSI-S/*
+        rm -rfv ./out/
         clean_precice_logs .
     )
 }

From c981dcd487040de8e30e8249907baa2e20f5ea91 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Sun, 11 Apr 2021 23:47:36 +0200
Subject: [PATCH 20/23] Add partitioned pipe tutorial (moved from
 openfoam-adapter)

---
 partitioned-pipe/README.md                    |  51 +++++++++
 partitioned-pipe/clean-tutorial.sh            |   1 +
 .../fluid1-openfoam-pimplefoam/0/U            |  34 ++++++
 .../fluid1-openfoam-pimplefoam/0/p            |  31 ++++++
 .../fluid1-openfoam-pimplefoam/clean.sh       |   6 +
 .../constant/transportProperties              |  12 ++
 .../constant/turbulenceProperties             |  10 ++
 .../fluid1-openfoam-pimplefoam/run.sh         |   8 ++
 .../system/blockMeshDict                      | 104 ++++++++++++++++++
 .../system/controlDict                        |  45 ++++++++
 .../system/decomposeParDict                   |  16 +++
 .../system/fvSchemes                          |  40 +++++++
 .../system/fvSolution                         |  74 +++++++++++++
 .../system/preciceDict                        |  34 ++++++
 .../fluid1-openfoam-sonicliquidfoam/0/U       |  30 +++++
 .../fluid1-openfoam-sonicliquidfoam/0/p       |  31 ++++++
 .../fluid1-openfoam-sonicliquidfoam/clean.sh  |   6 +
 .../constant/thermodynamicProperties          |  14 +++
 .../constant/transportProperties              |  10 ++
 .../constant/turbulenceProperties             |  10 ++
 .../fluid1-openfoam-sonicliquidfoam/run.sh    |   8 ++
 .../system/blockMeshDict                      | 104 ++++++++++++++++++
 .../system/controlDict                        |  45 ++++++++
 .../system/decomposeParDict                   |  16 +++
 .../system/fvSchemes                          |  40 +++++++
 .../system/fvSolution                         |  43 ++++++++
 .../system/preciceDict                        |  34 ++++++
 .../fluid2-openfoam-pimplefoam/0/U            |  30 +++++
 .../fluid2-openfoam-pimplefoam/0/p            |  31 ++++++
 .../fluid2-openfoam-pimplefoam/clean.sh       |   6 +
 .../constant/transportProperties              |  12 ++
 .../constant/turbulenceProperties             |  10 ++
 .../fluid2-openfoam-pimplefoam/run.sh         |   8 ++
 .../system/blockMeshDict                      | 104 ++++++++++++++++++
 .../system/controlDict                        |  45 ++++++++
 .../system/decomposeParDict                   |  16 +++
 .../system/fvSchemes                          |  40 +++++++
 .../system/fvSolution                         |  74 +++++++++++++
 .../system/preciceDict                        |  34 ++++++
 .../fluid2-openfoam-sonicliquidfoam/0/U       |  30 +++++
 .../fluid2-openfoam-sonicliquidfoam/0/p       |  31 ++++++
 .../fluid2-openfoam-sonicliquidfoam/clean.sh  |   6 +
 .../constant/thermodynamicProperties          |  15 +++
 .../constant/transportProperties              |  10 ++
 .../constant/turbulenceProperties             |  10 ++
 .../fluid2-openfoam-sonicliquidfoam/run.sh    |   8 ++
 .../system/blockMeshDict                      | 104 ++++++++++++++++++
 .../system/controlDict                        |  45 ++++++++
 .../system/decomposeParDict                   |  16 +++
 .../system/fvSchemes                          |  40 +++++++
 .../system/fvSolution                         |  43 ++++++++
 .../system/preciceDict                        |  34 ++++++
 ...ipe-results-pimpleFoam-sonicliquidfoam.png | Bin 0 -> 35702 bytes
 ...ls-partitioned-pipe-results-pimplefoam.png | Bin 0 -> 31792 bytes
 ...ipe-results-sonicliquidfoam-pimpleFoam.png | Bin 0 -> 33702 bytes
 ...rtitioned-pipe-results-sonicliquidfoam.png | Bin 0 -> 30867 bytes
 partitioned-pipe/precice-config.xml           |  79 +++++++++++++
 tools/cleaning-tools.sh                       |   1 +
 58 files changed, 1739 insertions(+)
 create mode 100644 partitioned-pipe/README.md
 create mode 120000 partitioned-pipe/clean-tutorial.sh
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/0/U
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/0/p
 create mode 100755 partitioned-pipe/fluid1-openfoam-pimplefoam/clean.sh
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/constant/transportProperties
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/constant/turbulenceProperties
 create mode 100755 partitioned-pipe/fluid1-openfoam-pimplefoam/run.sh
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/system/blockMeshDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/system/controlDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/system/decomposeParDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSchemes
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSolution
 create mode 100644 partitioned-pipe/fluid1-openfoam-pimplefoam/system/preciceDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/U
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/p
 create mode 100755 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/clean.sh
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/thermodynamicProperties
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/transportProperties
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/turbulenceProperties
 create mode 100755 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/run.sh
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/blockMeshDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/controlDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/decomposeParDict
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSchemes
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSolution
 create mode 100644 partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/preciceDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/0/U
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/0/p
 create mode 100755 partitioned-pipe/fluid2-openfoam-pimplefoam/clean.sh
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/constant/transportProperties
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/constant/turbulenceProperties
 create mode 100755 partitioned-pipe/fluid2-openfoam-pimplefoam/run.sh
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/system/blockMeshDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/system/controlDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/system/decomposeParDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSchemes
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSolution
 create mode 100644 partitioned-pipe/fluid2-openfoam-pimplefoam/system/preciceDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/U
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/p
 create mode 100755 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/clean.sh
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/thermodynamicProperties
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/transportProperties
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/turbulenceProperties
 create mode 100755 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/run.sh
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/blockMeshDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/controlDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/decomposeParDict
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSchemes
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSolution
 create mode 100644 partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/preciceDict
 create mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-pimpleFoam-sonicliquidfoam.png
 create mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-pimplefoam.png
 create mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam-pimpleFoam.png
 create mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam.png
 create mode 100644 partitioned-pipe/precice-config.xml

diff --git a/partitioned-pipe/README.md b/partitioned-pipe/README.md
new file mode 100644
index 000000000..aea0aa0b3
--- /dev/null
+++ b/partitioned-pipe/README.md
@@ -0,0 +1,51 @@
+---
+title: Partitioned pipe flow
+permalink: tutorials-partitioned-pipe.html
+keywords: tutorial, FF, fluid-fluid coupling, OpenFOAM, pimpleFoam, sonicLiquidFoam
+summary: This tutorial describes how to run a partitioned fluid simulation using preCICE.
+---
+
+{% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %}
+
+## Setup
+
+This scenario consists of two pipes connected in series. A fluid enters from the left (here $$ z=0 $$) boundary of the Fluid1 participant with a uniform velocity profile ($$ u_{\infty} = 0.1 m/s $$) and zero pressure gradient. In its starting, uncoupled state, it exits from the right side (outlet: zero velocity gradient, zero pressure). This is also the coupling interface with Fluid2, which has the same boundary conditions as Fluid1.
+
+On the coupling interface, Fluid1 sends velocity and pressure gradient to Fluid2 and receives pressure. The additional pressure gradient exchange was found to help convergence [1], but this fluid-fluid coupling scenario is part of active research.
+
+## Available solvers
+
+Both for Fluid1 and Fluid2, the following participants are available:
+
+* OpenFOAM (pimpleFoam). An incompressible OpenFOAM solver. For more information, have a look at the [OpenFOAM adapter documentation](adapter-openfoam-overview.html).
+
+* OpenFOAM (sonicLiquidFoam). A compressible OpenFOAM solver. For more information, have a look at the [OpenFOAM adapter documentation](adapter-openfoam-overview.html).
+
+## Running the Simulation
+
+All listed solvers can be used in order to run the simulation. Open two separate terminals and start the desired fluid1 and fluid2 participants by calling the respective run script. For example:
+
+```
+cd fluid1-openfoam-pimpleFoam
+./run.sh
+```
+and
+```
+cd fluid2-openfoam-sonicliquidfoam
+./run.sh
+```
+
+## Post-processing
+
+The OpenFOAM solvers generate a `.foam` file each. You can open this file in ParaView.
+An example of the visualized expected results looks as follows:
+
+![result](images/tutorials-partitioned-pipe-results-pimpleFoam-sonicliquidfoam.png)
+
+Observe that the velocity and pressure values are smoothly changing around the coupling interface. The simulation starts with oscillations, which disappear after a few time steps.
+
+## References
+
+[1]  G. Chourdakis, B. Uekermann, G. V. Zwieten, and H. V. Brummelen: [Coupling OpenFOAM to different solvers, physics, models, and dimensions using preCICE](https://mediatum.ub.tum.de/1515271), 14th OpenFOAM Workshop, Duisburg, Germany, submitted (proceedings publication delayed/cancelled), July 2019.
+
+{% include disclaimer.html content="This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM®  and OpenCFD®  trade marks." %}
diff --git a/partitioned-pipe/clean-tutorial.sh b/partitioned-pipe/clean-tutorial.sh
new file mode 120000
index 000000000..4713f5092
--- /dev/null
+++ b/partitioned-pipe/clean-tutorial.sh
@@ -0,0 +1 @@
+../tools/clean-tutorial-base.sh
\ No newline at end of file
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U b/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U
new file mode 100644
index 000000000..71c0ce0c4
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U
@@ -0,0 +1,34 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volVectorField;
+    location    "0";
+    object      U;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (0 0 0.1);
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+    outlet
+    {
+        type            fixedGradient;
+        gradient        uniform (0 0 0);
+    }
+    fixedWalls
+    {
+        type            noSlip;
+    }
+}
+
+
+// ************************************************************************* //
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/0/p b/partitioned-pipe/fluid1-openfoam-pimplefoam/0/p
new file mode 100644
index 000000000..ada3a6d88
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/0/p
@@ -0,0 +1,31 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      p;
+}
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedGradient;
+        gradient        uniform 0;
+    }
+
+    outlet
+    {
+        type            fixedValue;
+        value           uniform 0;
+    }
+
+    fixedWalls
+    {
+        type            zeroGradient;
+    }
+}
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/clean.sh b/partitioned-pipe/fluid1-openfoam-pimplefoam/clean.sh
new file mode 100755
index 000000000..c31d9fc76
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/clean.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e -u
+
+. ../../tools/cleaning-tools.sh
+
+clean_openfoam .
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/constant/transportProperties b/partitioned-pipe/fluid1-openfoam-pimplefoam/constant/transportProperties
new file mode 100644
index 000000000..c055a4bfa
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/constant/transportProperties
@@ -0,0 +1,12 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      transportProperties;
+}
+
+transportModel  Newtonian;
+
+nu              nu [ 0 2 -1 0 0 0 0 ] 1e1;
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/constant/turbulenceProperties b/partitioned-pipe/fluid1-openfoam-pimplefoam/constant/turbulenceProperties
new file mode 100644
index 000000000..2c55a8b28
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/constant/turbulenceProperties
@@ -0,0 +1,10 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      turbulenceProperties;
+}
+
+simulationType laminar;
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/run.sh b/partitioned-pipe/fluid1-openfoam-pimplefoam/run.sh
new file mode 100755
index 000000000..7cadd6f3a
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/run.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e -u
+
+blockMesh
+touch fluid1-openfoam-pimplefoam.foam
+
+../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/system/blockMeshDict b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/blockMeshDict
new file mode 100644
index 000000000..a2b080b83
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/blockMeshDict
@@ -0,0 +1,104 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant/polyMesh";
+    object      blockMeshDict;
+}
+
+convertToMeters 1;
+
+
+zmin   0;
+zmax  20;
+
+xcells 10; // per block (5 blocks)
+ycells 10; // per block (5 blocks)
+zcells 20;
+
+vertices
+(
+    (-3.535534 -3.535534 $zmin) // 0
+    ( 3.535534 -3.535534 $zmin) // 1
+    ( 3.535534  3.535534 $zmin) // 2
+    (-3.535534  3.535534 $zmin) // 3
+    (-1.414214 -1.414214 $zmin) // 4
+    ( 1.414214 -1.414214 $zmin) // 5
+    ( 1.414214  1.414214 $zmin) // 6
+    (-1.414214  1.414214 $zmin) // 7
+
+    (-3.535534 -3.535534 $zmax) // 8
+    ( 3.535534 -3.535534 $zmax) // 9
+    ( 3.535534  3.535534 $zmax) // 10
+    (-3.535534  3.535534 $zmax) // 11
+    (-1.414214 -1.414214 $zmax) // 12
+    ( 1.414214 -1.414214 $zmax) // 13
+    ( 1.414214  1.414214 $zmax) // 14
+    (-1.414214  1.414214 $zmax) // 15
+);
+
+blocks
+(
+hex (0 1 5 4 8 9 13 12)   pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (1 2 6 5 9 10 14 13)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (2 3 7 6 10 11 15 14) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (3 0 4 7 11 8 12 15)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (4 5 6 7 12 13 14 15) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+);
+
+edges
+(
+arc 0 1   ( 0   -5   $zmin)
+arc 1 2   ( 5    0   $zmin)
+arc 2 3   ( 0    5   $zmin)
+arc 3 0   (-5    0   $zmin)
+arc 4 5   ( 0   -1.5 $zmin)
+arc 5 6   ( 1.5  0   $zmin)
+arc 6 7   ( 0    1.5 $zmin)
+arc 7 4   (-1.5  0   $zmin)
+
+arc 8 9   ( 0  -5   $zmax)
+arc 9 10  ( 5   0   $zmax)
+arc 10 11 ( 0   5   $zmax)
+arc 11 8  (-5   0   $zmax)
+arc 12 13 ( 0  -1.5 $zmax)
+arc 13 14 (1.5  0   $zmax)
+arc 14 15 ( 0   1.5 $zmax)
+arc 15 12 (-1.5 0   $zmax)
+);
+
+
+patches
+(
+
+    patch fixedWalls
+    (
+        (0 1 9   8)
+        (1 2 10  9)
+        (2 3 11 10)
+        (3 0 8  11)
+    )
+    
+    patch inlet
+    (
+        (0 1 5 4)
+        (1 2 6 5)
+        (2 3 7 6)
+        (3 0 4 7)
+        (4 5 6 7)
+    )
+    
+    patch outlet
+    (
+        (8 9 13   12)
+        (9 10 14  13)
+        (10 11 15 14)
+        (12 13 14 15)
+        (11 8 12  15)
+    )
+);
+
+mergePatchPairs
+(
+);
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/system/controlDict b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/controlDict
new file mode 100644
index 000000000..9fe0ab9f5
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/controlDict
@@ -0,0 +1,45 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+
+application     pimpleFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         10.0;
+
+deltaT          0.01;
+
+writeControl    adjustableRunTime;
+
+writeInterval   0.01;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+functions
+{
+    preCICE_Adapter
+    {
+        type preciceAdapterFunctionObject;
+        libs ("libpreciceAdapterFunctionObject.so");
+    }
+}
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/system/decomposeParDict b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/decomposeParDict
new file mode 100644
index 000000000..ad99cf6c5
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/decomposeParDict
@@ -0,0 +1,16 @@
+FoamFile {
+    version 2.0;
+    class dictionary;
+    object decomposeParDict;
+    format ascii;
+}
+
+numberOfSubdomains 2;
+
+method          simple;
+
+simpleCoeffs
+{
+    n               (2 1 1);
+    delta           0.001;
+}
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSchemes b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSchemes
new file mode 100644
index 000000000..a22010ae4
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSchemes
@@ -0,0 +1,40 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+
+ddtSchemes
+{
+    default         Euler;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      bounded Gauss upwind;
+    div((nuEff*dev2(T(grad(U))))) Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear corrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSolution b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSolution
new file mode 100644
index 000000000..7e4fe2724
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/fvSolution
@@ -0,0 +1,74 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+
+solvers
+{
+
+    p
+    {
+            
+    solver           PCG;
+    preconditioner   DIC;
+    tolerance        1e-8;
+    relTol 	         1.0e-3;
+    }
+
+    pFinal
+    {
+        $p;
+        relTol          0;
+    }
+
+    pcorr
+    {
+        $p;
+    }
+
+    pcorrFinal
+    {
+        $pcorr;
+        relTol          0;
+    }
+
+    Phi
+    {
+        $p;
+    }
+
+    "(U|cellDisplacement)"
+    {
+        solver          smoothSolver;
+        smoother        symGaussSeidel;
+        tolerance       1e-6;
+        relTol          1e-4;
+        minIter         2;
+    }
+
+    "(U|cellDisplacement)Final"
+    {
+        $U;
+        relTol          0;
+    }
+}
+
+PIMPLE
+{
+    nCorrectors 4;
+    nNonOrthogonalCorrectors 1;
+    consistent  true;
+    correctPhi  true;
+    momentumPredictor true; 
+    nOuterCorrectors	1;
+}
+
+
+potentialFlow
+{
+    nNonOrthogonalCorrectors 10;
+}
diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/system/preciceDict b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/preciceDict
new file mode 100644
index 000000000..b496662d1
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/system/preciceDict
@@ -0,0 +1,34 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      preciceDict;
+}
+
+preciceConfig "../precice-config.xml";
+
+participant Fluid1;
+
+modules (FF);
+
+interfaces
+{
+  Interface1
+  {
+    mesh              Fluid1-Mesh;
+    patches           (outlet);
+    
+    readData
+    (
+      Pressure
+    );
+    
+    writeData
+    (
+      Velocity
+      PressureGradient
+    );
+  };
+};
\ No newline at end of file
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/U b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/U
new file mode 100644
index 000000000..fd165fe4e
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/U
@@ -0,0 +1,30 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volVectorField;
+    location    "0";
+    object      U;
+}
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (0 0 0.1);
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+    outlet
+    {
+        type            fixedGradient;
+        gradient        uniform (0 0 0);
+    }
+    fixedWalls
+    {
+        type            noSlip;
+    }
+}
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/p b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/p
new file mode 100644
index 000000000..eefaf12bd
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/0/p
@@ -0,0 +1,31 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      p;
+}
+
+dimensions      [1 -1 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedGradient;
+        gradient        uniform 0;
+    }
+
+    outlet
+    {
+        type            fixedValue;
+        value           uniform 0;
+    }
+
+    fixedWalls
+    {
+        type            zeroGradient;
+    }
+}
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/clean.sh b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/clean.sh
new file mode 100755
index 000000000..c31d9fc76
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/clean.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e -u
+
+. ../../tools/cleaning-tools.sh
+
+clean_openfoam .
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/thermodynamicProperties b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/thermodynamicProperties
new file mode 100644
index 000000000..6bc1693b3
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/thermodynamicProperties
@@ -0,0 +1,14 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      thermodynamicProperties;
+}
+
+rho0            rho0 [1 -3 0 0 0 0 0] 1;
+
+p0              p0 [1 -1 -2 0 0 0 0] 100000;
+
+psi             psi [0 -2 2 0 0 0 0] 4.54e-07;
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/transportProperties b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/transportProperties
new file mode 100644
index 000000000..0f39f4183
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/transportProperties
@@ -0,0 +1,10 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      transportProperties;
+}
+
+mu              mu  [1 -1 -1 0 0 0 0] 1e1;
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/turbulenceProperties b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/turbulenceProperties
new file mode 100644
index 000000000..2c55a8b28
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/constant/turbulenceProperties
@@ -0,0 +1,10 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      turbulenceProperties;
+}
+
+simulationType laminar;
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/run.sh b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/run.sh
new file mode 100755
index 000000000..76e94cbc8
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/run.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e -u
+
+blockMesh
+touch fluid1-openfoam-sonicliquidfoam.foam
+
+../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/blockMeshDict b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/blockMeshDict
new file mode 100644
index 000000000..a2b080b83
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/blockMeshDict
@@ -0,0 +1,104 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant/polyMesh";
+    object      blockMeshDict;
+}
+
+convertToMeters 1;
+
+
+zmin   0;
+zmax  20;
+
+xcells 10; // per block (5 blocks)
+ycells 10; // per block (5 blocks)
+zcells 20;
+
+vertices
+(
+    (-3.535534 -3.535534 $zmin) // 0
+    ( 3.535534 -3.535534 $zmin) // 1
+    ( 3.535534  3.535534 $zmin) // 2
+    (-3.535534  3.535534 $zmin) // 3
+    (-1.414214 -1.414214 $zmin) // 4
+    ( 1.414214 -1.414214 $zmin) // 5
+    ( 1.414214  1.414214 $zmin) // 6
+    (-1.414214  1.414214 $zmin) // 7
+
+    (-3.535534 -3.535534 $zmax) // 8
+    ( 3.535534 -3.535534 $zmax) // 9
+    ( 3.535534  3.535534 $zmax) // 10
+    (-3.535534  3.535534 $zmax) // 11
+    (-1.414214 -1.414214 $zmax) // 12
+    ( 1.414214 -1.414214 $zmax) // 13
+    ( 1.414214  1.414214 $zmax) // 14
+    (-1.414214  1.414214 $zmax) // 15
+);
+
+blocks
+(
+hex (0 1 5 4 8 9 13 12)   pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (1 2 6 5 9 10 14 13)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (2 3 7 6 10 11 15 14) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (3 0 4 7 11 8 12 15)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (4 5 6 7 12 13 14 15) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+);
+
+edges
+(
+arc 0 1   ( 0   -5   $zmin)
+arc 1 2   ( 5    0   $zmin)
+arc 2 3   ( 0    5   $zmin)
+arc 3 0   (-5    0   $zmin)
+arc 4 5   ( 0   -1.5 $zmin)
+arc 5 6   ( 1.5  0   $zmin)
+arc 6 7   ( 0    1.5 $zmin)
+arc 7 4   (-1.5  0   $zmin)
+
+arc 8 9   ( 0  -5   $zmax)
+arc 9 10  ( 5   0   $zmax)
+arc 10 11 ( 0   5   $zmax)
+arc 11 8  (-5   0   $zmax)
+arc 12 13 ( 0  -1.5 $zmax)
+arc 13 14 (1.5  0   $zmax)
+arc 14 15 ( 0   1.5 $zmax)
+arc 15 12 (-1.5 0   $zmax)
+);
+
+
+patches
+(
+
+    patch fixedWalls
+    (
+        (0 1 9   8)
+        (1 2 10  9)
+        (2 3 11 10)
+        (3 0 8  11)
+    )
+    
+    patch inlet
+    (
+        (0 1 5 4)
+        (1 2 6 5)
+        (2 3 7 6)
+        (3 0 4 7)
+        (4 5 6 7)
+    )
+    
+    patch outlet
+    (
+        (8 9 13   12)
+        (9 10 14  13)
+        (10 11 15 14)
+        (12 13 14 15)
+        (11 8 12  15)
+    )
+);
+
+mergePatchPairs
+(
+);
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/controlDict b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/controlDict
new file mode 100644
index 000000000..162aef6ed
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/controlDict
@@ -0,0 +1,45 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+
+application     sonicLiquidFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         10.0;
+
+deltaT          0.01;
+
+writeControl    adjustableRunTime;
+
+writeInterval   0.01;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+functions
+{
+    preCICE_Adapter
+    {
+        type preciceAdapterFunctionObject;
+        libs ("libpreciceAdapterFunctionObject.so");
+    }
+}
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/decomposeParDict b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/decomposeParDict
new file mode 100644
index 000000000..ad99cf6c5
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/decomposeParDict
@@ -0,0 +1,16 @@
+FoamFile {
+    version 2.0;
+    class dictionary;
+    object decomposeParDict;
+    format ascii;
+}
+
+numberOfSubdomains 2;
+
+method          simple;
+
+simpleCoeffs
+{
+    n               (2 1 1);
+    delta           0.001;
+}
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSchemes b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSchemes
new file mode 100644
index 000000000..edf56a6dc
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSchemes
@@ -0,0 +1,40 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+
+ddtSchemes
+{
+    default         CrankNicolson 0.45;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      Gauss limitedLinearV 1;
+    div(phid,p)     Gauss limitedLinear 1;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear corrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSolution b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSolution
new file mode 100644
index 000000000..506c2ecf8
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/fvSolution
@@ -0,0 +1,43 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+
+solvers
+{
+    "p.*"
+    {
+        solver          PBiCG;
+        preconditioner  DILU
+        tolerance       1e-06;
+        relTol          0.01;
+    }
+
+    "U.*"
+    {
+        $p;
+        solver          PBiCG;
+        preconditioner  DILU;
+        tolerance       1e-05;
+        relTol          0.1;
+    }
+
+    "rho.*"
+    {
+        solver          PCG;
+        preconditioner  DIC;
+        tolerance       1e-05;
+        relTol          0.1;
+    }
+}
+
+PIMPLE
+{
+    nOuterCorrectors 4;
+    nCorrectors      2;
+    nNonOrthogonalCorrectors 0;
+}
diff --git a/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/preciceDict b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/preciceDict
new file mode 100644
index 000000000..b496662d1
--- /dev/null
+++ b/partitioned-pipe/fluid1-openfoam-sonicliquidfoam/system/preciceDict
@@ -0,0 +1,34 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      preciceDict;
+}
+
+preciceConfig "../precice-config.xml";
+
+participant Fluid1;
+
+modules (FF);
+
+interfaces
+{
+  Interface1
+  {
+    mesh              Fluid1-Mesh;
+    patches           (outlet);
+    
+    readData
+    (
+      Pressure
+    );
+    
+    writeData
+    (
+      Velocity
+      PressureGradient
+    );
+  };
+};
\ No newline at end of file
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/0/U b/partitioned-pipe/fluid2-openfoam-pimplefoam/0/U
new file mode 100644
index 000000000..94afa03ee
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/0/U
@@ -0,0 +1,30 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volVectorField;
+    location    "0";
+    object      U;
+}
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (0 0 0);
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+    outlet
+    {
+        type            fixedGradient;
+        gradient        uniform (0 0 0);
+    }
+    fixedWalls
+    {
+        type            noSlip;
+    }
+}
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/0/p b/partitioned-pipe/fluid2-openfoam-pimplefoam/0/p
new file mode 100644
index 000000000..ada3a6d88
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/0/p
@@ -0,0 +1,31 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      p;
+}
+
+dimensions      [0 2 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedGradient;
+        gradient        uniform 0;
+    }
+
+    outlet
+    {
+        type            fixedValue;
+        value           uniform 0;
+    }
+
+    fixedWalls
+    {
+        type            zeroGradient;
+    }
+}
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/clean.sh b/partitioned-pipe/fluid2-openfoam-pimplefoam/clean.sh
new file mode 100755
index 000000000..c31d9fc76
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/clean.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e -u
+
+. ../../tools/cleaning-tools.sh
+
+clean_openfoam .
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/constant/transportProperties b/partitioned-pipe/fluid2-openfoam-pimplefoam/constant/transportProperties
new file mode 100644
index 000000000..c055a4bfa
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/constant/transportProperties
@@ -0,0 +1,12 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      transportProperties;
+}
+
+transportModel  Newtonian;
+
+nu              nu [ 0 2 -1 0 0 0 0 ] 1e1;
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/constant/turbulenceProperties b/partitioned-pipe/fluid2-openfoam-pimplefoam/constant/turbulenceProperties
new file mode 100644
index 000000000..2c55a8b28
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/constant/turbulenceProperties
@@ -0,0 +1,10 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      turbulenceProperties;
+}
+
+simulationType laminar;
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/run.sh b/partitioned-pipe/fluid2-openfoam-pimplefoam/run.sh
new file mode 100755
index 000000000..d00617f49
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/run.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e -u
+
+blockMesh
+touch fluid2-openfoam-pimplefoam.foam
+
+../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/system/blockMeshDict b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/blockMeshDict
new file mode 100644
index 000000000..56363d94b
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/blockMeshDict
@@ -0,0 +1,104 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant/polyMesh";
+    object      blockMeshDict;
+}
+
+convertToMeters 1;
+
+
+zmin  20;
+zmax  40;
+
+xcells 10; // per block (5 blocks)
+ycells 10; // per block (5 blocks)
+zcells 20;
+
+vertices
+(
+    (-3.535534 -3.535534 $zmin) // 0
+    ( 3.535534 -3.535534 $zmin) // 1
+    ( 3.535534  3.535534 $zmin) // 2
+    (-3.535534  3.535534 $zmin) // 3
+    (-1.414214 -1.414214 $zmin) // 4
+    ( 1.414214 -1.414214 $zmin) // 5
+    ( 1.414214  1.414214 $zmin) // 6
+    (-1.414214  1.414214 $zmin) // 7
+
+    (-3.535534 -3.535534 $zmax) // 8
+    ( 3.535534 -3.535534 $zmax) // 9
+    ( 3.535534  3.535534 $zmax) // 10
+    (-3.535534  3.535534 $zmax) // 11
+    (-1.414214 -1.414214 $zmax) // 12
+    ( 1.414214 -1.414214 $zmax) // 13
+    ( 1.414214  1.414214 $zmax) // 14
+    (-1.414214  1.414214 $zmax) // 15
+);
+
+blocks
+(
+hex (0 1 5 4 8 9 13 12)   pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (1 2 6 5 9 10 14 13)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (2 3 7 6 10 11 15 14) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (3 0 4 7 11 8 12 15)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (4 5 6 7 12 13 14 15) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+);
+
+edges
+(
+arc 0 1   ( 0   -5   $zmin)
+arc 1 2   ( 5    0   $zmin)
+arc 2 3   ( 0    5   $zmin)
+arc 3 0   (-5    0   $zmin)
+arc 4 5   ( 0   -1.5 $zmin)
+arc 5 6   ( 1.5  0   $zmin)
+arc 6 7   ( 0    1.5 $zmin)
+arc 7 4   (-1.5  0   $zmin)
+
+arc 8 9   ( 0  -5   $zmax)
+arc 9 10  ( 5   0   $zmax)
+arc 10 11 ( 0   5   $zmax)
+arc 11 8  (-5   0   $zmax)
+arc 12 13 ( 0  -1.5 $zmax)
+arc 13 14 (1.5  0   $zmax)
+arc 14 15 ( 0   1.5 $zmax)
+arc 15 12 (-1.5 0   $zmax)
+);
+
+
+patches
+(
+
+    patch fixedWalls
+    (
+        (0 1 9   8)
+        (1 2 10  9)
+        (2 3 11 10)
+        (3 0 8  11)
+    )
+    
+    patch inlet
+    (
+        (0 1 5 4)
+        (1 2 6 5)
+        (2 3 7 6)
+        (3 0 4 7)
+        (4 5 6 7)
+    )
+    
+    patch outlet
+    (
+        (8 9 13   12)
+        (9 10 14  13)
+        (10 11 15 14)
+        (12 13 14 15)
+        (11 8 12  15)
+    )
+);
+
+mergePatchPairs
+(
+);
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/system/controlDict b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/controlDict
new file mode 100644
index 000000000..9fe0ab9f5
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/controlDict
@@ -0,0 +1,45 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+
+application     pimpleFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         10.0;
+
+deltaT          0.01;
+
+writeControl    adjustableRunTime;
+
+writeInterval   0.01;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+functions
+{
+    preCICE_Adapter
+    {
+        type preciceAdapterFunctionObject;
+        libs ("libpreciceAdapterFunctionObject.so");
+    }
+}
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/system/decomposeParDict b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/decomposeParDict
new file mode 100644
index 000000000..ad99cf6c5
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/decomposeParDict
@@ -0,0 +1,16 @@
+FoamFile {
+    version 2.0;
+    class dictionary;
+    object decomposeParDict;
+    format ascii;
+}
+
+numberOfSubdomains 2;
+
+method          simple;
+
+simpleCoeffs
+{
+    n               (2 1 1);
+    delta           0.001;
+}
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSchemes b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSchemes
new file mode 100644
index 000000000..a22010ae4
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSchemes
@@ -0,0 +1,40 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+
+ddtSchemes
+{
+    default         Euler;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      bounded Gauss upwind;
+    div((nuEff*dev2(T(grad(U))))) Gauss linear;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear corrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSolution b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSolution
new file mode 100644
index 000000000..7e4fe2724
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/fvSolution
@@ -0,0 +1,74 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+
+solvers
+{
+
+    p
+    {
+            
+    solver           PCG;
+    preconditioner   DIC;
+    tolerance        1e-8;
+    relTol 	         1.0e-3;
+    }
+
+    pFinal
+    {
+        $p;
+        relTol          0;
+    }
+
+    pcorr
+    {
+        $p;
+    }
+
+    pcorrFinal
+    {
+        $pcorr;
+        relTol          0;
+    }
+
+    Phi
+    {
+        $p;
+    }
+
+    "(U|cellDisplacement)"
+    {
+        solver          smoothSolver;
+        smoother        symGaussSeidel;
+        tolerance       1e-6;
+        relTol          1e-4;
+        minIter         2;
+    }
+
+    "(U|cellDisplacement)Final"
+    {
+        $U;
+        relTol          0;
+    }
+}
+
+PIMPLE
+{
+    nCorrectors 4;
+    nNonOrthogonalCorrectors 1;
+    consistent  true;
+    correctPhi  true;
+    momentumPredictor true; 
+    nOuterCorrectors	1;
+}
+
+
+potentialFlow
+{
+    nNonOrthogonalCorrectors 10;
+}
diff --git a/partitioned-pipe/fluid2-openfoam-pimplefoam/system/preciceDict b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/preciceDict
new file mode 100644
index 000000000..f17b23d93
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-pimplefoam/system/preciceDict
@@ -0,0 +1,34 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      preciceDict;
+}
+
+preciceConfig "../precice-config.xml";
+
+participant Fluid2;
+
+modules (FF);
+
+interfaces
+{
+  Interface1
+  {
+    mesh              Fluid2-Mesh;
+    patches           (inlet);
+    
+    readData
+    (
+      Velocity
+      PressureGradient
+    );
+    
+    writeData
+    (
+      Pressure
+    );
+  };
+};
\ No newline at end of file
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/U b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/U
new file mode 100644
index 000000000..94afa03ee
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/U
@@ -0,0 +1,30 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volVectorField;
+    location    "0";
+    object      U;
+}
+
+dimensions      [0 1 -1 0 0 0 0];
+
+internalField   uniform (0 0 0);
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedValue;
+        value           $internalField;
+    }
+    outlet
+    {
+        type            fixedGradient;
+        gradient        uniform (0 0 0);
+    }
+    fixedWalls
+    {
+        type            noSlip;
+    }
+}
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/p b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/p
new file mode 100644
index 000000000..eefaf12bd
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/0/p
@@ -0,0 +1,31 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       volScalarField;
+    object      p;
+}
+
+dimensions      [1 -1 -2 0 0 0 0];
+
+internalField   uniform 0;
+
+boundaryField
+{
+    inlet
+    {
+        type            fixedGradient;
+        gradient        uniform 0;
+    }
+
+    outlet
+    {
+        type            fixedValue;
+        value           uniform 0;
+    }
+
+    fixedWalls
+    {
+        type            zeroGradient;
+    }
+}
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/clean.sh b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/clean.sh
new file mode 100755
index 000000000..c31d9fc76
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/clean.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e -u
+
+. ../../tools/cleaning-tools.sh
+
+clean_openfoam .
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/thermodynamicProperties b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/thermodynamicProperties
new file mode 100644
index 000000000..aa3c63f53
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/thermodynamicProperties
@@ -0,0 +1,15 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      thermodynamicProperties;
+}
+
+rho0            rho0 [1 -3 0 0 0 0 0] 1;
+
+p0              p0 [1 -1 -2 0 0 0 0] 100000;
+
+psi             psi [0 -2 2 0 0 0 0] 4.54e-07;
+
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/transportProperties b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/transportProperties
new file mode 100644
index 000000000..0f39f4183
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/transportProperties
@@ -0,0 +1,10 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      transportProperties;
+}
+
+mu              mu  [1 -1 -1 0 0 0 0] 1e1;
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/turbulenceProperties b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/turbulenceProperties
new file mode 100644
index 000000000..2c55a8b28
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/constant/turbulenceProperties
@@ -0,0 +1,10 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant";
+    object      turbulenceProperties;
+}
+
+simulationType laminar;
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/run.sh b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/run.sh
new file mode 100755
index 000000000..5a24175c5
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/run.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e -u
+
+blockMesh
+touch fluid2-openfoam-sonicliquidfoam.foam
+
+../../tools/run-openfoam.sh "$@"
+. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/blockMeshDict b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/blockMeshDict
new file mode 100644
index 000000000..56363d94b
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/blockMeshDict
@@ -0,0 +1,104 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "constant/polyMesh";
+    object      blockMeshDict;
+}
+
+convertToMeters 1;
+
+
+zmin  20;
+zmax  40;
+
+xcells 10; // per block (5 blocks)
+ycells 10; // per block (5 blocks)
+zcells 20;
+
+vertices
+(
+    (-3.535534 -3.535534 $zmin) // 0
+    ( 3.535534 -3.535534 $zmin) // 1
+    ( 3.535534  3.535534 $zmin) // 2
+    (-3.535534  3.535534 $zmin) // 3
+    (-1.414214 -1.414214 $zmin) // 4
+    ( 1.414214 -1.414214 $zmin) // 5
+    ( 1.414214  1.414214 $zmin) // 6
+    (-1.414214  1.414214 $zmin) // 7
+
+    (-3.535534 -3.535534 $zmax) // 8
+    ( 3.535534 -3.535534 $zmax) // 9
+    ( 3.535534  3.535534 $zmax) // 10
+    (-3.535534  3.535534 $zmax) // 11
+    (-1.414214 -1.414214 $zmax) // 12
+    ( 1.414214 -1.414214 $zmax) // 13
+    ( 1.414214  1.414214 $zmax) // 14
+    (-1.414214  1.414214 $zmax) // 15
+);
+
+blocks
+(
+hex (0 1 5 4 8 9 13 12)   pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (1 2 6 5 9 10 14 13)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (2 3 7 6 10 11 15 14) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (3 0 4 7 11 8 12 15)  pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+hex (4 5 6 7 12 13 14 15) pipe ($xcells $ycells $zcells)  edgeGrading (1 1 1 1 1 1 1 1 1 1 1 1)
+);
+
+edges
+(
+arc 0 1   ( 0   -5   $zmin)
+arc 1 2   ( 5    0   $zmin)
+arc 2 3   ( 0    5   $zmin)
+arc 3 0   (-5    0   $zmin)
+arc 4 5   ( 0   -1.5 $zmin)
+arc 5 6   ( 1.5  0   $zmin)
+arc 6 7   ( 0    1.5 $zmin)
+arc 7 4   (-1.5  0   $zmin)
+
+arc 8 9   ( 0  -5   $zmax)
+arc 9 10  ( 5   0   $zmax)
+arc 10 11 ( 0   5   $zmax)
+arc 11 8  (-5   0   $zmax)
+arc 12 13 ( 0  -1.5 $zmax)
+arc 13 14 (1.5  0   $zmax)
+arc 14 15 ( 0   1.5 $zmax)
+arc 15 12 (-1.5 0   $zmax)
+);
+
+
+patches
+(
+
+    patch fixedWalls
+    (
+        (0 1 9   8)
+        (1 2 10  9)
+        (2 3 11 10)
+        (3 0 8  11)
+    )
+    
+    patch inlet
+    (
+        (0 1 5 4)
+        (1 2 6 5)
+        (2 3 7 6)
+        (3 0 4 7)
+        (4 5 6 7)
+    )
+    
+    patch outlet
+    (
+        (8 9 13   12)
+        (9 10 14  13)
+        (10 11 15 14)
+        (12 13 14 15)
+        (11 8 12  15)
+    )
+);
+
+mergePatchPairs
+(
+);
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/controlDict b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/controlDict
new file mode 100644
index 000000000..162aef6ed
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/controlDict
@@ -0,0 +1,45 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      controlDict;
+}
+
+application     sonicLiquidFoam;
+
+startFrom       startTime;
+
+startTime       0;
+
+stopAt          endTime;
+
+endTime         10.0;
+
+deltaT          0.01;
+
+writeControl    adjustableRunTime;
+
+writeInterval   0.01;
+
+purgeWrite      0;
+
+writeFormat     ascii;
+
+writePrecision  6;
+
+writeCompression off;
+
+timeFormat      general;
+
+timePrecision   6;
+
+functions
+{
+    preCICE_Adapter
+    {
+        type preciceAdapterFunctionObject;
+        libs ("libpreciceAdapterFunctionObject.so");
+    }
+}
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/decomposeParDict b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/decomposeParDict
new file mode 100644
index 000000000..ad99cf6c5
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/decomposeParDict
@@ -0,0 +1,16 @@
+FoamFile {
+    version 2.0;
+    class dictionary;
+    object decomposeParDict;
+    format ascii;
+}
+
+numberOfSubdomains 2;
+
+method          simple;
+
+simpleCoeffs
+{
+    n               (2 1 1);
+    delta           0.001;
+}
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSchemes b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSchemes
new file mode 100644
index 000000000..edf56a6dc
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSchemes
@@ -0,0 +1,40 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSchemes;
+}
+
+ddtSchemes
+{
+    default         CrankNicolson 0.45;
+}
+
+gradSchemes
+{
+    default         Gauss linear;
+}
+
+divSchemes
+{
+    default         none;
+    div(phi,U)      Gauss limitedLinearV 1;
+    div(phid,p)     Gauss limitedLinear 1;
+}
+
+laplacianSchemes
+{
+    default         Gauss linear corrected;
+}
+
+interpolationSchemes
+{
+    default         linear;
+}
+
+snGradSchemes
+{
+    default         corrected;
+}
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSolution b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSolution
new file mode 100644
index 000000000..506c2ecf8
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/fvSolution
@@ -0,0 +1,43 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      fvSolution;
+}
+
+solvers
+{
+    "p.*"
+    {
+        solver          PBiCG;
+        preconditioner  DILU
+        tolerance       1e-06;
+        relTol          0.01;
+    }
+
+    "U.*"
+    {
+        $p;
+        solver          PBiCG;
+        preconditioner  DILU;
+        tolerance       1e-05;
+        relTol          0.1;
+    }
+
+    "rho.*"
+    {
+        solver          PCG;
+        preconditioner  DIC;
+        tolerance       1e-05;
+        relTol          0.1;
+    }
+}
+
+PIMPLE
+{
+    nOuterCorrectors 4;
+    nCorrectors      2;
+    nNonOrthogonalCorrectors 0;
+}
diff --git a/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/preciceDict b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/preciceDict
new file mode 100644
index 000000000..f17b23d93
--- /dev/null
+++ b/partitioned-pipe/fluid2-openfoam-sonicliquidfoam/system/preciceDict
@@ -0,0 +1,34 @@
+FoamFile
+{
+    version     2.0;
+    format      ascii;
+    class       dictionary;
+    location    "system";
+    object      preciceDict;
+}
+
+preciceConfig "../precice-config.xml";
+
+participant Fluid2;
+
+modules (FF);
+
+interfaces
+{
+  Interface1
+  {
+    mesh              Fluid2-Mesh;
+    patches           (inlet);
+    
+    readData
+    (
+      Velocity
+      PressureGradient
+    );
+    
+    writeData
+    (
+      Pressure
+    );
+  };
+};
\ No newline at end of file
diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-pimpleFoam-sonicliquidfoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-pimpleFoam-sonicliquidfoam.png
new file mode 100644
index 0000000000000000000000000000000000000000..919d5193ff511846e7162f1f62771359fc8e3b85
GIT binary patch
diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-pimplefoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-pimplefoam.png
new file mode 100644
index 0000000000000000000000000000000000000000..947205482b980126371bab98f5a401af1fa21b11
GIT binary patch
diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam-pimpleFoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam-pimpleFoam.png
new file mode 100644
index 0000000000000000000000000000000000000000..c0ae71db9faf02c80eb21d6adc2c4ff45807e738
GIT binary patch
diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam.png
new file mode 100644
index 0000000000000000000000000000000000000000..f681968e17cd0cee84ee3ae406fe6470305d52af
GIT binary patch
diff --git a/partitioned-pipe/precice-config.xml b/partitioned-pipe/precice-config.xml
new file mode 100644
index 000000000..1a8cf842f
--- /dev/null
+++ b/partitioned-pipe/precice-config.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<precice-configuration>
+  <log>
+    <sink
+      filter="%Severity% > debug and %Rank% = 0"
+      format="---[precice] %ColorizedSeverity% %Message%"
+      enabled="true" />
+  </log>
+
+  <solver-interface dimensions="3">
+    <data:vector name="VelocityGradient" />
+    <data:scalar name="Pressure" />
+    <data:vector name="Velocity" />
+    <data:scalar name="PressureGradient" />
+
+    <mesh name="Fluid1-Mesh">
+      <use-data name="VelocityGradient" />
+      <use-data name="Pressure" />
+      <use-data name="Velocity" />
+      <use-data name="PressureGradient" />
+    </mesh>
+
+    <mesh name="Fluid2-Mesh">
+      <use-data name="VelocityGradient" />
+      <use-data name="Pressure" />
+      <use-data name="Velocity" />
+      <use-data name="PressureGradient" />
+    </mesh>
+
+    <participant name="Fluid1">
+      <use-mesh name="Fluid1-Mesh" provide="yes" />
+      <use-mesh name="Fluid2-Mesh" from="Fluid2" />
+      <write-data name="Velocity" mesh="Fluid1-Mesh" />
+      <write-data name="PressureGradient" mesh="Fluid1-Mesh" />
+      <read-data name="Pressure" mesh="Fluid1-Mesh" />
+      <read-data name="VelocityGradient" mesh="Fluid1-Mesh" />
+      <mapping:nearest-neighbor
+        direction="read"
+        from="Fluid2-Mesh"
+        to="Fluid1-Mesh"
+        constraint="consistent" />
+    </participant>
+
+    <participant name="Fluid2">
+      <use-mesh name="Fluid2-Mesh" provide="yes" />
+      <use-mesh name="Fluid1-Mesh" from="Fluid1" />
+      <read-data name="Velocity" mesh="Fluid2-Mesh" />
+      <read-data name="PressureGradient" mesh="Fluid2-Mesh" />
+      <write-data name="Pressure" mesh="Fluid2-Mesh" />
+      <write-data name="VelocityGradient" mesh="Fluid2-Mesh" />
+      <mapping:nearest-neighbor
+        direction="read"
+        from="Fluid1-Mesh"
+        to="Fluid2-Mesh"
+        constraint="consistent" />
+    </participant>
+
+    <m2n:sockets from="Fluid1" to="Fluid2" exchange-directory=".." />
+
+    <coupling-scheme:serial-implicit>
+      <time-window-size value="0.01" />
+      <max-time value="1.0" />
+      <participants first="Fluid1" second="Fluid2" />
+      <exchange data="Velocity" mesh="Fluid1-Mesh" from="Fluid1" to="Fluid2" />
+      <exchange data="PressureGradient" mesh="Fluid1-Mesh" from="Fluid1" to="Fluid2" />
+      <exchange data="Pressure" mesh="Fluid2-Mesh" from="Fluid2" to="Fluid1" />
+      <max-iterations value="100" />
+      <relative-convergence-measure limit="1.0e-6" data="Pressure" mesh="Fluid2-Mesh" />
+      <relative-convergence-measure limit="1.0e-6" data="Velocity" mesh="Fluid1-Mesh" />
+      <acceleration:IQN-ILS>
+        <data mesh="Fluid2-Mesh" name="Pressure" />
+        <initial-relaxation value="0.01" />
+        <max-used-iterations value="80" />
+        <time-windows-reused value="10" />
+        <filter type="QR1" limit="1e-8" />
+      </acceleration:IQN-ILS>
+    </coupling-scheme:serial-implicit>
+  </solver-interface>
+</precice-configuration>
diff --git a/tools/cleaning-tools.sh b/tools/cleaning-tools.sh
index d85505fff..692affc8a 100755
--- a/tools/cleaning-tools.sh
+++ b/tools/cleaning-tools.sh
@@ -97,6 +97,7 @@ clean_openfoam() {
             # shellcheck disable=SC1090 # This is an OpenFOAM file which we don't need to check
             . "${WM_PROJECT_DIR}/bin/tools/CleanFunctions"
             cleanCase
+            rm -rfv 0/uniform/functionObjects/functionObjectProperties
         fi
         clean_precice_logs .
     )

From b08da06216cd32427fc1035cbcdc937b3b6fb1a1 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Mon, 12 Apr 2021 10:55:21 +0200
Subject: [PATCH 21/23] README.md: apply feedback from code review

---
 partitioned-pipe/README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/partitioned-pipe/README.md b/partitioned-pipe/README.md
index aea0aa0b3..a44faf549 100644
--- a/partitioned-pipe/README.md
+++ b/partitioned-pipe/README.md
@@ -9,7 +9,7 @@ summary: This tutorial describes how to run a partitioned fluid simulation using
 
 ## Setup
 
-This scenario consists of two pipes connected in series. A fluid enters from the left (here $$ z=0 $$) boundary of the Fluid1 participant with a uniform velocity profile ($$ u_{\infty} = 0.1 m/s $$) and zero pressure gradient. In its starting, uncoupled state, it exits from the right side (outlet: zero velocity gradient, zero pressure). This is also the coupling interface with Fluid2, which has the same boundary conditions as Fluid1.
+This scenario consists of two pipes connected in series. A fluid enters from the left (here $$ z=0 $$) boundary of the Fluid1 participant with a uniform velocity profile ($$ u_{in} = 0.1 m/s $$) and zero pressure gradient. In its starting, uncoupled state, it exits from the right side (outlet: zero velocity gradient, zero pressure). This is also the coupling interface with Fluid2, which has the same boundary conditions as Fluid1.
 
 On the coupling interface, Fluid1 sends velocity and pressure gradient to Fluid2 and receives pressure. The additional pressure gradient exchange was found to help convergence [1], but this fluid-fluid coupling scenario is part of active research.
 
@@ -26,7 +26,7 @@ Both for Fluid1 and Fluid2, the following participants are available:
 All listed solvers can be used in order to run the simulation. Open two separate terminals and start the desired fluid1 and fluid2 participants by calling the respective run script. For example:
 
 ```
-cd fluid1-openfoam-pimpleFoam
+cd fluid1-openfoam-pimplefoam
 ./run.sh
 ```
 and

From 430d973fc30a403e0fdad6dfa75a07626ac9436b Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Mon, 12 Apr 2021 11:02:02 +0200
Subject: [PATCH 22/23] Formatting

---
 partitioned-pipe/fluid1-openfoam-pimplefoam/0/U | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U b/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U
index 71c0ce0c4..fd165fe4e 100644
--- a/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U
+++ b/partitioned-pipe/fluid1-openfoam-pimplefoam/0/U
@@ -6,7 +6,6 @@ FoamFile
     location    "0";
     object      U;
 }
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 dimensions      [0 1 -1 0 0 0 0];
 
@@ -29,6 +28,3 @@ boundaryField
         type            noSlip;
     }
 }
-
-
-// ************************************************************************* //

From 20201f88494c74bfb1878dadcbbd88b85f1e53e6 Mon Sep 17 00:00:00 2001
From: Gerasimos Chourdakis <makishourdakis@gmail.com>
Date: Mon, 12 Apr 2021 12:35:12 +0200
Subject: [PATCH 23/23] Remove images without references

---
 ...ials-partitioned-pipe-results-pimplefoam.png | Bin 31792 -> 0 bytes
 ...-pipe-results-sonicliquidfoam-pimpleFoam.png | Bin 33702 -> 0 bytes
 ...partitioned-pipe-results-sonicliquidfoam.png | Bin 30867 -> 0 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-pimplefoam.png
 delete mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam-pimpleFoam.png
 delete mode 100644 partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam.png

diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-pimplefoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-pimplefoam.png
deleted file mode 100644
index 947205482b980126371bab98f5a401af1fa21b11..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam-pimpleFoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam-pimpleFoam.png
deleted file mode 100644
index c0ae71db9faf02c80eb21d6adc2c4ff45807e738..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam.png b/partitioned-pipe/images/tutorials-partitioned-pipe-results-sonicliquidfoam.png
deleted file mode 100644
index f681968e17cd0cee84ee3ae406fe6470305d52af..0000000000000000000000000000000000000000
GIT binary patch
