Skip to content

Commit 8d248f3

Browse files
committed
Fix linting issues in Markdown files
1 parent 1cb0e2a commit 8d248f3

9 files changed

Lines changed: 97 additions & 61 deletions

File tree

elastic-tube-1d/README.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ We want to simulate the internal flow in a flexible tube as shown in the figure
1313

1414
![FSI3 setup](images/tutorials-elastic-tube-1d-setup.png)
1515

16-
The flow is assumed to be incompressible flow and gravity is neglected. Due to the axisymmetry, the flow can be described using a quasi-two-dimensional continuity and momentum equations. The motivation and exact formulation of the equations that we consider can be found in [2].
16+
The flow is assumed to be incompressible flow and gravity is neglected. Due to the axisymmetry, the flow can be described using a quasi-two-dimensional continuity and momentum equations. The motivation and exact formulation of the equations that we consider can be found in [2].
1717

1818
The following parameters have been chosen:
19+
1920
- Length of the tube: L = 10
2021
- Inlet velocity: $$ v_{inlet} = 10 + 3 sin (10 \pi t) $$
2122
- Initial cross sectional area = 1
@@ -24,27 +25,25 @@ The following parameters have been chosen:
2425
- Fluid density: $$ \rho = 1 $$
2526
- Young modulus: E = 10000
2627

27-
2828
## Available solvers
2929

3030
Both fluid and solid participant are supported in:
3131

32-
* *C++*: An example solver using the intrinsic [C++ API of preCICE](couple-your-code-api.html). This solver also depends on LAPACK (e.g. on Ubuntu `sudo apt-get install liblapack-dev`)
33-
* *Python*: An example solver using the preCICE [Python bindings](installation-bindings-python.html). This solver also depends on the Python libraries `numpy scipy matplotlib vtk mpi4py`, which you can get from your system package manager or with `pip3 install --user <package>`.
34-
32+
- *C++*: An example solver using the intrinsic [C++ API of preCICE](couple-your-code-api.html). This solver also depends on LAPACK (e.g. on Ubuntu `sudo apt-get install liblapack-dev`)
33+
- *Python*: An example solver using the preCICE [Python bindings](installation-bindings-python.html). This solver also depends on the Python libraries `numpy scipy matplotlib vtk mpi4py`, which you can get from your system package manager or with `pip3 install --user <package>`.
3534

3635
### Building the C++ Solver
3736

3837
In order to use the C++ solver, you first need to build the scripts `FluidSolver` and `SolidSolver`. Each script needs to be built separately.
3938

40-
```
39+
```bash
4140
cd fluid-cpp
4241
mkdir build && cd build
4342
cmake ..
4443
make all
4544
```
4645

47-
```
46+
```bash
4847
cd solid-cpp
4948
mkdir build && cd build
5049
cmake ..
@@ -53,38 +52,43 @@ make all
5352

5453
Building can be skipped if you do not plan to use the C++ version.
5554

56-
## Running the Simulation
55+
## Running the Simulation
5756

5857
### C++
5958

60-
Open two separate terminals and start each participant by calling the respective run script.
59+
Open two separate terminals and start each participant by calling the respective run script.
6160

62-
```
61+
```bash
6362
cd fluid-cpp
6463
./run.sh
6564
```
65+
6666
and
67-
```
67+
68+
```bash
6869
cd solid-cpp
6970
./run.sh
7071
```
7172

72-
The solvers use the parameters `N = 100`, `tau = 0.01`, `kappa = 100` by default and can be modified in the solver.
73+
The solvers use the parameters `N = 100`, `tau = 0.01`, `kappa = 100` by default and can be modified in the solver.
7374

7475
### Python
7576

7677
Open two separate terminals and start each participant by calling the respective run script. Only serial run is possible:
7778

78-
```
79+
```bash
7980
cd fluid-python
8081
./run.sh
8182
```
83+
8284
and
83-
```
85+
86+
```bash
8487
cd solid-python
8588
./run.sh
8689
```
87-
Parameters such as `N` can be modified directly at the `FluidSolver.py` and at the `SolidSolver.py`. The parameters must be consistent between the different solvers and participants.
90+
91+
Parameters such as `N` can be modified directly at the `FluidSolver.py` and at the `SolidSolver.py`. The parameters must be consistent between the different solvers and participants.
8892

8993
**Optional:** Visualization and video output of the fluid participant can be triggered via the options `--enable-plot` and `--write-video` of `FluidSolver.py`. To generate .vtk files during execution, you need to add the flag `--write-vtk`.
9094

@@ -95,21 +99,27 @@ Parameters such as `N` can be modified directly at the `FluidSolver.py` and at t
9599
## Post-processing
96100

97101
The results from each simulation are stored in each `fluid-<participant>/output/` folder. You can visualize these VTK files using the provided `plot-diameter.sh` script
102+
98103
```bash
99104
./plot-diameter.sh
100105
```
106+
101107
which will try to visualize the results from both fluid cases, if available.
102108

103109
This script calls the more flexible `plot-vtk.py` Python script, which you can use as
110+
104111
```bash
105112
python3 plot-vtk.py <quantity> <case>/output/<prefix>
106113
```
114+
107115
Note the required arguments specifying which quantity to plot (`pressure`, `velocity` or `diameter`) and the name prefix of the target vtk files.
108116

109117
For example, to plot the diameter of the fluid-python case using the default prefix for VTK files, `plot-diamter.sh` executes:
118+
110119
```bash
111120
python3 plot-vtk.py diameter fluid-python/output/out_fluid_
112121
```
122+
113123
![FSI3 setup](images/tutorials-elastic-tube-1d-diameter.png)
114124

115125
## References
@@ -120,8 +130,3 @@ python3 plot-vtk.py diameter fluid-python/output/out_fluid_
120130

121131
[3] M. Mehl, B. Uekermann, H. Bijl, D. Blom, B. Gatzhammer, and A. van Zuijlen.
122132
Parallel coupling numerics for partitioned fluid-structure interaction simulations. CAMWA, 2016.
123-
124-
125-
126-
127-

flow-over-heated-plate-nearest-projection/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ The solvers are currently only OpenFOAM related. For information regarding the n
2828

2929
Open two separate terminals and start each participant by calling the respective run script.
3030

31-
```
31+
```bash
3232
cd fluid-openfoam
3333
./run.sh
3434
```
35+
3536
and
36-
```
37+
38+
```bash
3739
cd solid-openfoam
3840
./run.sh
3941
```
@@ -45,22 +47,24 @@ You can also run OpenFOAM in parallel by `./run.sh -parallel`. If you are using
4547
As we are defining two meshes for each participant, we need to define them in the `precice-config.xml` and `preciceDict` configuration files. Additionally, we need to enable the `connectivity` switch for the adapter.
4648

4749
### Changes in `precice-config.xml`
50+
4851
In order to map from face nodes to face centers, both meshes need to be specified. The nodes-based mesh uses the write data and the centers-based mesh uses the read data. Have a look in the given `precice-config.xml` in this tutorial. Example: `Temperature` is calculated by the `Fluid` participant and passed to the `Solid` participant. Therefore, it is the write data of the participant `Fluid` and the read data of the participant `Solid`. This results in the following two meshes for this data:
49-
```
52+
53+
```xml
5054
<mesh name="Fluid-Mesh-Nodes">
5155
<use-data name="Temperature"/>
5256
</mesh>
5357
<mesh name="Solid-Mesh-Centers">
5458
<use-data name="Temperature"/>
5559
</mesh>
5660
```
61+
5762
All further changes follow from this interface splitting. Have a look in the given config files for all details.
5863

5964
### Notes on 2D Cases
6065

6166
From the preCICE point of view, the simulation here is in 3D, as opposed to the original 2D case, as is often the case with 3D solvers (such as OpenFOAM). In such cases, we recommend keeping the out-of-plane thickness of the domain small and comparable to the in-plane cell size. Otherwise, the face centers will have a large distance to the face nodes, which might trigger a preCICE warning and preCICE may even filter out one of the meshes, especially in parallel simulations.
6267

63-
6468
## Post-processing
6569

6670
Have a look at the [flow-over heated-plate](tutorials-flow-over-heated-plate.html) tutorial for the general aspects of post-processing.

multiple-perpendicular-flaps/README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ summary: In this case, a fluid and two solids are coupled together using a fully
1111

1212
In the following tutorial we model a fluid flowing through a channel. Two solid, elastic flaps are fixed to the floor of this channel. The flaps oscillate due to the fluid pressure building up on its surface. In this case, a fluid and two solids are coupled together using a fully-implicit multi-coupling scheme. The case setup is shown here:
1313

14-
![](images/tutorials-multiple-perpendicular-flaps-setup-two-flaps.png)
14+
![Setup](images/tutorials-multiple-perpendicular-flaps-setup-two-flaps.png)
1515

1616
The simulated flow domain is 6 units long (x) and 4 units tall (z). The flaps are clamped at the bottom (z=0) and they are 1 unit tall (z), 0.1 units long (x), and 0.3 units wide (y). Being located at x=-1 and x=1, the flaps split the domain into three equal parts.
1717

@@ -46,49 +46,61 @@ Most of the coupling details are specified in the file `precide-config.xml`. Her
4646

4747
For the simulation of the solid participants we use the deal.II adapter. In deal.II, the geometry of the domain is specified directly on the solver. The two flaps in our case are essentially the same but for the x-coordinate. The flap geometry is given to the solver when we select the scenario in the '.prm' file.
4848

49-
```
50-
set Scenario = PF
51-
```
49+
```text
50+
set Scenario = PF
51+
```
52+
5253
But to specify the position of the flap along the x-axis, we must specify it in the `Solid1/linear_elasticity.prm` file as follows:
5354

54-
```
55-
set Flap location = -1.0
56-
```
55+
```text
56+
set Flap location = -1.0
57+
```
58+
5759
While in case of `Solid2/linear_elasticity.prm` we write:
5860

59-
```
60-
set Flap location = 1.0
61-
```
61+
```text
62+
set Flap location = 1.0
63+
```
64+
6265
The scenario settings are implemented similarly for the nonlinear case.
6366

6467
## Running the Simulation
68+
6569
1. Preparation:
6670
To run the coupled simulation, copy the deal.II executable `linear_elasticity` or `nonlinear_elasticity` into the main folder. To learn how to obtain the deal.II executable take a look at the description on the [deal.II-adapter page](adapter-dealii-overview.html).
6771
2. Starting:
6872

6973
We are going to run each solver in a different terminal. It is important that first we navigate to the simulation directory so that all solvers start in the same directory.
7074
To start the `Fluid` participant, run:
71-
```
75+
76+
```bash
7277
cd fluid-openfoam
7378
./run.sh
7479
```
80+
7581
to start OpenFOAM in serial or
76-
```
82+
83+
```bash
7784
cd fluid-openfoam
7885
./run.sh -parallel
7986
```
87+
8088
for a parallel run.
8189

8290
The solid participants are only designed for serial runs. To run the `Solid1` participant, execute the corresponding deal.II binary file e.g. by:
83-
```
91+
92+
```bash
8493
cd solid-left-dealii
8594
./run.sh -linear
8695
```
96+
8797
Finally, in the third terminal we will run the solver for the `Solid2` participant by:
88-
```
98+
99+
```bash
89100
cd solid-right-dealii
90101
./run.sh -linear
91102
```
103+
92104
In case we want to run the nonlinear case, simply replace the flag`-linear` by `-nonlinear`.
93105

94106
## Postprocessing
@@ -100,4 +112,3 @@ After the simulation has finished, you can visualize your results using e.g. Par
100112
## References
101113

102114
[1] H. Bungartz, F. Linder, M. Mehl, B. Uekerman. A plug-and-play coupling approach for parallel multi-field simulations. 2014.
103-

partitioned-elastic-beam/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ We have a rectangular linear elastic beam of dimensions 1 x 1 x 8 m, divided in
1717

1818
* CalculiX. CalculiX is used for both structural parts. For more information, have a look at the [CalculiX adapter documentation](adapter-calculix-overview.html) for more.
1919

20-
2120
## Running the Simulation
2221

2322
The prepared case already contains configuration and mesh files, so that the simulation is ready to run. You can start the simulation by running the script `./run.sh` located in each participant directory. You will see both participants of the simulation running simultaneously.

partitioned-heat-conduction/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ For choosing whether you want to run the Dirichlet-kind and a Neumann-kind parti
3838

3939
For running the case, open two terminals run:
4040

41-
```
41+
```bash
4242
cd fenics
4343
./run.sh -d
4444
```
4545

4646
and
4747

48-
```
48+
```bash
4949
cd fenics
5050
./run.sh -n
5151
```
5252

5353
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
5454

55-
```
55+
```bash
5656
mpirun -n <N_PROC> heat.py -d
5757
```
5858

@@ -62,7 +62,7 @@ You can mix the Nutils and FEniCS solver, if you like. Note that the error for a
6262

6363
## Visualization
6464

65-
Output is written into the folders `fenics/out` and `nutils`.
65+
Output is written into the folders `fenics/out` and `nutils`.
6666

6767
For FEniCS you can visualize the content with paraview by opening the `*.pvd` files. The files `Dirichlet.pvd` and `Neumann.pvd` correspond to the numerical solution of the Dirichlet, respectively Neumann, problem, while the files with the prefix `ref` correspond to the analytical reference solution, the files with `error` show the error and the files with `ranks` the ranks of the solvers (if executed in parallel).
6868

partitioned-pipe/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ Both for Fluid1 and Fluid2, the following participants are available:
2525

2626
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:
2727

28-
```
28+
```bash
2929
cd fluid1-openfoam-pimplefoam
3030
./run.sh
3131
```
32+
3233
and
33-
```
34+
35+
```bash
3436
cd fluid2-openfoam-sonicliquidfoam
3537
./run.sh
3638
```

perpendicular-flap/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ Solid participant:
3737

3838
All listed solvers can be used in order to run the simulation. Open two separate terminals and start the desired fluid and solid participant by calling the respective run script `run.sh` located in the participant directory. For example:
3939

40-
```
40+
```bash
4141
cd fluid-openfoam
4242
./run.sh
4343
```
44+
4445
and
45-
```
46+
47+
```bash
4648
cd solid-fenics
4749
./run.sh
4850
```
49-
in order to use OpenFOAM and FEniCS for this test case.
5051

52+
in order to use OpenFOAM and FEniCS for this test case.
5153

5254
## Post-processing
5355

@@ -57,7 +59,6 @@ CalculiX exports results in `.frd` format, which you can visualize in CGX (`cgx
5759

5860
As we defined a watchpoint on the 'Solid' participant at the flap tip (see `precice-config.xml`), we can plot it with gnuplot using the script `plot-displacement.sh.` You need to specify the directory of the selected solid participant as a command line argument, so that the script can pick-up the desired watchpoint file, e.g. `plot-displacement.sh solid-fenics`. The resulting graph shows the x displacement of the flap tip. You can modify the script to plot the force instead.
5961

60-
6162
![Flap watchpoint](images/tutorials-perpendicular-flap-displacement-watchpoint.png)
6263

6364
There is moreover a script `plot-all-displacements.sh` to plot and compare all possible variants. This script expects all watchpoint logs to be available in a subfolder `watchpoints` in the format `openfoam-dealii.log` or similar. If you want to use this script, you need to copy the files over accordingly.

0 commit comments

Comments
 (0)