You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: quickstart/README.md
+53-30Lines changed: 53 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,55 +12,78 @@ toc: false
12
12
---
13
13
14
14
15
+
This is the first step you may want to try if you are new to preCICE: install preCICE and some solvers, and run a simple coupled case.
15
16
16
-
## Start here
17
+
To get a feeling what preCICE does, watch a [short presentation](https://www.youtube.com/watch?v=FCv2FNUvKA8), a [longer talk on the fundamentals](https://www.youtube.com/watch?v=9EDFlgfpGBs), or [click through a tutorial in your browser](http://run.precice.org/).
17
18
18
-
1. To get a feeling what preCICE does, watch a [short presentation](https://www.youtube.com/watch?v=FCv2FNUvKA8), a [longer training session](https://www.youtube.com/watch?v=FCv2FNUvKA8), or [click through a tutorial in your browser](http://run.precice.org/).
19
-
2. Get and install preCICE. For Linux systems, this is pretty easy, for macOS and Windows still possible with a bit more effort. Just pick what suits you best on [this overview page](installation-overview.html). Facing any problems? [Ask for help](community-channels.html).
20
-
- For example, [download](https://github.com/precice/precice/releases/latest) and install our binary package for Ubuntu 20.04 (Focal Fossa) by clicking on it or using the following commands:
21
-
```shell
19
+
## Installation
20
+
21
+
1. Get and install preCICE. For Ubuntu 20.04 (Focal Fossa), this is pretty easy: [download](https://github.com/precice/precice/releases/latest) and install our binary package by clicking on it or using the following commands:
- If you prefer to try everything in an isolated environment, you may prefer using our [demo virtual machine](installation-vm.html).
26
-
3. We will use OpenFOAM here and in many of our tutorial cases, so [install OpenFOAM](adapter-openfoam-support.html) (most compatible version: latest ESI/OpenFOAM.com).
27
-
4. Download and install the [OpenFOAM-preCICE adapter](adapter-openfoam-get.html).
28
-
5. Couple OpenFOAM with a C++ rigid body solver. [Find the casein our tutorials](https://github.com/precice/tutorials/quickstart) and keep reading. You can either `git clone` the [tutorials repository](https://github.com/precice/tutorials), or [directly download the current state](https://github.com/precice/tutorials/archive/master.zip).
29
-
30
-
## What's next?
31
-
32
-
To become a preCICE pro:
26
+
- Are you using something else? Just pick what suits you best on [this overview page](installation-overview.html).
27
+
- Facing any problems? [Ask for help](community-channels.html).
28
+
2. We will use OpenFOAM here and in many of our tutorial cases, so [install OpenFOAM](adapter-openfoam-support.html):
29
+
```bash
30
+
# Add the signing key, add the repository, update (check this):
* Get an overview of the [preCICE docs](docs.html).
35
-
* See what users talk about in the [preCICE forum](https://precice.discourse.group/).
36
-
* Run [tutorials with other coupled solvers](tutorials.html).
37
-
* Watch some [preCICE videos](https://www.youtube.com/c/preCICECoupling/).
38
-
* Meet our [community](community.html).
39
-
* Find out how to [couple your own solver](couple-your-code-overview.html).
40
-
* Tell us [your story](community-projects.html).
47
+
If you prefer to easily try everything in an isolated environment, you may prefer using our [demo virtual machine](installation-vm.html).
41
48
49
+
## Case setup
42
50
43
-
## About the case
51
+
We will couple OpenFOAM with a C++ rigid body solver forfluid-structure interaction. The rigid body has only a single degree of freedom, namely the deflection angle of the flapin the channel. It is also fixed in the origin at (0,0) and the force exerted by the fluid on the rigid body structure causes an oscillatory rotation of the body. The simulation runs for 2.5 seconds.
44
52
45
-
This tutorial deals with a fluid-structure interaction problem. The fluid part of the simulation is computed using OpenFOAM and the rigid body motion is a rigid body model (implemented in C++) with only a single degree of freedom, namely the deflection angle of the flap in the channel. The rigid body is fixed in the origin at (0,0) and the force exerted by the fluid on the rigid body structure causes an oscillatory rotation of the body. The simulation runs for2.5 seconds. In order to gain more control over the rigid body oscillation, a rotational spring is applied at the rigid body origin. After 1.5 seconds we increase the spring constant by a factor of 8 to stabilize the coupled problem. Feel free to modify these parameters (directlyin`rigid_body_solver.cpp`) and increase the simulation time (in `precice-config.xml`).
53
+
In order to gain more control over the rigid body oscillation, a rotational spring is applied at the rigid body origin. After 1.5 seconds we increase the spring constant by a factor of 8 to stabilize the coupled problem. Feel free to modify these parameters (directly in`rigid_body_solver.cpp`) and increase the simulation time (in `precice-config.xml`).
46
54
47
55

48
56
49
-
### Building the rigid body solver
50
-
Before starting the coupled simulation, the rigid body solver needs to be built using CMake. You can run the following commands from this directory to build the `rigid_body_solver.cpp`
57
+
## Building the rigid body solver
58
+
59
+
Before starting the coupled simulation, the rigid body solver needs to be built using CMake. You can run the following commands from the `quickstart/` directory to build the `rigid_body_solver.cpp`
51
60
```
52
-
cd solid-cpp && cmake .&& make
61
+
cd solid-cpp
62
+
cmake .&& make
53
63
```
54
64
55
-
### Running the coupled simulation
65
+
## Running the coupled simulation
56
66
57
-
You may run the two simulations in two different terminals and watch their output on the screen using the `run.sh`scripts (or `run.sh -parallel`, option only available forOpenFOAM) locatedineach participant directory. You can cleanup the simulation using `clean.sh`.
67
+
You may run the two simulations in two different terminals and watch their output on the screen using `./run.sh` (or `./run.sh -parallel`, option only available for OpenFOAM) from inside the directory of each participant. You can cleanup the simulation using `./clean-tutorial.sh`.
58
68
69
+
In serial, the simulation should take roughly 30 seconds to compute.
59
70
60
-
In serial, the simulation takes roughly 30 seconds to compute.
71
+
## Visualizing the results
61
72
62
-
### Visualizing the results
73
+
You can visualize the simulation results of the `Fluid` participant using ParaView and loading the (empty) file `Fluid.foam`. The rigid body does not generate any readable output files, but the motion can be observed in the OpenFOAM data.
63
74
64
-
You can visualize the simulation results of the `Fluid` participant using ParaView (use `paraFoam` to trigger the OpenFOAM native reader or load the (empty) file `Fluid.foam` into ParaView). The rigid body doesn't generate any readable output files, but the motion can be observed in the OpenFOAM data. In addition, one could visualize the coupling meshes including the exchanged coupling data. preCICE generates the relevant files during the simulation and stores them in the directory `coupling-meshes`. In order to visualize the results, load the VTK files in ParaView and apply a `Glyph` filter. Depending on the specific ParaView version, you might additionally need to disable the `ScaleArray` option by selecting `No scale array`, since the exchanged data might be inappropriate for a scaling operation. You can further add a `Warp By Vector` filter with `Displacement` to deform the coupling data. The result would look the following way:
75
+
In addition, one could visualize the coupling meshes, including the exchanged coupling data. preCICE generates the relevant files during the simulation and stores them in the directory `coupling-meshes`. In order to visualize the results, load the VTK files in ParaView and apply a `Glyph` filter. Depending on the specific ParaView version, you might additionally need to disable the `ScaleArray` option by selecting `No scale array`, since the exchanged data might be inappropriate for a scaling operation. You can further add a `Warp By Vector` filter with `Displacement` to deform the coupling data. The result should look as follows:
65
76
66
77

78
+
79
+
## What's next?
80
+
81
+
To become a preCICE pro:
82
+
83
+
* Get an overview of the [preCICE docs](docs.html).
84
+
* See what users talk about in the [preCICE forum](https://precice.discourse.group/).
85
+
* Run [tutorials with other coupled solvers](tutorials.html).
86
+
* Watch some [preCICE videos](https://www.youtube.com/c/preCICECoupling/).
87
+
* Meet our [community](community.html).
88
+
* Find out how to [couple your own solver](couple-your-code-overview.html).
0 commit comments