Skip to content

Commit c71877b

Browse files
committed
Add setup, mesh and convergence figures to the P1 radiation tutorial
The tutorial now shows the cavity with its boundary conditions, the mesh with the points that get the heat source, and the residual history of both runs. The mesh figure also accounts for the 0.6 percent gap between the discrete and the exact source.
1 parent 94e5c52 commit c71877b

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

‎_tutorials/multiphysics/P1_radiation_python/P1_radiation_python.md‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ This makes it possible to add a heat source of any shape, or one that changes in
4747

4848
## Problem Setup
4949

50-
The domain is a square cavity of side 0.05 m filled with air at 300 K. All four walls are held at 300 K and have an emissivity of 1. Gravity acts in the negative y direction. Inside the cavity there is a heat source of 1e5 W/m^3 in an ellipse with semi-axes of 10 mm and 5 mm, centered at (25, 20) mm and rotated by 30 degrees. Its total strength is $$q \pi a b = 15.71$$ W per metre of depth.
50+
The domain is a square cavity of side 0.05 m filled with air at 300 K. All four walls are held at 300 K and have an emissivity of 1. Gravity acts in the negative y direction. Inside the cavity there is a heat source of 1e5 W/m^3 in an ellipse with semi-axes of 10 mm and 5 mm, centered at (25, 20) mm and rotated by 30 degrees. Its total strength is $$q \pi a b = 15.71$$ W per metre of depth. Figure (2) shows the setup and the boundary conditions.
51+
52+
![P1 cavity setup](../../tutorials_files/multiphysics/P1_radiation_python/images/setup.png)
53+
Figure (2): Setup of the cavity with the boundary conditions and the heat source.
5154

5255
We run the case twice, without radiation and with the P1 model at an absorption coefficient of 1 1/m, which gives an optical thickness $$\kappa L = 0.05$$ based on the cavity side. This value is for demonstration only. Real air is almost transparent to thermal radiation, and the absorption comes from gases such as water vapour and carbon dioxide, or from soot and particles. The P1 model is also at its least accurate in such a thin medium, as noted above. For a real application, take the absorption coefficient from a model of the gas mixture.
5356

@@ -95,14 +98,17 @@ The custom source is switched on with a single option.
9598
PYTHON_CUSTOM_SOURCE= YES
9699
```
97100

98-
The mesh is a structured grid of 65 by 65 points generated by SU2 itself. Its boundaries are called `x_minus`, `x_plus`, `y_minus` and `y_plus`.
101+
The mesh is a structured grid of 65 by 65 points generated by SU2 itself, shown in figure (3). Its boundaries are called `x_minus`, `x_plus`, `y_minus` and `y_plus`.
99102

100103
```
101104
MESH_FORMAT= RECTANGLE
102105
MESH_BOX_SIZE= ( 65, 65, 0 )
103106
MESH_BOX_LENGTH= ( 0.05, 0.05, 0 )
104107
```
105108

109+
![P1 cavity mesh](../../tutorials_files/multiphysics/P1_radiation_python/images/mesh.png)
110+
Figure (3): The mesh. The 259 points inside the ellipse, marked in red, get the heat source.
111+
106112
`TOTAL_HEATFLUX` is the heat flux into the walls listed in `MARKER_MONITORING`. With a radiation model it contains both the conductive and the radiative heat flux into the walls, so it can be used to check the energy balance. The radiative part is the Marshak wall flux $$\Theta (G - 4 \sigma T_w^4)$$ with $$\Theta = \varepsilon / (2(2 - \varepsilon))$$.
107113

108114
SU2 solves the energy equation and the P1 equation one after the other, so the P1 residual falls more slowly than the enthalpy residual and stays about four orders above it. Both residuals are used to decide when the run has converged.
@@ -180,14 +186,19 @@ With radiation the run takes about 8800 iterations, which is about a minute and
180186

181187
## Results
182188

189+
Figure (4) shows the convergence of both runs. Without radiation the enthalpy residual reaches -9 after about 900 iterations. With radiation the enthalpy residual falls quickly at first, but the residual of the P1 equation falls slowly and stays about four orders above it, so the run needs about 8800 iterations before the P1 residual reaches -6.
190+
191+
![P1 cavity residuals](../../tutorials_files/multiphysics/P1_radiation_python/images/residuals.png)
192+
Figure (4): Convergence of the RMS residuals without radiation (left) and with the P1 model (right). The dashed lines are the convergence limits.
193+
183194
The table below shows the results of the two runs.
184195

185196
| Absorption coefficient (1/m) | Maximum temperature (K) | Heat into the walls, `TOTAL_HEATFLUX` (W/m) | Conductive part (W/m) | Radiative part (W/m) |
186197
|---|---|---|---|---|
187198
| 0 (no radiation) | 325.7 | 15.808 | 15.808 | 0 |
188199
| 1 | 324.6 | 15.807 | 14.96 | 0.85 |
189200

190-
The exact strength of the source is 15.708 W/m, but both runs give 15.808 W/m, which is 0.6 percent more. This gap is not an error in the energy balance. SU2 stores the solution at the mesh points, and each point owns a small control volume around it. The script sets the source at a point to the full value when the point lies inside the ellipse and to zero when it does not. The heat added is therefore the source value times the total volume of the control volumes whose points lie inside the ellipse. That area is slightly larger than the exact area of the ellipse on this mesh. The gap shrinks as the mesh is refined, and it would vanish if the source were set to the fraction of each control volume that lies inside the ellipse. Since the heat into the walls matches the heat that was actually added, the energy balance closes in both runs.
201+
The exact strength of the source is 15.708 W/m, but both runs give 15.808 W/m, which is 0.6 percent more. This gap is not an error in the energy balance. SU2 stores the solution at the mesh points, and each point owns a small control volume around it. The script sets the source at a point to the full value when the point lies inside the ellipse and to zero when it does not. The heat added is therefore the source value times the total volume of the control volumes whose points lie inside the ellipse. On this mesh 259 points lie inside the ellipse, as figure (3) shows, and each owns a control volume of $$(0.05/64)^2$$ m^2. Their total area is 1.5808e-4 m^2, against 1.5708e-4 m^2 for the exact ellipse, which gives exactly the 15.808 W/m of both runs. The gap shrinks as the mesh is refined, and it would vanish if the source were set to the fraction of each control volume that lies inside the ellipse. Since the heat into the walls matches the heat that was actually added, the energy balance closes in both runs.
191202

192203
With radiation, the total heat into the walls stays the same, but about 5 percent of it now arrives as radiation instead of conduction. The gas emits radiation where it is hot and absorbs it where it is cool, so the plume above the source cools by up to 1.2 K and the rest of the cavity cools a little less, as the right panel of figure (1) shows. The flow pattern, with a plume rising above the source and two counter-rotating cells, hardly changes.
193204

45.2 KB
Loading
125 KB
Loading
53.7 KB
Loading

0 commit comments

Comments
 (0)