Skip to content

Commit 981be8d

Browse files
authored
Merge pull request #74 from su2code/improve_unsteady_tutorial
fix inconsistencies in unsteady tutorial
2 parents bb72f9f + fd82f97 commit 981be8d

File tree

2 files changed

+18
-32
lines changed

2 files changed

+18
-32
lines changed

_tutorials/compressible_flow/Unsteady_NACA0012/Unsteady_NACA0012.md

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Furthermore, the user is introduced in the so-called windowing approach, a regul
2424
- Dual time-stepping for unsteady flows
2525
- Windowing
2626
- Time-convergence
27-
- Code parallelism (optional)
2827

2928
This tutorial also provides an explanation for properly setting up viscous, compressible, unsteady 2D flow conditions in SU2.
3029
We also introduce a new type of time-convergence criteria for periodic flows, which monitors the change of the time-average of a specific objective, such as lift or drag, in order to assess convergence.
@@ -69,8 +68,8 @@ Figure (3): Close-up view of the airfoil surface and the aerodynamic coefficient
6968

7069
### Configuration File Options ###
7170

72-
Configuration of the physical problem is similar to the ONERA M6 tutorial, that one can access [here](../Turbulent_ONERAM6). However, contrary to the ONERA M6 case, here a unsteady simulation is performed, hence, the Unsteady RANS (URANS) equations in 2D must be solved.
73-
Unsteady simulations in SU2 are computed by employing a dual time-stepping scheme. To this end, one first performs a spatial discretization as explained in the [ONERA M6](../Turbulent_ONERAM6) tutorial.
71+
Configuration of the physical problem is similar to the ONERA M6 tutorial, that one can access [here](../Turbulent_ONERAM6). However, contrary to the ONERA M6 case, here an unsteady simulation is performed, hence, the Unsteady RANS (URANS) equations in 2D must be solved.
72+
Unsteady RANS simulations in SU2 are typically computed via the dual time-stepping approach. To this end, one first performs a spatial discretization as explained in the [ONERA M6](../Turbulent_ONERAM6) tutorial.
7473
After that, a time discretization in physical time is performed, that results in a residual equation of the form
7574

7675
$$ R(u^n) = 0 \qquad \forall n=1,\dots,N. $$
@@ -97,13 +96,13 @@ TIME_DOMAIN = YES
9796
TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER
9897
%
9998
% Time Step for dual time stepping simulations (s)
100-
TIME_STEP= 5e-3
99+
TIME_STEP= 5e-4
101100
%
102101
% Maximum Number of physical time steps.
103-
TIME_ITER= 2200
102+
TIME_ITER= 2000
104103
%
105104
% Number of internal iterations (dual time method)
106-
INNER_ITER= 50
105+
INNER_ITER= 10
107106
%
108107
% Time discretization for inner iteration.
109108
TIME_DISCRE_FLOW= EULER_IMPLICIT
@@ -167,10 +166,10 @@ WINDOW_CAUCHY_CRIT = YES
167166
CONV_WINDOW_FIELD= (TAVG_DRAG, TAVG_LIFT)
168167
%
169168
% Number of elements to apply the criteria
170-
CONV_WINDOW_CAUCHY_ELEMS= 100
169+
CONV_WINDOW_CAUCHY_ELEMS= 10
171170
%
172171
% Epsilon to control the series convergence
173-
CONV_WINDOW_CAUCHY_EPS= 1E-2
172+
CONV_WINDOW_CAUCHY_EPS= 1E-4
174173
%
175174
% Number of iterations to wait after the iteration specified in WINDOW_START_ITER.
176175
CONV_WINDOW_STARTITER = 10
@@ -197,37 +196,25 @@ RESTART_ITER = 499
197196

198197
### Running SU2
199198

200-
Instructions for running this test case are given here for both serial and parallel computations.
201-
202-
#### In Serial
203-
204-
The wing mesh should fit on a single-core machine. To run this test case in serial, follow these steps at a terminal command line:
205-
1. Move to the directory containing the config file (unsteady_NACA0012.cfg) and the mesh file (unsteady_NACA0012_mesh.su2). Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path.
206-
2. Run the executable by entering in the command line:
207-
199+
The airfoil mesh should fit on a single-core machine. To run this test case follow these steps at a terminal command line:
200+
1. Move to the directory containing the config file ([unsteady_naca0012.cfg](https://github.com/su2code/Tutorials/tree/master/compressible_flow/Unsteady_NACA0012/unsteady_naca0012.cfg)) and the mesh file ([unsteady_naca0012_mesh.su2](https://github.com/su2code/Tutorials/tree/master/compressible_flow/Unsteady_NACA0012/unsteady_naca0012_mesh.su2)). Make sure that the SU2 tools were compiled, installed, and that their install location was added to your path.
201+
2. For serial execution run the command:
208202
```
209203
$ SU2_CFD unsteady_NACA0012.cfg
210204
```
211205
212206
3. SU2 will print residual updates with each iteration of the flow solver, and the simulation will terminate after reaching the specified convergence criteria.
213-
4. Files containing the results will be written upon exiting SU2. The flow solution can be visualized in ParaView (.vtk) or Tecplot (.dat for ASCII).
214-
215-
#### In Parallel
216-
217-
If SU2 has been built with parallel support, the recommended method for running a parallel simulation is through the use of the parallel_computation.py Python script. This automatically handles the domain decomposition and execution with SU2_CFD, and the merging of the decomposed files using SU2_SOL. Follow these steps to run the ONERA M6 case in parallel:
218-
1. Move to the directory containing the config file ([unsteady_naca0012.cfg](https://github.com/su2code/Tutorials/tree/master/compressible_flow/Unsteady_NACA0012/unsteady_naca0012.cfg)) and the mesh file ([unsteady_naca0012_mesh.su2](https://github.com/su2code/Tutorials/tree/master/compressible_flow/Unsteady_NACA0012/unsteady_naca0012_mesh.su2)). Make sure that the SU2 tools were compiled with parallel support, installed, and that their install location was added to your path.
219-
2. Run the python script which will automatically call SU2_CFD and will perform the simulation using `NP` number of processors by entering in the command line:
220-
221-
```
222-
$ parallel_computation.py -n NP -f unsteady_NACA0012.cfg
223-
```
207+
4. Files containing the results will be written on every time step.
224208
225-
3. SU2 will print residual updates with each iteration of the flow solver, and the simulation will terminate after reaching the specified convergence criteria.
226-
4. The python script will automatically call the `SU2_SOL` executable for generating visualization files from the native restart file written during runtime. The flow solution can then be visualized in ParaView (.vtk) or Tecplot (.dat for ASCII).
209+
To run the case in parallel (using MPI) simply do:
210+
```
211+
$ mpirun -n NP SU2_CFD unsteady_NACA0012.cfg
212+
```
213+
Where NP is the number of processors, note that different MPI distributions may need slightly different syntax (e.g. mpiexec).
227214
228215
### Results
229216
230-
Results for the turbulent flow about the NACA0012 airfoil are shown below. The first picture shows the time dependent
217+
Results for the flow about the NACA0012 airfoil are shown below. The first picture shows the time dependent
231218
drag (black) as well as the windowed average from iteration 500 up to the current iteration computed with different
232219
windowing-functions.
233220
The Hann-Square-windowed time-average set up in this tutorial is displayed by the red line.

_tutorials/design_features/Unsteady_Shape_Opt_NACA0012/Unsteady_Shape_Opt_NACA0012.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Consequently, the following capabilities of SU2 will be showcased in this tutori
2727
- Windowed sensitivity calculation
2828
- Unsteady adjoints
2929
- Unsteady Optimization
30-
- Code parallelism
3130

3231
This tutorial uses the windowing techniques explained in [here](../Unsteady_NACA0012), to compute meaningful optimization objectives.
3332
Hence it is recommended to read that tutorial first.
@@ -131,7 +130,7 @@ TIME_DOMAIN = YES
131130
TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER
132131
%
133132
% Time Step for dual time stepping simulations (s)
134-
TIME_STEP= 5e-3
133+
TIME_STEP= 5e-4
135134
%
136135
% Maximum Number of physical time steps.
137136
TIME_ITER= 2200

0 commit comments

Comments
 (0)