Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a perpendicular-flap tutorial case for Dune #239

Merged
merged 5 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion perpendicular-flap/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Perpendicular flap
permalink: tutorials-perpendicular-flap.html
keywords: fluid-structure interaction, FSI, OpenFOAM, FEniCS, Nutils, deal.II, Calculix, SU2,
keywords: fluid-structure interaction, FSI, OpenFOAM, FEniCS, Nutils, deal.II, Calculix, SU2, Dune
summary: This tutorial describes how to run a fluid-structure interaction using preCICE and any fluid-solid solver combination of our <a href="adapters-overview.html">officially provided adapter codes</a>.
---

Expand Down Expand Up @@ -33,6 +33,8 @@ Solid participant:

* deal.II. For compatibility reasons, the solver reads `Force` data from other `Fluid` participants. Reading and applying `Force` data is currently only implemented in the linear elastic solid model (`Model = linear` in the parameter file). Thus, the default simulation setup is only compatible with the linear elastic solid model. If you want to apply the non-linear solid model, please use `Stress` data for your read data, which is supported by the OpenFOAM adapter as well (example given in Turek-Hron-FSI). The `./run.sh` script takes the compiled executable `elasticity` as input argument (`run.sh -e=/path/to/elasticity`) and is required in case the executable is not discoverable at runtime (e.g. has been added to the system `PATH`). For more information, have a look at the [deal.II adapter documentation](https://precice.org/adapter-dealii-overview.html).

* Dune. The structural model is limited to linear elasticity. The solver reads `Force` data and writes `Displacement` data. The `./run.sh` script needs the compiled executable `solid-dune` in the same directory, which can be obtained by building the dune-adapter.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The executable generated from your module is called dune-perpendicular-flap and not solid-dune.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right! Thanks, I will change that.


## Running the Simulation

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:
Expand Down
154 changes: 154 additions & 0 deletions perpendicular-flap/solid-dune/Solid.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
64
1 -0.05 0 -0.5
2 -0.05 1 -0.5
3 0.05 1 -0.5
4 0.05 0 -0.5
5 -0.05 0.0666666666665325 -0.5
6 -0.05 0.1333333333330848 -0.5
7 -0.05 0.1999999999995569 -0.5
8 -0.05 0.266666666666029 -0.5
9 -0.05 0.3333333333325011 -0.5
10 -0.05 0.3999999999989731 -0.5
11 -0.05 0.4666666666654452 -0.5
12 -0.05 0.5333333333321025 -0.5
13 -0.05 0.599999999998945 -0.5
14 -0.05 0.6666666666657876 -0.5
15 -0.05 0.73333333333263 -0.5
16 -0.05 0.7999999999994725 -0.5
17 -0.05 0.8666666666663151 -0.5
18 -0.05 0.9333333333331575 -0.5
19 -0.0166666666667507 1 -0.5
20 0.01666666666657628 1 -0.5
21 0.05 0.9333333333330558 -0.5
22 0.05 0.866666666666204 -0.5
23 0.05 0.8 -0.5
24 0.05 0.7333333333337959 -0.5
25 0.05 0.6666666666675918 -0.5
26 0.05 0.6000000000013874 -0.5
27 0.05 0.5333333333351832 -0.5
28 0.05 0.466666666668609 -0.5
29 0.05 0.4000000000016649 -0.5
30 0.05 0.3333333333347207 -0.5
31 0.05 0.2666666666677765 -0.5
32 0.05 0.2000000000008324 -0.5
33 0.05 0.1333333333338883 -0.5
34 0.05 0.06666666666694399 -0.5
35 0.0166666666667507 0 -0.5
36 -0.01666666666657628 0 -0.5
37 -0.0166666666665879 0.06666666666666968 -0.5
38 0.01666666666673907 0.06666666666680683 -0.5
39 -0.01666666666659953 0.1333333333333527 -0.5
40 0.01666666666672744 0.1333333333336205 -0.5
41 -0.01666666666661116 0.1999999999999821 -0.5
42 0.01666666666671581 0.2000000000004072 -0.5
43 -0.01666666666662279 0.2666666666666115 -0.5
44 0.01666666666670419 0.266666666667194 -0.5
45 -0.01666666666663442 0.333333333333241 -0.5
46 0.01666666666669255 0.3333333333339808 -0.5
47 -0.01666666666664605 0.3999999999998704 -0.5
48 0.01666666666668092 0.4000000000007675 -0.5
49 -0.01666666666665767 0.4666666666664998 -0.5
50 0.01666666666666931 0.4666666666675544 -0.5
51 -0.01666666666666929 0.5333333333331293 -0.5
52 0.01666666666665767 0.5333333333341564 -0.5
53 -0.01666666666668093 0.5999999999997592 -0.5
54 0.01666666666664605 0.6000000000005733 -0.5
55 -0.01666666666669255 0.666666666666389 -0.5
56 0.01666666666663442 0.6666666666669904 -0.5
57 -0.01666666666670419 0.7333333333330185 -0.5
58 0.0166666666666228 0.7333333333334071 -0.5
59 -0.01666666666671581 0.7999999999996483 -0.5
60 0.01666666666661116 0.7999999999998242 -0.5
61 -0.01666666666672744 0.8666666666662781 -0.5
62 0.01666666666659953 0.8666666666662408 -0.5
63 -0.01666666666673907 0.9333333333331235 -0.5
64 0.0166666666665879 0.9333333333330895 -0.5
$EndNodes
$Elements
81
1 1 2 3 1 1 5
2 1 2 3 1 5 6
3 1 2 3 1 6 7
4 1 2 3 1 7 8
5 1 2 3 1 8 9
6 1 2 3 1 9 10
7 1 2 3 1 10 11
8 1 2 3 1 11 12
9 1 2 3 1 12 13
10 1 2 3 1 13 14
11 1 2 3 1 14 15
12 1 2 3 1 15 16
13 1 2 3 1 16 17
14 1 2 3 1 17 18
15 1 2 3 1 18 2
16 1 2 3 2 2 19
17 1 2 3 2 19 20
18 1 2 3 2 20 3
19 1 2 3 3 3 21
20 1 2 3 3 21 22
21 1 2 3 3 22 23
22 1 2 3 3 23 24
23 1 2 3 3 24 25
24 1 2 3 3 25 26
25 1 2 3 3 26 27
26 1 2 3 3 27 28
27 1 2 3 3 28 29
28 1 2 3 3 29 30
29 1 2 3 3 30 31
30 1 2 3 3 31 32
31 1 2 3 3 32 33
32 1 2 3 3 33 34
33 1 2 3 3 34 4
34 1 2 1 4 4 35
35 1 2 1 4 35 36
36 1 2 1 4 36 1
37 3 2 1 1 1 5 37 36
38 3 2 1 1 36 37 38 35
39 3 2 1 1 35 38 34 4
40 3 2 1 1 5 6 39 37
41 3 2 1 1 37 39 40 38
42 3 2 1 1 38 40 33 34
43 3 2 1 1 6 7 41 39
44 3 2 1 1 39 41 42 40
45 3 2 1 1 40 42 32 33
46 3 2 1 1 7 8 43 41
47 3 2 1 1 41 43 44 42
48 3 2 1 1 42 44 31 32
49 3 2 1 1 8 9 45 43
50 3 2 1 1 43 45 46 44
51 3 2 1 1 44 46 30 31
52 3 2 1 1 9 10 47 45
53 3 2 1 1 45 47 48 46
54 3 2 1 1 46 48 29 30
55 3 2 1 1 10 11 49 47
56 3 2 1 1 47 49 50 48
57 3 2 1 1 48 50 28 29
58 3 2 1 1 11 12 51 49
59 3 2 1 1 49 51 52 50
60 3 2 1 1 50 52 27 28
61 3 2 1 1 12 13 53 51
62 3 2 1 1 51 53 54 52
63 3 2 1 1 52 54 26 27
64 3 2 1 1 13 14 55 53
65 3 2 1 1 53 55 56 54
66 3 2 1 1 54 56 25 26
67 3 2 1 1 14 15 57 55
68 3 2 1 1 55 57 58 56
69 3 2 1 1 56 58 24 25
70 3 2 1 1 15 16 59 57
71 3 2 1 1 57 59 60 58
72 3 2 1 1 58 60 23 24
73 3 2 1 1 16 17 61 59
74 3 2 1 1 59 61 62 60
75 3 2 1 1 60 62 22 23
76 3 2 1 1 17 18 63 61
77 3 2 1 1 61 63 64 62
78 3 2 1 1 62 64 21 22
79 3 2 1 1 18 2 19 63
80 3 2 1 1 63 19 20 64
81 3 2 1 1 64 20 3 21
$EndElements
6 changes: 6 additions & 0 deletions perpendicular-flap/solid-dune/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_dune .
4 changes: 4 additions & 0 deletions perpendicular-flap/solid-dune/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -e -u

./solid-dune Solid.msh
14 changes: 13 additions & 1 deletion tools/cleaning-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ clean_fenics() {
set -e -u
cd "$1"
echo "--- Cleaning up FEniCS case in $(pwd)"
rm -fv ./*.pvd spooles.out Solid/FSI-S/*
rm -fv ./*.pvd spooles.out FSI-S/*
rm -rfv ./out/
rm -rfv ./preCICE-output/
clean_precice_logs .
Expand Down Expand Up @@ -116,3 +116,15 @@ clean_su2() {
clean_precice_logs .
)
}

clean_dune() {
(
set -e -u
cd "$1"
echo "--- Cleaning up DUNE case in $(pwd)"
rm -fv ./*.pvd
rm -fv ./*.vtu
rm -rfv ./preCICE-output/
clean_precice_logs .
)
}