Documentation 6b54b78464
Loading...
Searching...
No Matches
CRadP1Solver.hpp
Go to the documentation of this file.
1/*!
2 * \file CRadP1Solver.hpp
3 * \brief Declaration and inlines of the class to compute a P1 radiation problem.
4 * \author Ruben Sanchez
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
30#include "CRadSolver.hpp"
31
32class CRadP1Solver final: public CRadSolver {
33private:
34
35protected:
36
37 su2double Temperature_Inf; /*!< \brief Temperature at the infinity. */
38
39 /*!
40 * \brief Impose the Marshak boundary condition.
41 * \param[in] geometry - Geometrical definition of the problem.
42 * \param[in] solver_container - Container vector with all the solutions.
43 * \param[in] config - Definition of the particular problem.
44 * \param[in] val_marker - Surface marker where the boundary condition is applied.
45 */
46 void BC_Marshak(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short val_marker);
47
48public:
49 /*!
50 * \brief Constructor of the class.
51 */
52 CRadP1Solver(void);
53
54 /*!
55 * \overload
56 * \param[in] geometry - Geometrical definition of the problem.
57 * \param[in] config - Definition of the particular problem.
58 * \param[in] iMesh - Index of the mesh in multigrid computations.
59 * \param[in] FluidModel
60 */
61 CRadP1Solver(CGeometry *geometry, CConfig *config);
62
63 /*!
64 * \brief Destructor of the class.
65 */
66 ~CRadP1Solver(void) override;
67
68 /*!
69 * \brief Restart residual and compute gradients.
70 * \param[in] geometry - Geometrical definition of the problem.
71 * \param[in] solver_container - Container vector with all the solutions.
72 * \param[in] config - Definition of the particular problem.
73 * \param[in] iMesh - Index of the mesh in multigrid computations.
74 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
75 * \param[in] RunTime_EqSystem - System of equations which is going to be solved.
76 * \param[in] Output - boolean to determine whether to print output.
77 */
78 void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config,
79 unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem,
80 bool Output) override;
81
82 /*!
83 * \brief A virtual member.
84 * \param[in] geometry - Geometrical definition of the problem.
85 * \param[in] solver_container - Container vector with all the solutions.
86 * \param[in] config - Definition of the particular problem.
87 */
88 void Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config,
89 unsigned short iMesh) override;
90
91
92 /*!
93 * \brief Update the solution using an implicit solver.
94 * \param[in] geometry - Geometrical definition of the problem.
95 * \param[in] solver_container - Container vector with all the solutions.
96 * \param[in] config - Definition of the particular problem.
97 */
98 void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container,
99 CConfig *config) override;
100
101 /*!
102 * \brief Compute the viscous residuals for the turbulent equation.
103 * \param[in] geometry - Geometrical definition of the problem.
104 * \param[in] solver_container - Container vector with all the solutions.
105 * \param[in] numerics_container - Description of the numerical method.
106 * \param[in] config - Definition of the particular problem.
107 * \param[in] iMesh - Index of the mesh in multigrid computations.
108 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
109 */
110 void Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container,
111 CConfig *config, unsigned short iMesh, unsigned short iRKStep) override ;
112
113 /*!
114 * \brief Source term computation.
115 * \param[in] geometry - Geometrical definition of the problem.
116 * \param[in] solver_container - Container vector with all the solutions.
117 * \param[in] numerics_container - Description of the numerical method.
118 * \param[in] config - Definition of the particular problem.
119 * \param[in] iMesh - Index of the mesh in multigrid computations.
120 */
121 void Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container,
122 CConfig *config, unsigned short iMesh) override ;
123
124 /*!
125 * \brief Impose the Marshak BC on Heatflux wall boundaries.
126 * \param[in] geometry - Geometrical definition of the problem.
127 * \param[in] solver_container - Container vector with all the solutions.
128 * \param[in] conv_numerics - Description of the numerical method.
129 * \param[in] visc_numerics - Description of the numerical method.
130 * \param[in] config - Definition of the particular problem.
131 * \param[in] val_marker - Surface marker where the boundary condition is applied.
132 */
133 void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
134 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override {
135 BC_Marshak(geometry, solver_container, config, val_marker);
136 }
137
138 /*!
139 * \brief Impose an isothermal wall boundary condition.
140 * \param[in] geometry - Geometrical definition of the problem.
141 * \param[in] solver_container - Container vector with all the solutions.
142 * \param[in] conv_numerics - Description of the numerical method.
143 * \param[in] visc_numerics - Description of the numerical method.
144 * \param[in] config - Definition of the particular problem.
145 * \param[in] val_marker - Surface marker where the boundary condition is applied.
146 */
147 void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
148 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override;
149
150 /*!
151 * \brief Impose the Far Field boundary condition.
152 * \param[in] geometry - Geometrical definition of the problem.
153 * \param[in] solver_container - Container vector with all the solutions.
154 * \param[in] conv_numerics - Description of the numerical method.
155 * \param[in] visc_numerics - Description of the numerical method.
156 * \param[in] config - Definition of the particular problem.
157 * \param[in] val_marker - Surface marker where the boundary condition is applied.
158 */
159 void BC_Far_Field(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
160 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override;
161
162 /*!
163 * \brief Impose the Marshak BC on inlet boundaries.
164 * \param[in] geometry - Geometrical definition of the problem.
165 * \param[in] solver_container - Container vector with all the solutions.
166 * \param[in] conv_numerics - Description of the numerical method.
167 * \param[in] visc_numerics - Description of the numerical method.
168 * \param[in] config - Definition of the particular problem.
169 * \param[in] val_marker - Surface marker where the boundary condition is applied.
170 */
171 inline void BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
172 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override {
173 BC_Marshak(geometry, solver_container, config, val_marker);
174 }
175
176
177 /*!
178 * \brief Impose the Marshak BC on outlet boundaries.
179 * \param[in] geometry - Geometrical definition of the problem.
180 * \param[in] solver_container - Container vector with all the solutions.
181 * \param[in] conv_numerics - Description of the numerical method.
182 * \param[in] visc_numerics - Description of the numerical method.
183 * \param[in] config - Definition of the particular problem.
184 * \param[in] val_marker - Surface marker where the boundary condition is applied.
185 */
186 inline void BC_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
187 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override {
188 BC_Marshak(geometry, solver_container, config, val_marker);
189 }
190
191 /*!
192 * \brief Impose via the Marshak BC on Euler walls.
193 * \param[in] geometry - Geometrical definition of the problem.
194 * \param[in] solver_container - Container vector with all the solutions.
195 * \param[in] numerics - Description of the numerical method.
196 * \param[in] config - Definition of the particular problem.
197 * \param[in] val_marker - Surface marker where the boundary condition is applied.
198 */
199 inline void BC_Euler_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
200 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override {
201 BC_Marshak(geometry, solver_container, config, val_marker);
202 }
203
204 /*!
205 * \brief Impose the Marshak BC on sliding interfaces.
206 * \param[in] geometry - Geometrical definition of the problem.
207 * \param[in] solver_container - Container vector with all the solutions.
208 * \param[in] conv_numerics - Description of the numerical method.
209 * \param[in] visc_numerics - Description of the numerical method.
210 * \param[in] config - Definition of the particular problem.
211 */
212 inline void BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container,
213 CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config) override {
214 for (unsigned short iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) {
215 if (config->GetMarker_All_KindBC(iMarker) == FLUID_INTERFACE) {
216 BC_Marshak(geometry, solver_container, config, iMarker);
217 }
218 }
219 }
220
221 /*!
222 * \brief Impose the Marshak BC on conjugate heat interfaces.
223 * \param[in] geometry - Geometrical definition of the problem.
224 * \param[in] solver_container - Container vector with all the solutions.
225 * \param[in] numerics - Description of the numerical method.
226 * \param[in] config - Definition of the particular problem.
227 * \param[in] val_marker - Surface marker where the boundary condition is applied.
228 */
229 inline void BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver_container,
230 CNumerics *numerics, CConfig *config,
231 unsigned short val_marker) override {
232 BC_Marshak(geometry, solver_container, config, val_marker);
233 }
234
235 /*!
236 * \brief Compute the time step for solving the Radiation P1 equation.
237 * \param[in] geometry - Geometrical definition of the problem.
238 * \param[in] solver_container - Container vector with all the solutions.
239 * \param[in] config - Definition of the particular problem.
240 * \param[in] iMesh - Index of the mesh in multigrid computations.
241 * \param[in] Iteration - Index of the current iteration.
242 */
243 void SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config,
244 unsigned short iMesh, unsigned long Iteration) override;
245
246 /*!
247 * \brief Set the freestream temperature.
248 * \param[in] Value of freestream temperature.
249 */
250 inline void SetTemperature_Inf(const su2double t_inf) override {Temperature_Inf = t_inf;}
251
252
253 /*!
254 * \brief Get the temperature value at infinity.
255 * \return Value of the temperature at infinity.
256 */
257 inline su2double GetTemperature_Inf(void) const { return Temperature_Inf; }
258
259};
Declaration and inlines of the class to compute a generic radiation solver.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
unsigned short GetnMarker_All(void) const
Get the total number of boundary markers of the local process including send/receive domains.
Definition CConfig.hpp:3183
unsigned short GetMarker_All_KindBC(unsigned short val_marker) const
Get the kind of boundary for each marker.
Definition CConfig.hpp:3556
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Definition CRadP1Solver.hpp:32
void Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh) override
Source term computation.
Definition CRadP1Solver.cpp:235
void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config) override
Update the solution using an implicit solver.
Definition CRadP1Solver.cpp:501
void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) override
Restart residual and compute gradients.
Definition CRadP1Solver.cpp:142
void BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker) override
Impose the Marshak BC on conjugate heat interfaces.
Definition CRadP1Solver.hpp:229
void Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh) override
A virtual member.
Definition CRadP1Solver.cpp:166
void Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep) override
Compute the viscous residuals for the turbulent equation.
Definition CRadP1Solver.cpp:195
void BC_Far_Field(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Far Field boundary condition.
Definition CRadP1Solver.cpp:349
void SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration) override
Compute the time step for solving the Radiation P1 equation.
Definition CRadP1Solver.cpp:578
void BC_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Marshak BC on outlet boundaries.
Definition CRadP1Solver.hpp:186
su2double GetTemperature_Inf(void) const
Get the temperature value at infinity.
Definition CRadP1Solver.hpp:257
su2double Temperature_Inf
Temperature at the infinity.
Definition CRadP1Solver.hpp:37
void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose an isothermal wall boundary condition.
Definition CRadP1Solver.cpp:273
void SetTemperature_Inf(const su2double t_inf) override
Set the freestream temperature.
Definition CRadP1Solver.hpp:250
void BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config) override
Impose the Marshak BC on sliding interfaces.
Definition CRadP1Solver.hpp:212
void BC_Marshak(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short val_marker)
Impose the Marshak boundary condition.
Definition CRadP1Solver.cpp:424
CRadP1Solver(void)
Constructor of the class.
Definition CRadP1Solver.cpp:32
void BC_Euler_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose via the Marshak BC on Euler walls.
Definition CRadP1Solver.hpp:199
~CRadP1Solver(void) override
Destructor of the class.
Definition CRadP1Solver.cpp:135
void BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Marshak BC on inlet boundaries.
Definition CRadP1Solver.hpp:171
void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Marshak BC on Heatflux wall boundaries.
Definition CRadP1Solver.hpp:133
Definition CRadSolver.hpp:33
Definition CSolver.hpp:71
passivedouble su2double
Definition code_config.hpp:181
@ FLUID_INTERFACE
Domain interface definition.
Definition option_structure.hpp:1841