Skip to content

Commit 481f167

Browse files
committed
Add images for Opt tutorial
1 parent be18647 commit 481f167

File tree

8 files changed

+11
-3
lines changed

8 files changed

+11
-3
lines changed

_tutorials/design_features/Species_Transport/Species_Transport.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ $ SU2_DEF <config-file>.cfg
242242

243243
In this special case the deformed produces a bad mesh at the outlet, as the mesh is 'ripped apart' there. This happens because the FFD-Box only deforms what is prescribed in `DV_MARKER` and the remaining boundaries are considered 'clamped' in the volume mesh algorithm. All boundaries? No! The boundaries in `MARKER_SYM` are allowed to move along their symmetry plane in the volume mesher.This obviously requires the boundary to form a single plane which is the case for the present outlet. So, if the outlet is prescribed as a `MARKER_SYM` for the Volume deformation step the mesh deformation will yield a reasonable mesh.
244244

245+
After the mesh deformation it is advisable to also run a primal simulation on that deformed mesh, as the simulation settings (e.g. `CFL_NUMBER`) might not lead to a converging simulation anymore. For a later optimization run this testing can help keeping a converging primal through all deformations.
246+
245247
![Bad mesh deformation](../../tutorials_files/design_features/Species_Transport/images/bad-mesh-deform.jpg)
246248
Figure (2): Mesh breaks at the `outlet`, as `outlet` nodes are clamped.
247249

@@ -267,7 +269,7 @@ In order to postprocess the results a python script is added which compares both
267269
$ python postprocess.py
268270
```
269271

270-
At a maximum of ~0.06% relative difference between the discrete adjoint and finite difference gradient,the agreement is excellent.
272+
At a maximum of ~0.05% relative difference between the discrete adjoint and finite difference gradient,the agreement is excellent.
271273
```
272274
+---+-------------------+-------------------+-------------------+-------------------+
273275
| # | DA gradient | FD gradient | absolute diff | relative diff [%] |
@@ -298,10 +300,16 @@ The unconstrained optimization with the objective function of `SURFACE_SPECIES_V
298300
$ python optimization.py
299301
```
300302

301-
In order to compute the gradient norms of each iteration a `gradient_norm.py` script was added.
303+
In order to compute the gradient norms of each Design iteration a `gradient_norm.py` script was added. The script will write a `gradient_norm.csv` into the folder root which.
304+
305+
A helpful visualization after an optimization run is having the series of deformed meshes with their primal solution and FFD-Boxes. These solution are in their respective folders and one could tediously load every single one of them.
306+
The script `create_Visu_symlinks.py` sweeps through the `DSN_*` folders and collects symbolic links of the primal solution and FFD-Boxes into a `visu_files` folder. The symbolic links also renames each file and appends an iteration number to the end of the filename (e.g. `ffd_004.vtk -> ../DSN_004/DEFORM/ffd_boxes_def_0.vtk`). Like so, this data can be loaded in [Paraview](https://www.paraview.org/), or probably any other post-processor, as a time series which allows for easy cycling through the designs.
302307

303308
![OF and Gradient Norm](../../tutorials_files/design_features/Species_Transport/images/OF_GradNorm.png)
304309
Figure (4): Objective Function value and Gradient Norm over optimizer iterations. Capped after 12 iterations.
305310

306311
![Optimized Mesh](../../tutorials_files/design_features/Species_Transport/images/Optimized-Geometry.jpg)
307-
Figure (5): Baseline and Optimized Mesh with the respective FFD-Boxes.
312+
Figure (5): Baseline and Optimized Mesh with the respective FFD-Boxes.
313+
314+
![Optimization Cycle](../../tutorials_files/design_features/Species_Transport/images/opt_cycle.gif)
315+
Figure (6): Optimization series from baseline to final mesh with FFD-Boxes.
263 KB
Loading
279 KB
Loading
2.5 MB
Loading
389 KB
Loading
152 KB
Loading
149 KB
Loading
665 KB
Loading

0 commit comments

Comments
 (0)