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
{{ message }}
Repository navigation
Commit c71877b
Browse filesBrowse the repository at this point in the historyBrowse files
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.
Copy file name to clipboardExpand all lines: _tutorials/multiphysics/P1_radiation_python/P1_radiation_python.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,10 @@ This makes it possible to add a heat source of any shape, or one that changes in
47
47
48
48
## Problem Setup
49
49
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.
Figure (2): Setup of the cavity with the boundary conditions and the heat source.
51
54
52
55
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.
53
56
@@ -95,14 +98,17 @@ The custom source is switched on with a single option.
95
98
PYTHON_CUSTOM_SOURCE= YES
96
99
```
97
100
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`.
Figure (3): The mesh. The 259 points inside the ellipse, marked in red, get the heat source.
111
+
106
112
`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))$$.
107
113
108
114
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
180
186
181
187
## Results
182
188
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.
Figure (4): Convergence of the RMS residuals without radiation (left) and with the P1 model (right). The dashed lines are the convergence limits.
193
+
183
194
The table below shows the results of the two runs.
184
195
185
196
| Absorption coefficient (1/m) | Maximum temperature (K) | Heat into the walls, `TOTAL_HEATFLUX` (W/m) | Conductive part (W/m) | Radiative part (W/m) |
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.
191
202
192
203
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.
0 commit comments