Skip to content

Commit 9fab7e0

Browse files
MakisHuekerman
andauthored
Rename multiple-perpendicular-flaps mesh names (#303)
* Rename multiple-perpendicular-flaps mesh names * Rename participant and meshes Solid1 becomes Solid-Left, and Solid2 becomes Solid-Right following the directory names. We could further rename these, together with the directory names. For the Fluid meshes, we just use Upstream and Downstream as indicators. For the Solid meshes, we follow the usual Participant-Mesh name. The data fields are named based on the Upstream/Downstream. * Rename OpenFOAM interfaces based on patches * Rename OpenFOAM interfaces * Rename Left and Right to Upstream and Downstream * Rename folder left and right * Fix more outdated things in README * Update plotDispls script * Fix the other script as well Co-authored-by: Benjamin Uekermann <benjamin.uekermann@ipvs.uni-stuttgart.de>
1 parent 782b2b1 commit 9fab7e0

11 files changed

Lines changed: 98 additions & 100 deletions

File tree

multiple-perpendicular-flaps/README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ We can set this in our `precice-config.xml`:
3434
```xml
3535
<coupling-scheme:multi>
3636
<participant name="Fluid" control="yes"/>
37-
<participant name="Solid1" />
38-
<participant name="Solid2" />
37+
<participant name="Solid-Upstream" />
38+
<participant name="Solid-Downstream" />
3939
```
4040

4141
The participant that has the control is the one that it is connected to all other participants. This is why we have chosen the fluid participant for this task.
@@ -44,21 +44,21 @@ The participant that has the control is the one that it is connected to all othe
4444

4545
For the fluid participant we use OpenFOAM. In particular, we use the application `pimpleFoam`. The geometry of the Fluid participant is defined in the file `Fluid/system/blockMeshDict`. Besides, we must specify where are we exchanging data with the other participants. The interfaces are set in the file `Fluid/system/preciceDict`. In this file, we set to exchange stress and displacement on the surface of each flap.
4646

47-
Most of the coupling details are specified in the file `precide-config.xml`. Here we estipulate the order in which we read/write data from one participant to another or how we map from the fluid to the solid's mesh. In particular, we have chosen the nearest-neighbor mapping scheme.
47+
Most of the coupling details are specified in the file `precice-config.xml`. Here we estipulate the order in which we read/write data from one participant to another or how we map from the fluid to the solid's mesh. In particular, we have chosen the nearest-neighbor mapping scheme.
4848

4949
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.
5050

5151
```text
5252
set Scenario = PF
5353
```
5454

55-
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:
55+
But to specify the position of the flap along the x-axis, we must specify it in the `solid-upstream-dealii/parameters.prm` file as follows:
5656

5757
```text
5858
set Flap location = -1.0
5959
```
6060

61-
While in case of `Solid2/linear_elasticity.prm` we write:
61+
While in case of `solid-downstream-dealii/parameters.prm` we write:
6262

6363
```text
6464
set Flap location = 1.0
@@ -69,7 +69,7 @@ The scenario settings are implemented similarly for the nonlinear case.
6969
## Running the Simulation
7070

7171
1. Preparation:
72-
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](https://www.precice.org/adapter-dealii-overview.html).
72+
To run the coupled simulation, copy the deal.II executable `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](https://www.precice.org/adapter-dealii-overview.html).
7373
2. Starting:
7474

7575
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.
@@ -89,22 +89,20 @@ The scenario settings are implemented similarly for the nonlinear case.
8989

9090
for a parallel run.
9191

92-
The solid participants are only designed for serial runs. To run the `Solid1` participant, execute the corresponding deal.II binary file e.g. by:
92+
The solid participants are only designed for serial runs. To run the `Solid-Upstream` participant, execute the corresponding deal.II binary file e.g. by:
9393

9494
```bash
95-
cd solid-left-dealii
96-
./run.sh -linear
95+
cd solid-upstream-dealii
96+
./run.sh
9797
```
9898

99-
Finally, in the third terminal we will run the solver for the `Solid2` participant by:
99+
Finally, in the third terminal we will run the solver for the `Solid-Downstream` participant by:
100100

101101
```bash
102-
cd solid-right-dealii
103-
./run.sh -linear
102+
cd solid-downstream-dealii
103+
./run.sh
104104
```
105105

106-
In case we want to run the nonlinear case, simply replace the flag`-linear` by `-nonlinear`.
107-
108106
## Postprocessing
109107

110108
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.

multiple-perpendicular-flaps/fluid-openfoam/system/preciceDict

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ modules (FSI);
1414

1515
interfaces
1616
{
17-
Interface1
17+
Upstream-Centers
1818
{
19-
mesh Fluid1-Mesh-Centers;
19+
mesh Fluid-Upstream-Mesh-Centers;
2020
patches (flap1);
2121
locations faceCenters;
2222

@@ -26,29 +26,29 @@ interfaces
2626

2727
writeData
2828
(
29-
Stress1
29+
Stress-Upstream
3030
);
3131
};
3232

33-
Interface2
33+
Upstream-Nodes
3434
{
35-
mesh Fluid1-Mesh-Nodes;
35+
mesh Fluid-Upstream-Mesh-Nodes;
3636
patches (flap1);
3737
locations faceNodes;
3838

3939
readData
4040
(
41-
Displacement1
41+
Displacement-Upstream
4242
);
4343

4444
writeData
4545
(
4646
);
4747
};
4848

49-
Interface3
49+
Downstream-Centers
5050
{
51-
mesh Fluid2-Mesh-Centers;
51+
mesh Fluid-Downstream-Mesh-Centers;
5252
patches (flap2);
5353
locations faceCenters;
5454

@@ -58,19 +58,19 @@ interfaces
5858

5959
writeData
6060
(
61-
Stress2
61+
Stress-Downstream
6262
);
6363
};
6464

65-
Interface4
65+
Downstream-Nodes
6666
{
67-
mesh Fluid2-Mesh-Nodes;
67+
mesh Fluid-Downstream-Mesh-Nodes;
6868
patches (flap2);
6969
locations faceNodes;
7070

7171
readData
7272
(
73-
Displacement2
73+
Displacement-Downstream
7474
);
7575

7676
writeData

multiple-perpendicular-flaps/precice-config.xml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -8,110 +8,110 @@
88
</log>
99

1010
<solver-interface dimensions="2">
11-
<data:vector name="Stress1" />
12-
<data:vector name="Displacement1" />
13-
<data:vector name="Stress2" />
14-
<data:vector name="Displacement2" />
11+
<data:vector name="Stress-Upstream" />
12+
<data:vector name="Displacement-Upstream" />
13+
<data:vector name="Stress-Downstream" />
14+
<data:vector name="Displacement-Downstream" />
1515

16-
<mesh name="Fluid1-Mesh-Centers">
17-
<use-data name="Stress1" />
16+
<mesh name="Fluid-Upstream-Mesh-Centers">
17+
<use-data name="Stress-Upstream" />
1818
</mesh>
1919

20-
<mesh name="Fluid1-Mesh-Nodes">
21-
<use-data name="Displacement1" />
20+
<mesh name="Fluid-Upstream-Mesh-Nodes">
21+
<use-data name="Displacement-Upstream" />
2222
</mesh>
2323

24-
<mesh name="Fluid2-Mesh-Centers">
25-
<use-data name="Stress2" />
24+
<mesh name="Fluid-Downstream-Mesh-Centers">
25+
<use-data name="Stress-Downstream" />
2626
</mesh>
2727

28-
<mesh name="Fluid2-Mesh-Nodes">
29-
<use-data name="Displacement2" />
28+
<mesh name="Fluid-Downstream-Mesh-Nodes">
29+
<use-data name="Displacement-Downstream" />
3030
</mesh>
3131

32-
<mesh name="Solid1-Mesh">
33-
<use-data name="Displacement1" />
34-
<use-data name="Stress1" />
32+
<mesh name="Solid-Upstream-Mesh">
33+
<use-data name="Displacement-Upstream" />
34+
<use-data name="Stress-Upstream" />
3535
</mesh>
3636

37-
<mesh name="Solid2-Mesh">
38-
<use-data name="Displacement2" />
39-
<use-data name="Stress2" />
37+
<mesh name="Solid-Downstream-Mesh">
38+
<use-data name="Displacement-Downstream" />
39+
<use-data name="Stress-Downstream" />
4040
</mesh>
4141

4242
<participant name="Fluid">
43-
<use-mesh name="Fluid1-Mesh-Nodes" provide="yes" />
44-
<use-mesh name="Fluid1-Mesh-Centers" provide="yes" />
45-
<use-mesh name="Solid1-Mesh" from="Solid1" />
46-
<use-mesh name="Fluid2-Mesh-Nodes" provide="yes" />
47-
<use-mesh name="Fluid2-Mesh-Centers" provide="yes" />
48-
<use-mesh name="Solid2-Mesh" from="Solid2" />
49-
<read-data name="Displacement1" mesh="Fluid1-Mesh-Nodes" />
50-
<write-data name="Stress1" mesh="Fluid1-Mesh-Centers" />
51-
<read-data name="Displacement2" mesh="Fluid2-Mesh-Nodes" />
52-
<write-data name="Stress2" mesh="Fluid2-Mesh-Centers" />
43+
<use-mesh name="Fluid-Upstream-Mesh-Nodes" provide="yes" />
44+
<use-mesh name="Fluid-Upstream-Mesh-Centers" provide="yes" />
45+
<use-mesh name="Solid-Upstream-Mesh" from="Solid-Upstream" />
46+
<use-mesh name="Fluid-Downstream-Mesh-Nodes" provide="yes" />
47+
<use-mesh name="Fluid-Downstream-Mesh-Centers" provide="yes" />
48+
<use-mesh name="Solid-Downstream-Mesh" from="Solid-Downstream" />
49+
<read-data name="Displacement-Upstream" mesh="Fluid-Upstream-Mesh-Nodes" />
50+
<write-data name="Stress-Upstream" mesh="Fluid-Upstream-Mesh-Centers" />
51+
<read-data name="Displacement-Downstream" mesh="Fluid-Downstream-Mesh-Nodes" />
52+
<write-data name="Stress-Downstream" mesh="Fluid-Downstream-Mesh-Centers" />
5353
<mapping:nearest-neighbor
5454
direction="read"
55-
from="Solid1-Mesh"
56-
to="Fluid1-Mesh-Nodes"
55+
from="Solid-Upstream-Mesh"
56+
to="Fluid-Upstream-Mesh-Nodes"
5757
constraint="consistent" />
5858
<mapping:nearest-neighbor
5959
direction="read"
60-
from="Solid2-Mesh"
61-
to="Fluid2-Mesh-Nodes"
60+
from="Solid-Downstream-Mesh"
61+
to="Fluid-Downstream-Mesh-Nodes"
6262
constraint="consistent" />
6363
</participant>
6464

65-
<participant name="Solid1">
66-
<use-mesh name="Solid1-Mesh" provide="yes" />
67-
<use-mesh name="Fluid1-Mesh-Centers" from="Fluid" />
68-
<read-data name="Stress1" mesh="Solid1-Mesh" />
69-
<write-data name="Displacement1" mesh="Solid1-Mesh" />
70-
<watch-point mesh="Solid1-Mesh" name="Flap-Tip" coordinate="-1.05;1" />
65+
<participant name="Solid-Upstream">
66+
<use-mesh name="Solid-Upstream-Mesh" provide="yes" />
67+
<use-mesh name="Fluid-Upstream-Mesh-Centers" from="Fluid" />
68+
<read-data name="Stress-Upstream" mesh="Solid-Upstream-Mesh" />
69+
<write-data name="Displacement-Upstream" mesh="Solid-Upstream-Mesh" />
70+
<watch-point mesh="Solid-Upstream-Mesh" name="Flap-Tip" coordinate="-1.05;1" />
7171
<mapping:nearest-neighbor
7272
direction="read"
73-
from="Fluid1-Mesh-Centers"
74-
to="Solid1-Mesh"
73+
from="Fluid-Upstream-Mesh-Centers"
74+
to="Solid-Upstream-Mesh"
7575
constraint="consistent" />
7676
</participant>
7777

78-
<participant name="Solid2">
79-
<use-mesh name="Solid2-Mesh" provide="yes" />
80-
<use-mesh name="Fluid2-Mesh-Centers" from="Fluid" />
81-
<read-data name="Stress2" mesh="Solid2-Mesh" />
82-
<write-data name="Displacement2" mesh="Solid2-Mesh" />
83-
<watch-point mesh="Solid2-Mesh" name="Flap-Tip" coordinate="0.95;1" />
78+
<participant name="Solid-Downstream">
79+
<use-mesh name="Solid-Downstream-Mesh" provide="yes" />
80+
<use-mesh name="Fluid-Downstream-Mesh-Centers" from="Fluid" />
81+
<read-data name="Stress-Downstream" mesh="Solid-Downstream-Mesh" />
82+
<write-data name="Displacement-Downstream" mesh="Solid-Downstream-Mesh" />
83+
<watch-point mesh="Solid-Downstream-Mesh" name="Flap-Tip" coordinate="0.95;1" />
8484
<mapping:nearest-neighbor
8585
direction="read"
86-
from="Fluid2-Mesh-Centers"
87-
to="Solid2-Mesh"
86+
from="Fluid-Downstream-Mesh-Centers"
87+
to="Solid-Downstream-Mesh"
8888
constraint="consistent" />
8989
</participant>
9090

91-
<m2n:sockets from="Fluid" to="Solid1" exchange-directory=".." />
92-
<m2n:sockets from="Fluid" to="Solid2" exchange-directory=".." />
91+
<m2n:sockets from="Fluid" to="Solid-Upstream" exchange-directory=".." />
92+
<m2n:sockets from="Fluid" to="Solid-Downstream" exchange-directory=".." />
9393

9494
<coupling-scheme:multi>
9595
<time-window-size value="0.01" />
9696
<max-time value="5" />
9797
<participant name="Fluid" control="yes" />
98-
<participant name="Solid1" />
99-
<participant name="Solid2" />
100-
<exchange data="Stress1" mesh="Fluid1-Mesh-Centers" from="Fluid" to="Solid1" />
101-
<exchange data="Stress2" mesh="Fluid2-Mesh-Centers" from="Fluid" to="Solid2" />
102-
<exchange data="Displacement1" mesh="Solid1-Mesh" from="Solid1" to="Fluid" />
103-
<exchange data="Displacement2" mesh="Solid2-Mesh" from="Solid2" to="Fluid" />
98+
<participant name="Solid-Upstream" />
99+
<participant name="Solid-Downstream" />
100+
<exchange data="Stress-Upstream" mesh="Fluid-Upstream-Mesh-Centers" from="Fluid" to="Solid-Upstream" />
101+
<exchange data="Stress-Downstream" mesh="Fluid-Downstream-Mesh-Centers" from="Fluid" to="Solid-Downstream" />
102+
<exchange data="Displacement-Upstream" mesh="Solid-Upstream-Mesh" from="Solid-Upstream" to="Fluid" />
103+
<exchange data="Displacement-Downstream" mesh="Solid-Downstream-Mesh" from="Solid-Downstream" to="Fluid" />
104104
<max-iterations value="50" />
105-
<relative-convergence-measure limit="1e-4" data="Stress1" mesh="Fluid1-Mesh-Centers" />
106-
<relative-convergence-measure limit="1e-4" data="Displacement1" mesh="Solid1-Mesh" />
107-
<relative-convergence-measure limit="1e-4" data="Stress2" mesh="Fluid2-Mesh-Centers" />
108-
<relative-convergence-measure limit="1e-4" data="Displacement2" mesh="Solid2-Mesh" />
105+
<relative-convergence-measure limit="1e-4" data="Stress-Upstream" mesh="Fluid-Upstream-Mesh-Centers" />
106+
<relative-convergence-measure limit="1e-4" data="Displacement-Upstream" mesh="Solid-Upstream-Mesh" />
107+
<relative-convergence-measure limit="1e-4" data="Stress-Downstream" mesh="Fluid-Downstream-Mesh-Centers" />
108+
<relative-convergence-measure limit="1e-4" data="Displacement-Downstream" mesh="Solid-Downstream-Mesh" />
109109
<extrapolation-order value="2" />
110110
<acceleration:IQN-ILS>
111-
<data name="Displacement1" mesh="Solid1-Mesh" />
112-
<data name="Displacement2" mesh="Solid2-Mesh" />
113-
<data name="Stress1" mesh="Fluid1-Mesh-Centers" />
114-
<data name="Stress2" mesh="Fluid2-Mesh-Centers" />
111+
<data name="Displacement-Upstream" mesh="Solid-Upstream-Mesh" />
112+
<data name="Displacement-Downstream" mesh="Solid-Downstream-Mesh" />
113+
<data name="Stress-Upstream" mesh="Fluid-Upstream-Mesh-Centers" />
114+
<data name="Stress-Downstream" mesh="Fluid-Downstream-Mesh-Centers" />
115115
<preconditioner type="residual-sum" />
116116
<filter type="QR1" limit="1e-6" />
117117
<initial-relaxation value="0.1" />

multiple-perpendicular-flaps/solid-left-dealii/clean.sh renamed to multiple-perpendicular-flaps/solid-downstream-dealii/clean.sh

File renamed without changes.

multiple-perpendicular-flaps/solid-right-dealii/parameters.prm renamed to multiple-perpendicular-flaps/solid-downstream-dealii/parameters.prm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ subsection precice configuration
6868
set precice config-file = ../precice-config.xml
6969

7070
# Name of the participant in the precice-config.xml file
71-
set Participant name = Solid2
71+
set Participant name = Solid-Downstream
7272

7373
# Name of the coupling mesh in the precice-config.xml file
74-
set Mesh name = Solid2-Mesh
74+
set Mesh name = Solid-Downstream-Mesh
7575

7676
# Name of the read data in the precice-config.xml file
77-
set Read data name = Stress2
77+
set Read data name = Stress-Downstream
7878

7979
# Name of the write data in the precice-config.xml file
80-
set Write data name = Displacement2
80+
set Write data name = Displacement-Downstream
8181

8282
# PF x-location
8383
set Flap location = 1.0

multiple-perpendicular-flaps/solid-right-dealii/plot-displacement.sh renamed to multiple-perpendicular-flaps/solid-downstream-dealii/plot-displacement.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set grid
44
set title 'Displacement of the Flap Tip'
55
set xlabel 'Time [s]'
66
set ylabel 'X-Displacement [m]'
7-
plot "precice-Solid2-watchpoint-flap_tip.log" using 1:4 title 'Top displacemement' with lines
7+
plot "precice-Solid-Downstream-watchpoint-flap_tip.log" using 1:4 title 'Top displacemement' with lines
88
EOF
99

multiple-perpendicular-flaps/solid-left-dealii/run.sh renamed to multiple-perpendicular-flaps/solid-downstream-dealii/run.sh

File renamed without changes.

multiple-perpendicular-flaps/solid-right-dealii/clean.sh renamed to multiple-perpendicular-flaps/solid-upstream-dealii/clean.sh

File renamed without changes.

multiple-perpendicular-flaps/solid-left-dealii/parameters.prm renamed to multiple-perpendicular-flaps/solid-upstream-dealii/parameters.prm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ subsection precice configuration
6868
set precice config-file = ../precice-config.xml
6969

7070
# Name of the participant in the precice-config.xml file
71-
set Participant name = Solid1
71+
set Participant name = Solid-Upstream
7272

7373
# Name of the coupling mesh in the precice-config.xml file
74-
set Mesh name = Solid1-Mesh
74+
set Mesh name = Solid-Upstream-Mesh
7575

7676
# Name of the read data in the precice-config.xml file
77-
set Read data name = Stress1
77+
set Read data name = Stress-Upstream
7878

7979
# Name of the write data in the precice-config.xml file
80-
set Write data name = Displacement1
80+
set Write data name = Displacement-Upstream
8181

8282
# PF x-location
8383
set Flap location = -1.0

multiple-perpendicular-flaps/solid-left-dealii/plot-displacement.sh renamed to multiple-perpendicular-flaps/solid-upstream-dealii/plot-displacement.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set grid
44
set title 'Displacement of the Flap Tip'
55
set xlabel 'Time [s]'
66
set ylabel 'X-Displacement [m]'
7-
plot "precice-Solid1-watchpoint-flap_tip.log" using 1:4 title 'Top displacemement' with lines
7+
plot "precice-Solid-Upstream-watchpoint-flap_tip.log" using 1:4 title 'Top displacemement' with lines
88
EOF
99

0 commit comments

Comments
 (0)