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/multiphysics/Coupled_RHT_Adjoint.md
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This tutorial follows up the coupled SU2's [incompressible CFD-RHT tutorial](../
21
21
- Projecting the surface sensitivities into the FFD parameters
22
22
23
23
24
-
In this tutorial, we define a problem similar to the [Laminar_Cylinder](../Laminar_Cylinder) tutorial, however using in this case the incompressible solver. A cylinder with ```D = 1.0 m``` is immersed in a laminar, external flow with a Reynolds number ```Re = 40```.
24
+
In this tutorial, we define a problem similar to the [Laminar_Cylinder](../Laminar_Cylinder), however using in this case the incompressible solver. A cylinder with ```D = 1.0 m``` is immersed in a laminar, external flow with a Reynolds number ```Re = 40```.
@@ -31,13 +31,13 @@ For this tutorial, please download the contents of the folder [multiphysics/adjo
31
31
32
32
### Background
33
33
34
-
SU2 adopts a P1 model for the simulation of Radiative Heat Transfer, for which further details have been provided for the [incompressible CFD-RHT tutorial](../Basic_RHT). In this case, we will incorporate the computation of the adjoint solution for the coupled problem, which will be the main focus of this tutorial. Overall, the discrete adjoint will be computed using the fixed-point expression
34
+
SU2 adopts a P1 model for the simulation of Radiative Heat Transfer, for which further details have been provided for the [incompressible CFD-RHT tutorial](../Basic_RHT). In this case, we will incorporate the computation of the adjoint solution for the coupled problem, which will be the main focus of this tutorial. The discrete adjoint will be computed using the fixed-point expression
where $$J$$ is the objective function, $$\mathbf{G}(\cdot)$$ the fixed point iterator on the coupled CFD-RHT problem, $$\mathbf{z} = (\mathbf{w},E)$$ the extended state vector including the flow variables $$\mathbf{w}$$ and the radiative energy $$E$$ and $$\mathbf{\bar{z}}$$ its adjoint. Further detail can be found in reference$$^1$$.
40
+
where $$J$$ is the objective function, $$\mathbf{G}(\cdot)$$ the fixed point iterator on the coupled CFD-RHT problem, $$\mathbf{z} = (\mathbf{w},E)$$ the extended state vector including the flow variables $$\mathbf{w}$$ and the radiative energy $$E$$, and $$\mathbf{\bar{z}}$$ its adjoint. Further detail can be found in reference$$^1$$.
41
41
42
42
#### Mesh Description
43
43
@@ -51,7 +51,7 @@ We start the tutorial by definining the problem as an incompressible, Navier Sto
51
51
SOLVER = INC_NAVIER_STOKES
52
52
```
53
53
54
-
and we set the properties for the flow to obtain a ```Re = 40``` based on the cylinder diameter. We use standard settings for the linear solver and a FDS scheme for the convective terms. The problem admits a relatively high ```CFL=1.0E4```.
54
+
and we set the properties for the flow to obtain a ```Re = 40``` based on the cylinder diameter. We use standard settings for the linear solver and a FDS scheme for the convective terms. The problem admits a relatively high ```CFL = 1.0E4```.
55
55
56
56
```
57
57
INC_DENSITY_MODEL = VARIABLE
@@ -101,14 +101,13 @@ REF_LENGTH = 1.0
101
101
REF_AREA = 1.0
102
102
```
103
103
104
-
Finally, we will be interested in the drag coefficient of the cylinder. Therefore, we will control the convergence of the problem by defining the $$C_D$$ as the main convergence parameter. We use a Cauchy criteria and determine that the problem will be considered as converged when the changes to $$C_D$$ are below 1.0E-9 for more than 50 iterations.
104
+
Finally, we are interested in the drag coefficient of the cylinder. Therefore, we will control the convergence of the problem by defining the $$C_D$$ as the main convergence parameter. We use a Cauchy criteria and determine that the problem will be considered as converged when the changes to $$C_D$$ are below 1.0E-9 for more than 50 iterations.
105
105
106
106
```
107
107
INNER_ITER = 5000
108
108
109
109
CONV_CRITERIA = CAUCHY
110
110
CONV_FIELD = DRAG
111
-
CONV_RESIDUAL_MINVAL = -8
112
111
113
112
CONV_CAUCHY_ELEMS = 50
114
113
CONV_CAUCHY_EPS = 1E-9
@@ -192,7 +191,7 @@ TABULAR_FORMAT = CSV
192
191
CONV_FILENAME= history
193
192
```
194
193
195
-
Follow the links provided to download the [config](https://github.com/su2code/Tutorials/blob/feature_radiation/multiphysics/adjoint_rht/config_rht_primal.cfg) and [mesh](https://github.com/su2code/Tutorials/blob/feature_radiation/multiphysics/radiation/mesh_adjoint_rht.su2) files.
194
+
Follow the links provided to download the [config](https://github.com/su2code/Tutorials/blob/feature_radiation/multiphysics/adjoint_rht/config_rht_primal.cfg) and [mesh](https://github.com/su2code/Tutorials/blob/feature_radiation/multiphysics/adjoint_rht/mesh_adjoint_rht.su2) files.
The solution fields have been reconstructed from the converged primal solution and read from ```solution_rht.dat```. One further primal iteration is run, which will be recorded using the AD tool [CoDiPack](https://www.scicomp.uni-kl.de/codi/), to compute the adjoint path. Therefore, the residuals printed above correspond to those of the direct iteration used for the recording. Further information on the recording process can be found on reference$$^2$$, exemplified for an FSI test case, and in reference$$^1$$.
302
+
The solution fields have been reconstructed from the converged primal solution and read from ```solution_rht.dat```. One further primal iteration is run, which will be recorded using the AD tool [CoDiPack](https://www.scicomp.uni-kl.de/codi/), to compute the adjoint path. Therefore, the residuals printed above correspond to those of the direct iteration used for the recording. We observe that the order of magnitude of the residual agrees well with the last iterations in the primal run and the convergence trend. Further information on the recording process can be found on reference$$^2$$, exemplified for an FSI test case, and in reference$$^1$$.
304
303
305
304
An iterative process is then started by running in reverse mode through the adjoint path. The convergence of the adjoint variables is printed to screen:
306
305
@@ -368,14 +367,14 @@ to indicate SU2 that there are 2 boundaries, ```body``` and ```farfield``` in ou
368
367
DV_KIND = FFD_SETTING
369
368
```
370
369
371
-
to determine that the objective of this config file is to set up an FFD box. The boundary for which the FFD box is ```body```, and we are interested in having 24 boxes in x direction and 1 box in y direction according to our definition above, that will move in direction (0,1)
370
+
to determine that the objective of this config file is to set up an FFD box. The boundary for which the FFD box is ```body```, and we are interested in having 24 boxes in $$x$$ direction and 1 box in $$y$$ direction according to our definition above, that will move in direction (0,1)
372
371
373
372
```
374
373
DV_MARKER = ( body )
375
374
DV_PARAM = ( MAIN_BOX, 24, 1, 0.0, 1.0 )
376
375
```
377
376
378
-
The FFD box will range in $$x \in [-0.55, 0.55]$$, and in $$y \in [-0.55, 0.55]$$. There is no dimension $z$ as we are solving a 2D problem.
377
+
The FFD box will range in $$x \in [-0.55, 0.55]$$, and in $$y \in [-0.55, 0.55]$$. There is no dimension $$z$$ as we are solving a 2D problem.
separated by semicolons. In this case, we have 25 positions in X direction, $$[0,24]$$$, and only 2 in Y direction, $$[0,1]$$$, and their range of movement is only allowed in Y direction ```X-DISP = 0.0```, ```Y-DISP = 1.0```
475
+
separated by semicolons. In this case, we have 25 positions in X direction, $$[0,24]$$, and 2 in Y direction, $$[0,1]$$, and their range of movement is only allowed in Y direction ```X-DISP = 0.0```, ```Y-DISP = 1.0```
0 commit comments