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: _tutorials/compressible_flow/Unsteady_NACA0012/Unsteady_NACA0012.md
+17-30Lines changed: 17 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,6 @@ Furthermore, the user is introduced in the so-called windowing approach, a regul
24
24
- Dual time-stepping for unsteady flows
25
25
- Windowing
26
26
- Time-convergence
27
-
- Code parallelism (optional)
28
27
29
28
This tutorial also provides an explanation for properly setting up viscous, compressible, unsteady 2D flow conditions in SU2.
30
29
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
69
68
70
69
### Configuration File Options ###
71
70
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.
74
73
After that, a time discretization in physical time is performed, that results in a residual equation of the form
75
74
76
75
$$ R(u^n) = 0 \qquad \forall n=1,\dots,N. $$
@@ -97,13 +96,13 @@ TIME_DOMAIN = YES
97
96
TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER
98
97
%
99
98
% Time Step for dual time stepping simulations (s)
100
-
TIME_STEP= 5e-3
99
+
TIME_STEP= 5e-4
101
100
%
102
101
% Maximum Number of physical time steps.
103
-
TIME_ITER= 2200
102
+
TIME_ITER= 2000
104
103
%
105
104
% Number of internal iterations (dual time method)
106
-
INNER_ITER= 50
105
+
INNER_ITER= 10
107
106
%
108
107
% Time discretization for inner iteration.
109
108
TIME_DISCRE_FLOW= EULER_IMPLICIT
@@ -167,10 +166,10 @@ WINDOW_CAUCHY_CRIT = YES
167
166
CONV_WINDOW_FIELD= (TAVG_DRAG, TAVG_LIFT)
168
167
%
169
168
% Number of elements to apply the criteria
170
-
CONV_WINDOW_CAUCHY_ELEMS= 100
169
+
CONV_WINDOW_CAUCHY_ELEMS= 10
171
170
%
172
171
% Epsilon to control the series convergence
173
-
CONV_WINDOW_CAUCHY_EPS= 1E-2
172
+
CONV_WINDOW_CAUCHY_EPS= 1E-4
174
173
%
175
174
% Number of iterations to wait after the iteration specified in WINDOW_START_ITER.
176
175
CONV_WINDOW_STARTITER = 10
@@ -197,37 +196,25 @@ RESTART_ITER = 499
197
196
198
197
### Running SU2
199
198
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:
208
202
```
209
203
$ SU2_CFD unsteady_NACA0012.cfg
210
204
```
211
205
212
206
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:
4. Files containing the results will be written on every time step.
224
208
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).
227
214
228
215
### Results
229
216
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
231
218
drag (black) as well as the windowed average from iteration 500 up to the current iteration computed with different
232
219
windowing-functions.
233
220
The Hann-Square-windowed time-average set up in this tutorial is displayed by the red line.
0 commit comments