Skip to content

Commit 2b5990b

Browse files
authored
Merge pull request #144 from su2code/master
update develop
2 parents 5ade274 + d4ac2e0 commit 2b5990b

File tree

9 files changed

+66
-33
lines changed

9 files changed

+66
-33
lines changed

_data/vandv.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
- swbli
1313
- LM_transition
1414

15-
- title: Incompressbile Flow
15+
- title: Incompressible Flow
1616
vandv:
1717
- SANDIA_jet

_docs_v7/Container-Development.md

+39-15
Original file line numberDiff line numberDiff line change
@@ -20,46 +20,57 @@ A container is a virtual runtime environment that runs on top of a single operat
2020

2121
We use [Docker](https://www.docker.com/) container during the software development life-cycle for running the regression tests and creating binaries for different operating systems during the release process. The execution of these containers is triggered by events (e.g. by a push to an open pull request) on Github using the [Github Actions](https://github.com/features/actions) feature.
2222

23-
The files for the creation of the containers can found in the [Docker-Builds](https://github.com/su2code/Docker-Builds) repository. Currently we have three different containers:
23+
The files for the creation of the containers can found in the [Docker-Builds](https://github.com/su2code/Docker-Builds) repository. Currently we have five different containers:
2424

25-
- **build-su2**: Based on Ubuntu 18.04 (GCC v7.4.0, OpenMPI v2.1.1) it features all necessary packages that are needed to compile SU2. Furthermore a script is provided (set as the [entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint)) that will checkout and compile a specific branch with provided build options.
26-
- **test-su2**: Based on the latest **build-su2** container. Includes a script that checks out the test cases and the tutorials and runs a specified test script.
27-
- **build-su2-cross**: Based on the latest **build-su2** container it features an environment to create binaries for Linux, MacOS and Windows. All libraries are linked statically (including a custom build MPICH v3.3.2) with the binaries if a host file is specified in order achieve portability. For more information have a look at the [ReadMe](https://github.com/su2code/Docker-Builds/blob/master/build_cross/README.md).
25+
- **build-su2**: Based on Ubuntu 20.04 (GCC v9.4.0, OpenMPI v4.0.3) it features all necessary packages that are needed to compile SU2. Furthermore a script is provided (set as the [entrypoint](https://docs.docker.com/engine/reference/builder/#entrypoint)) that will checkout and compile a specific branch with provided build options.
26+
- **test-su2**: Based on the corresponding version of the **build-su2** container. Includes a script that checks out the test cases and the tutorials and runs a specified test script.
27+
- **build-su2-cross**: Based on the corresponding version of the **build-su2** container. It features an environment to create binaries for Linux, MacOS and Windows. All libraries are linked statically (including a custom build MPICH v3.3.2) with the binaries if a host file is specified in order achieve portability. For more information have a look at the [ReadMe](https://github.com/su2code/Docker-Builds/blob/master/build_cross/README.md).
28+
- **build-su2-tsan**: Based on the same setup as **build-su2**, this container is intended to build SU2 with the thread sanitizer for automatic data race detection. To this end, it features a custom gcc build and provides a preconfigured environment for building with the thread sanitizer.
29+
- **test-su2-tsan**: Like **test-su2** but based on the corresponding version of the **build-su2-tsan** container instead. Can be used like **test-su2** and is intended for testing for data races.
2830

2931
**Note:** The build containers *do not* include binaries to run SU2, and they are not intended to do so (except for running the regression tests).
3032

3133
It is assumed that you have added your linux username to the `docker` group, like it is explained [here](https://docs.docker.com/install/linux/linux-postinstall/). Otherwise `sudo` is required to run docker. There also a [rootless version](https://docs.docker.com/engine/security/rootless/) available.
3234

33-
The most recent versions can be found on [Docker Hub](https://hub.docker.com/r/su2code/) and can be pulled with `docker pull su2code/*` (where `*` can be replaced with `build-su2`, `test-su2` or `build-su2-cross`) if docker is properly installed on your machine.
35+
The most recent versions of prebuilt container images can be found in the [GitHub container registry](https://github.com/orgs/su2code/packages). You can click on an image to see its versions and the command for pulling it, e.g., `docker pull ghcr.io/su2code/su2/build-su2:230704-1323` for a specific version of **build-su2**.
36+
3437

3538
In the following we give a small overview on how to use the containers to compile and run the tests. We will only cover basic commands for docker. If you are interested in learning more, check out the [official documentation](https://docs.docker.com/).
3639

40+
Please note that some of the examples refer to features that are only available in the latest [develop](https://github.com/su2code/SU2/tree/develop) branch of SU2.
41+
3742

3843
## Running a container ##
3944

4045
A container can be started using the `run` command and the name, e.g.
4146

4247
```
43-
docker run su2code/build-su2
48+
docker run su2code/su2/build-su2
4449
```
4550
You should see the following message, which means that everything works as intended:
4651
```
4752
SU2 v7 Docker Compilation Container
4853
SU2 source directory not found. Make sure to ...
4954
```
50-
The containers we provide all feature entrypoint scripts, i.e. a script that is executed when the container is started. If no arguments are given, like in the command above, it just prints an error message. The arguments of the compile and test scripts are discussed [here](#using-the-scripts-to-compile-su2). If the image does not already exist locally, it will be pulled from docker hub. You can specify a tag by adding `:tagname` to the name. If none is specified, it will use `:latest` by default. Let us have a look at the most important arguments for the `docker run` command:
55+
The containers we provide all feature entrypoint scripts, i.e. a script that is executed when the container is started. If no arguments are given, like in the command above, it just prints an error message. The arguments of the compile and test scripts are discussed [here](#using-the-scripts-to-compile-su2). Make sure to pull the image first, as explained above, or provide the full URL including a version tag, e.g., `ghcr.io/su2code/su2/build-su2:230704-1323`. Let us have a look at the most important arguments for the `docker run` command:
5156

5257
- `-ti` (or `--interactive --tty`): Needed to provide input to the container (stdin) via the terminal.
5358
- `--rm`: Automatically remove the container when it exits (otherwise ressources (disk space) are still occupied)
5459
- `--entrypoint <command>`: Override the entrypoint script with `<command>`.
5560
- `--volume <folder_on_host>:<folder_in_container>` (or `-v`): Bind mount a volume where `<folder_on_host>` is a local folder on the host and `<folder_in_container>` the mount location in the container.
5661
- `--workdir <directory>` (or `-w`): The working directory inside the container.
5762

63+
### Working interactively in a container ###
64+
5865
A typical call where the current directory on the host is mounted and used as working directory would look like this:
5966
```
60-
docker run -ti --rm -v $PWD:/workdir/ -w /workdir --entrypoint bash su2code/build-su2
67+
docker run -ti --rm -v $PWD:/workdir/ -w /workdir --entrypoint bash su2code/su2/build-su2
6168
```
62-
Here, we also override the entrypoint in order to execute a bash shell. Note, that all changes you make will be lost after you exit the container (except from changes in the working directory). Once in the bash you can simply use an existing or new clone of the repository to compile SU2 [the usual way](/docs_v7/Build-SU2-Linux-MacOS/).
69+
Here, we also override the entrypoint in order to execute a bash shell. Note that all changes you make will be lost after you exit the container (except from changes in the working directory). Once in the bash you can simply use an existing or new clone of the repository to compile SU2 [the usual way](/docs_v7/Build-SU2-Linux-MacOS/), run a regression test script, or execute a specific regression test.
70+
71+
This interactive way of using the container gives you most control over building and testing SU2, we recommend it particularly for running specific tests instead of entire test scripts, e.g., when debugging them with the thread sanitizer. If you look for an out-of-the-box way of compiling and testing SU2, please refer to the sections about using the scripts below.
72+
73+
If you want to build SU2 with the thread sanitizer, you work with the **build-su2-tsan** container instead and compile SU2 as explained above. Note that the thread sanitizer is only meaningful for SU2 builds with OpenMP. You don't have to supply any additional flags when configuring, compiling, or running, the container provides a fully configured environment. Any test executed with SU2 built this way will perform thread sanitizer analysis.
6374

6475

6576
## Using the scripts to compile SU2 ##
@@ -68,7 +79,7 @@ The scripts provide an easy way to directly clone and compile a specific branch
6879

6980
The [compile script](https://github.com/su2code/Docker-Builds/blob/master/build/compileSU2.sh) expects two arguments, the build flags for meson and the branch name. They are given with `-f` and `-b`, respectively. E.g. to compile the master branch with python wrapper enabled:
7081
```
71-
docker run -ti --rm su2code/build-su2 -f "-Denable-pywrapper=true" -b master
82+
docker run -ti --rm su2code/su2/build-su2 -f "-Denable-pywrapper=true" -b master
7283
```
7384

7485
### Accessing source code and binaries ###
@@ -82,7 +93,7 @@ Instead of checking out a fresh copy of the source code, it is also possible to
8293
```
8394
docker run -ti --rm -v ~/Documents/SU2:/workdir/src/SU2 \
8495
-v ~/Documents/SU2/bin:/workdir/install/ -w /workdir \
85-
su2code/build-su2 -f "-Denable-pywrapper=true"
96+
su2code/su2/build-su2 -f "-Denable-pywrapper=true"
8697
```
8798

8899
The binaries can then be found at `~/Documents/SU2/bin`.
@@ -99,7 +110,7 @@ The compiled binaries used for the tests must be mounted at `/install/bin`.
99110
The following command will clone the master branches of all required repositories and run the `parallel_regression.py` script:
100111
```
101112
docker run -ti --rm -v ~/Documents/SU2/bin:/workdir/install/bin \
102-
-w /workdir su2code/test-su2 -t master -b master -c master -s parallel_regression.py
113+
-w /workdir su2code/su2/test-su2 -t master -b master -c master -s parallel_regression.py
103114
```
104115

105116
Similar to the compilation script, you can use already existing clones of the repositories by mounting them at `<workdir>/src/Tutorials`, `<workdir>/src/SU2`, `<workdir>/src/TestData` and omitting the `-t`, `-b` or `-c` option, respectively.
@@ -108,9 +119,22 @@ The following example will compile SU2 using the `build-su2` container and then
108119

109120
```
110121
docker run -ti --rm -v $PWD:/workdir/ -w /workdir \
111-
su2code/build-su2 -f "-Denable-pywrapper=true" -b develop
122+
su2code/su2/build-su2 -f "-Denable-pywrapper=true" -b develop
112123
113124
docker run -ti --rm -v $PWD/install/bin:/workdir/install/bin -w /workdir \
114125
-v $PWD/src/SU2_develop:/workdir/src/SU2 \
115-
su2code/test-su2 -t develop -c develop -s parallel_regression.py
116-
```
126+
su2code/su2/test-su2 -t develop -c develop -s parallel_regression.py
127+
```
128+
129+
### Running thread sanitizer tests ###
130+
131+
If you want to run thread sanitizer tests, you have to build SU2 with the **build-su2-tsan** container and test with the **test-su2-tsan** container. Thread sanitizer analysis is only meaningful for OpenMP builds and the hybrid regression scripts. It is advisable to use optimized debug builds to reduce runtime while still getting useful stack traces. You should provide the `--tsan` flag to the test script, which disables tests that are either not compatible with the thread sanitizer or take too long to run. The following example demonstrates thread sanitizer testing.
132+
133+
```
134+
docker run -ti --rm -v $PWD:/workdir/ -w /workdir \
135+
su2code/su2/build-su2-tsan -f "--buildtype=debugoptimized -Dwith-omp=true" -b develop
136+
137+
docker run -ti --rm -v $PWD/install/bin:/workdir/install/bin -w /workdir \
138+
-v $PWD/src/SU2_develop:/workdir/src/SU2 \
139+
su2code/su2/test-su2-tsan -t develop -c develop -s hybrid_regression.py -a "--tsan"
140+
```

_docs_v7/Markers-and-BC.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,24 @@ MARKER_FAR= (farfield)
131131
| --- | --- |
132132
| `RANS`, `INC_RANS`, | 7.3.0 |
133133

134-
The turbulence boundary conditions do not have a `MARKER_` keyword for the SA Turbulence model but can instead be set for inlet and freestream boundaries using the keyword:
134+
The turbulence boundary conditions have a `MARKER_INLET_TURBULENT` keyword for the Turbulence models. For the SA turbulence model, ratio of turbulent to laminar viscosity can be provided at each inlet as follows:
135+
136+
```
137+
MARKER_INLET_TURBULENT= (inlet_marker1, NuFactor1, inlet_marker2, NuFactor2, ...)
138+
```
139+
140+
If 'MARKER_INLET_TURBULENT' is not provided in the .cfg file, SU2 will filled up the markers with the freestream option:
135141

136142
```
137143
FREESTREAM_NU_FACTOR= 3
138144
```
139145

140-
Conversely, for the SST turbulence model, it is possible to provide a 'MARKER_INLET' where turbulence intensity and turbulent-to-laminar ratio can be provided at each inlet as follows:
146+
Similarly, for the SST turbulence model, turbulence intensity and turbulent-to-laminar ratio can be provided at each inlet as follows:
141147

142148
```
143149
MARKER_INLET_TURBULENT= (inlet_1, TURBULENCEINTENSITY_1, TURB2LAMVISCRATIO_1 , inlet_2, TURBULENCEINTENSITY_1, TURB2LAMVISCRATIO_1 ,..)
144150
```
145-
If 'MARKER_INLET_TURBULENT' are not provided in the .cfg file, SU2 will filled up the markers with the freestream options:
151+
If 'MARKER_INLET_TURBULENT' is not provided in the .cfg file, SU2 will filled up the markers with the freestream options:
146152

147153
```
148154
FREESTREAM_TURBULENCEINTENSITY= 0.05

_docs_v7/Test-Cases.md

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ The two repositories contain the same directory structure for the test cases, wi
1414
$ git clone https://github.com/su2code/SU2.git
1515
$ git clone https://github.com/su2code/TestCases.git
1616
$ cd SU2/
17-
$ ./configure
18-
$ make install
1917
$ cp -R ../TestCases/* ./TestCases/
2018
$ cd ./TestCases/
2119
$ python serial_regression.py

_tutorials/incompressible_flow/Inc_Species_Transport_Composition_Dependent_Model/Inc_Species_Transport_Composition_Dependent_Model.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ MU_CONSTANT= 1.1102E-05, 1.8551E-05
131131
MIXING_VISCOSITY_MODEL = WILKE
132132
```
133133

134-
The Species transport is switched on by setting `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. For the mass diffusivity, the following models are available `DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY, CONSTANT_SCHMIDT, UNITY_LEWIS, CONSTANT_LEWIS` , where `CONSTANT_DIFFUSIVITY` is the default model. For the first two, a constant value must be specified in the.cfg file for all species, as it is done in the species transport tutorial [Inc_Species_Transport](/tutorials/Inc_Species_Transport/). For the UNITY_LEWIS, no values must be provided because the diffusivity is computed using the mixture thermal conductivity, density and heat capacity at constant pressure; for more information, please see $^{3}$. For highly diffusive gases, such as hydrogen, the `CONSTANT_LEWIS` option could be used. For this option, the Lewis numbers of the N-1 species for which a transport equation is being solved must be provided as a list using the option `CONSTANT_LEWIS_NUMBER= Le_1, Le_2, ..., Le_N_1`. Finally, for turbulent simulations, the turbulent diffusivity is computed based on the `SCHMIDT_NUMBER_TURBULENT`. For reference, please consult [the respective theory](/docs_v7/Theory/#species-transport).
134+
The Species transport is switched on by setting `KIND_SCALAR_MODEL= SPECIES_TRANSPORT`. For the mass diffusivity, the following models are available `DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY, CONSTANT_SCHMIDT, UNITY_LEWIS, CONSTANT_LEWIS` , where `CONSTANT_DIFFUSIVITY` is the default model. For the first two, a constant value must be specified in the.cfg file for all species, as it is done in the species transport tutorial [Inc_Species_Transport](/tutorials/Inc_Species_Transport/). For the UNITY_LEWIS, no values must be provided because the diffusivity is computed using the mixture thermal conductivity, density and heat capacity at constant pressure; for more information, please see $$^{3}$$. For highly diffusive gases, such as hydrogen, the `CONSTANT_LEWIS` option could be used. For this option, the Lewis numbers of the N-1 species for which a transport equation is being solved must be provided as a list using the option `CONSTANT_LEWIS_NUMBER= Le_1, Le_2, ..., Le_N_1`. Finally, for turbulent simulations, the turbulent diffusivity is computed based on the `SCHMIDT_NUMBER_TURBULENT`. For reference, please consult [the respective theory](/docs_v7/Theory/#species-transport).
135135

136136
Finally, for the SST model, it is possible to provide the intensity and turbulent-to-laminar viscosity ratios per inlet. For this option, we use the following structure: `MARKER_INLET_TURBULENT= (inlet_1, TurbIntensity_1, TurbLamViscRatio_1, inlet_2, TurbIntensity_2, TurbLamViscRatio_2, ...)`.
137137

138-
As final remarks, the option `SPECIES_USE_STRONG_BC` is advised to be set to `NO` when the convective scheme for species and turbulent are `CONV_NUM_METHOD_SPECIES= BOUNDED_SCALAR` and `CONV_NUM_METHOD_TURB= BOUNDED_SCALAR`, respectively. When `SCALAR_UPWIND` is used in both cases, the `SPECIES_USE_STRONG_BC` is advised to be switched to `YES` to enforce boundary conditions and improve convergence for this convective scheme. The convective scheme `BOUNDED_SCALAR` will be further explained in the section [Convective-Schemes](/docs_v7/Convective-Schemes/).
138+
As final remarks, the option `MARKER_SPECIES_STRONG_BC` is advised to not to be used when the convective scheme for species and turbulent are `CONV_NUM_METHOD_SPECIES= BOUNDED_SCALAR` and `CONV_NUM_METHOD_TURB= BOUNDED_SCALAR`, respectively. When `SCALAR_UPWIND` is used in both cases, the `MARKER_SPECIES_STRONG_BC` is advised to be used to enforce boundary conditions and improve convergence for this convective scheme. This can be used with the following structure `MARKER_SPECIES_STRONG_BC= (marker1, marker2, ....)`. The convective scheme `BOUNDED_SCALAR` will be further explained in the section [Convective-Schemes](/docs_v7/Convective-Schemes/).
139139

140140
Likewise, `SPECIES_CLIPPING= NO` is only recommended when the option `SCALAR_UPWIND` is used. The option `BOUNDED_SCALAR` performs well without using the clipping option.
141141

@@ -152,7 +152,6 @@ SPECIFIED_INLET_PROFILE= NO
152152
%
153153
INC_INLET_TYPE= VELOCITY_INLET VELOCITY_INLET
154154
MARKER_INLET= ( inlet_gas, 300, 5.0, 0.0, 0.0, 1.0, inlet_air, 300, 5.0, 0.0, 0.0, 1.0 )
155-
SPECIES_USE_STRONG_BC= NO
156155
MARKER_INLET_SPECIES= (inlet_gas, 1.0, inlet_air, 0.0 )
157156
%
158157
MARKER_INLET_TURBULENT= (inlet_gas, 0.05, 10, inlet_air, 0.05, 10)

_tutorials/multiphysics/steady_fsi/Static_FSI.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ RESTART_FILENAME = restart_fsi_steady
199199
VOLUME_FILENAME = fsi_steady
200200
```
201201

202-
where the volume files ```fsi_steady_*.vtu``` and restart files ```restart_fsi_steady_*.vtu``` will be appended the zone number.
202+
where the volume files ```fsi_steady_*.vtu``` and restart files ```restart_fsi_steady_*.dat``` will be appended the zone number.
203203

204204
#### Applying coupling conditions to the individual domains
205205

@@ -280,12 +280,14 @@ which will show the following convergence history:
280280

281281
The code is stopped as soon as the values of ```avg[bgs][0]``` and ```avg[bgs][1]``` are below the convergence criteria set in the config file.
282282

283-
The displacement field on the structural domain and the velocity field on the flow domain obtained in ```fsi_steady_1.vtu```_and ```fsi_steady_0.vtu``` respectively are shown below:
283+
The displacement field on the structural domain and the velocity field on the flow domain obtained in ```fsi_steady_1.vtu```_and ```fsi_steady_0.vtu``` respectively can be visualized with paraview and are shown below:
284284

285285
![FSI Results1](../../tutorials_files/multiphysics/steady_fsi/images/fsi2.png)
286286

287287
![FSI Results2](../../tutorials_files/multiphysics/steady_fsi/images/fsi3.png)
288288

289+
Note that the cantilever geometry is stored as the original undeformed geometry and a displacement field. In paraview, the geometry can be deformed to match the flow domain using the 'Warp by Vector' filter.
290+
289291
#### Relaxing the computation
290292

291293
In order to increase the speed of convergence, it is normally a good option to apply a relaxation

0 commit comments

Comments
 (0)