Skip to content

Commit 14bf080

Browse files
committed
spelling
1 parent 88fb876 commit 14bf080

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

_tutorials/design_features/Unsteady_Shape_Opt_NACA0012.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ Consequently, the following capabilities of SU2 will be showcased in this tutori
1818
- Windowed sensitivity calculation
1919
- Unsteady adjoints
2020
- Unsteady Optimization
21-
- Code parallelism (optional)
21+
- Code parallelism
2222

23-
This tutorial uses the windowing techniques explained in [here](../Unsteady_NACA0012.md), to compute meaningful optimization objectives.
23+
This tutorial uses the windowing techniques explained in [here](../Unsteady_NACA0012), to compute meaningful optimization objectives.
2424
Hence it is recommended to read that tutorial first.
2525

2626

2727
## Resources ##
2828

29-
The resources for this tutorial can be found in the [Unsteady_NACA0012](https://github.com/su2code/su2code.github.io/tree/master/Unsteady_Shape_Opt_NACA0012) directory in the [project website repository](https://github.com/su2code/su2code.github.io).
29+
The resources for this tutorial can be found in the
30+
[Unsteady_Shape_Opt_NACA0012](https://github.com/su2code/su2code.github.io/tree/master/Unsteady_Shape_Opt_NACA0012) directory
31+
in the [project website repository](https://github.com/su2code/su2code.github.io).
3032

3133
You will need the configuration file ([unsteady_naca0012_opt.cfg](../../Unsteady_Shape_Opt_NACA0012/unsteady_naca0012_opt.cfg)) and
3234
the mesh file ([unsteady_naca0012_FFD.su2](../../Unsteady_Shape_Opt_NACA0012/unsteady_naca0012_FFD.su2)).
@@ -58,20 +60,19 @@ This problem will solve the flow about the airfoil with these conditions:
5860
- Reynolds number = 1E6
5961
- Reynolds length = 1.0 m
6062
- Number of time iterations: 2200
61-
- Restart Iteration: 1100
6263
- Start of the windowed time-average: 1500
6364

6465
These subsonic flow conditions will cause a detached flow about the airfoil, that exhibts a vortex street and is therefore periodic for the baseline geometry.
6566
Depending on the windowing-function used to average the optimization objective, the flow about the optimized geometry will eventually be a steady state flow.
6667

6768
We want to solve an optimization problem with a time dependent system output, e.g. Drag. A meaningful objective and constraint function is therefore a time average over a period.
68-
The period average is approximated by a windowed time average over a finite time span $$M$$.
69+
The period average is approximated by a windowed time-average over a finite time-span $$M$$.
6970

7071
$$ \frac{1}{M}\int_0^M w(t/M)C_D(\sigma, t) \mathcal{d}t,$$
7172

7273
where $$C_D(\sigma, t) $$ denotes the drag coefficient. $$C_D(\sigma, t)$$ depends on time $$t$$ and the design parameters $$\sigma$$. The window-function is denoted by $$w$$.
73-
There are different windows available. Depending on their smoothness, they have different regularizing effects on the time average and its sensitivity and therefore, the windowed time
74-
average converges with different speed to the period average.
74+
There are different windows available. Depending on their smoothness, they have different regularizing effects on the time-average and
75+
its sensitivity and therefore, the windowed time-average converges with different speed to the period-average.
7576
The following options are implemented:
7677

7778
| Window | Convergence Order | Convergence Order (sensitivity) |
@@ -82,36 +83,40 @@ The following options are implemented:
8283
| `BUMP`| exponential | exponential |
8384

8485

85-
For each optimization run, we have to compute the sensitivity of above windowed time average, that reads
86+
For each optimization run, we have to compute the sensitivity of above windowed time-average, which reads
8687

8788
$$ \frac{1}{M}\int_0^M w(t/M)\partial_\sigma C_D(\sigma, t) \mathcal{d}t.$$
8889

89-
Figure 2 shows the time dependent drag and its sensitivity. As one can see, the amplitude of the drag sensitivity grows faster than linear. This is the reason why Square-windowing
90-
is not a viable option for many application cases.
90+
Figure 2 shows the time dependent drag and its sensitivity. As one can see, the amplitude of the drag sensitivity grows faster than
91+
linear. Roughly speaking, windowed time-average must converge faster than the amplitude of the oscillation grows to ensure convergence.
92+
This is the reason why Square-windowing is not a viable option for many application cases.
9193

9294
![Drag and Drag sensitivity](../../Unsteady_Shape_Opt_NACA0012/images/Optimiztation_Horizon.png)
9395
Figure (2): Instantaneous drag and drag sensitivity shown. The time frame to average the drag coefficient is in between iteration $$n_{tr} = 1500 $$ and $$N=2200$$.
9496

9597
Using the midpoint rule for above integral, we arrive at the following constrained optimization problem
9698

97-
$$ \min_{\sigma} \frac{1}{M} \sum_{n_{tr}}^{N} w\left(\frac{n-n_{tr}}{N-n_{tr}}\right)C_D(\sigma,n) $$
99+
$$ \min_{\sigma} \frac{1}{N-n_{tr}} \sum_{n_{tr}}^{N} w\left(\frac{n-n_{tr}}{N-n_{tr}}\right)C_D(\sigma,n) $$
100+
98101
$$ s.t. \qquad R(u^n) = 0 \qquad \forall n=1,\dots,N $$
99-
$$ \qquad\qquad\frac{1}{M} \sum_{n_{tr}}^{N} w\left(\frac{n-n_{tr}}{N-n_{tr}}\right)C_L(\sigma,n) \geq c$$
102+
103+
$$ \qquad\qquad\frac{1}{N-n_{tr}} \sum_{n_{tr}}^{N} w\left(\frac{n-n_{tr}}{N-n_{tr}}\right)C_L(\sigma,n) \geq c$$
100104

101105
The optimization constraint is given by the windowed time-averaged lift, that should be greater than a specific value $$c$$. We choose arbitrarily as $$c=0.96$$, which is the windowed
102-
time-averaged lift of the baseline geometry.
106+
time-averaged lift of the baseline geometry. The time-span to average both lift and drag is given by $$M =N-n_{tr}$$.
103107

104108

105109
### Configuration File Options ###
106110

107-
To compute the unsteady shape-optimization, we set up the unsteady simulation according to our test case above. More information about unsteady simulations can be found [here](../Unsteady_NACA0012.md)
111+
To compute the unsteady shape-optimization, we set up the unsteady simulation according to our test case above.
112+
More information about setting up unsteady simulations can be found [here](../Unsteady_NACA0012)
108113

109114
```
110115
% -------- UNSTEADY SIMULATION -----------------%
111116
%
112117
TIME_DOMAIN = YES
113118
%
114-
% Numerical Method for Unsteady simulation(NO, TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER, DUAL_TIME_STEPPING-2ND_ORDER, TIME_SPECTRAL)
119+
% Numerical Method for Unsteady simulation
115120
TIME_MARCHING= DUAL_TIME_STEPPING-2ND_ORDER
116121
%
117122
% Time Step for dual time stepping simulations (s)
@@ -144,7 +149,7 @@ it may happen that the adjoint inner iterator needs more iterations to reach a s
144149
correct sensitivity results.
145150

146151
Note, that the adjoint iterator runs backwards in time, i.e. it starts at iteration given by `UNST_ADJOINT_START_ITER` and ends at iteration 0.
147-
We set the start iter to the final iteration of the direct run, i.e. `UNST_ADJOINT_START_ITER = TIME_ITER = 2200`.
152+
We set the start iteration to the final iteration of the direct run, i.e. `UNST_ADJOINT_START_ITER = TIME_ITER = 2200`.
148153
The time to average the objective and constraint function is given by the option `ITER_AVERAGE_OBJ`. Here we set `ITER_AVERAGE_OBJ=TIME_ITER-WINDOW_START_ITER=700`.
149154

150155
```
@@ -198,10 +203,11 @@ With each design iteration, the direct and adjoint solutions are used to compute
198203
ITER_AVERAGE_OBJ = 250
199204
```
200205
201-
Note, that this configuration will produce different designs. To best showcase the difference between the windowing function, the original configuration is recommended.
206+
Note, that this configuration may produce different designs. To best showcase the difference between the windowing function, the original configuration is recommended.
202207
203208
204209
2. The python script will drive the optimization process by executing flow solutions, adjoint solutions, gradient projection, geometry evaluations, and mesh deformation in order to drive the design toward an optimum. The optimization process will cease when certain tolerances set within the SciPy optimizer are met.
210+
205211
3. Solution files containing the flow and surface data will be written for each flow solution and adjoint solution and can be found in the DESIGNS directory that is created. The file named history_project.dat (or history_project.csv for ParaView) will contain the functional values of interest resulting from each evaluation during the optimization. The major iterations and function evaluations for the SLSQP optimizer will be written to the console during execution.
206212
207213

0 commit comments

Comments
 (0)