Documentation 6b54b78464
Loading...
Searching...
No Matches
CTransLMSolver.hpp
Go to the documentation of this file.
1/*!
2 * \file CTransLMSolver.hpp
3 * \brief Headers of the CTransLMSolver class
4 * \author A. Aranake
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 "CTurbSolver.hpp"
31#include "../numerics/turbulent/transition/trans_correlations.hpp"
32
33/*!
34 * \class CTransLMSolver
35 * \brief Main class for defining the transition model solver.
36 * \ingroup Turbulence_Model
37 * \author A. Aranake, S. Kang.
38 */
39
40class CTransLMSolver final : public CTurbSolver {
41private:
42
43 LM_ParsedOptions options;
44 TURB_FAMILY TurbFamily;
45
46 TransLMCorrelations TransCorrelations;
47
48 /*!
49 * \brief Resolve the compile-time parameters of CScalarFlux_TransLM and run one of this solver's
50 * boundaries through the shared boundary flux pass.
51 * \param[in] opt - Flags of the boundary, from one of ScalarFluxOptions' named constructors.
52 */
53 void BoundaryFlux(CGeometry* geometry, CSolver** solver_container, CConfig* config, const ScalarFluxOptions& opt,
54 unsigned short val_marker);
55
56public:
57 /*!
58 * \overload
59 * \param[in] geometry - Geometrical definition of the problem.
60 * \param[in] config - Definition of the particular problem.
61 * \param[in] iMesh - Index of the mesh in multigrid computations.
62 */
63 CTransLMSolver(CGeometry *geometry, CConfig *config, const CSolver* flow_solver, unsigned short iMesh);
64
65 /*!
66 * \brief Destructor of the class.
67 */
68 ~CTransLMSolver() = default;
69
70 /*!
71 * \brief Restart residual and compute gradients.
72 * \param[in] geometry - Geometrical definition of the problem.
73 * \param[in] solver_container - Container vector with all the solutions.
74 * \param[in] config - Definition of the particular problem.
75 * \param[in] iMesh - Index of the mesh in multigrid computations.
76 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
77 * \param[in] RunTime_EqSystem - System of equations which is going to be solved.
78 * \param[in] Output - boolean to determine whether to print output.
79 */
80 void Preprocessing(CGeometry *geometry,
81 CSolver **solver_container,
82 CConfig *config,
83 unsigned short iMesh,
84 unsigned short iRKStep,
85 unsigned short RunTime_EqSystem,
86 bool Output) override;
87
88 /*!
89 * \brief Computes the effective intermtittency.
90 * \param[in] geometry - Geometrical definition of the problem.
91 * \param[in] solver_container - Container vector with all the solutions.
92 * \param[in] config - Definition of the particular problem.
93 * \param[in] iMesh - Index of the mesh in multigrid computations.
94 */
95 void Postprocessing(CGeometry *geometry,
96 CSolver **solver_container,
97 CConfig *config,
98 unsigned short iMesh) override;
99
100 /*!
101 * \brief Compute the spatial integration using the CScalarFlux_TransLM edge kernel, which
102 * computes and writes both the convective and the diffusive term of every edge.
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 - Unused, kept only for the boundary conditions.
106 * \param[in] config - Definition of the particular problem.
107 * \param[in] iMesh - Index of the mesh in multigrid computations.
108 */
109 void Upwind_Residual(CGeometry* geometry, CSolver** solver_container, CNumerics** numerics_container,
110 CConfig* config, unsigned short iMesh) override;
111
112 /*!
113 * \brief Source term computation.
114 * \param[in] geometry - Geometrical definition of the problem.
115 * \param[in] solver_container - Container vector with all the solutions.
116 * \param[in] numerics_container - Description of the numerical method.
117 * \param[in] config - Definition of the particular problem.
118 * \param[in] iMesh - Index of the mesh in multigrid computations.
119 */
120 void Source_Residual(CGeometry *geometry,
121 CSolver **solver_container,
122 CNumerics **numerics_container,
123 CConfig *config,
124 unsigned short iMesh) override;
125
126 /*!
127 * \brief Source term computation.
128 * \param[in] geometry - Geometrical definition of the problem.
129 * \param[in] solver_container - Container vector with all the solutions.
130 * \param[in] numerics - Description of the numerical method.
131 * \param[in] config - Definition of the particular problem.
132 * \param[in] iMesh - Index of the mesh in multigrid computations.
133 */
134 void Source_Template(CGeometry *geometry,
135 CSolver **solver_container,
136 CNumerics *numerics,
137 CConfig *config,
138 unsigned short iMesh) override;
139
140 /*!
141 * \brief Impose the Langtry Menter transition wall boundary condition.
142 * \param[in] geometry - Geometrical definition of the problem.
143 * \param[in] solver_container - Container vector with all the solutions.
144 * \param[in] conv_numerics - Description of the numerical method.
145 * \param[in] visc_numerics - Description of the numerical method.
146 * \param[in] config - Definition of the particular problem.
147 * \param[in] val_marker - Surface marker where the boundary condition is applied.
148 */
149 void BC_HeatFlux_Wall(CGeometry *geometry,
150 CSolver **solver_container,
151 CNumerics *conv_numerics,
152 CNumerics *visc_numerics,
153 CConfig *config,
154 unsigned short val_marker) override;
155
156 /*!
157 * \brief Impose the Navier-Stokes wall boundary condition.
158 * \param[in] geometry - Geometrical definition of the problem.
159 * \param[in] solver_container - Container vector with all the solutions.
160 * \param[in] conv_numerics - Description of the numerical method.
161 * \param[in] visc_numerics - Description of the numerical method.
162 * \param[in] config - Definition of the particular problem.
163 * \param[in] val_marker - Surface marker where the boundary condition is applied.
164 */
165 void BC_Isothermal_Wall(CGeometry *geometry,
166 CSolver **solver_container,
167 CNumerics *conv_numerics,
168 CNumerics *visc_numerics,
169 CConfig *config,
170 unsigned short val_marker) override;
171
172 /*!
173 * \brief Impose the inlet boundary condition.
174 * \param[in] geometry - Geometrical definition of the problem.
175 * \param[in] solver_container - Container vector with all the solutions.
176 * \param[in] conv_numerics - Description of the numerical method.
177 * \param[in] visc_numerics - Description of the numerical method.
178 * \param[in] config - Definition of the particular problem.
179 * \param[in] val_marker - Surface marker where the boundary condition is applied.
180 */
181 void BC_Inlet(CGeometry *geometry,
182 CSolver **solver_container,
183 CNumerics *conv_numerics,
184 CNumerics *visc_numerics,
185 CConfig *config,
186 unsigned short val_marker) override;
187
188 /*!
189 * \brief Impose the outlet boundary condition.
190 * \param[in] geometry - Geometrical definition of the problem.
191 * \param[in] solver_container - Container vector with all the solutions.
192 * \param[in] conv_numerics - Description of the numerical method.
193 * \param[in] visc_numerics - Description of the numerical method.
194 * \param[in] config - Definition of the particular problem.
195 * \param[in] val_marker - Surface marker where the boundary condition is applied.
196 */
197 void BC_Outlet(CGeometry *geometry,
198 CSolver **solver_container,
199 CNumerics *conv_numerics,
200 CNumerics *visc_numerics,
201 CConfig *config,
202 unsigned short val_marker) override;
203
204 /*!
205 * \brief Impose the far-field boundary condition, via the CScalarFlux_TransLM edge kernel.
206 * \note BC_Outlet forwards to this, so the far-field state is imposed at both MARKER_FAR and
207 * MARKER_OUTLET.
208 * \param[in] geometry - Geometrical definition of the problem.
209 * \param[in] solver_container - Container vector with all the solutions.
210 * \param[in] conv_numerics - Unused, kept only for the boundary condition dispatch.
211 * \param[in] visc_numerics - Unused, kept only for the boundary condition dispatch.
212 * \param[in] config - Definition of the particular problem.
213 * \param[in] val_marker - Surface marker where the boundary condition is applied.
214 */
215 void BC_Far_Field(CGeometry *geometry,
216 CSolver **solver_container,
217 CNumerics *conv_numerics,
218 CNumerics *visc_numerics,
219 CConfig *config,
220 unsigned short val_marker) override;
221
222 /*!
223 * \brief Impose the fluid interface (sliding mesh) boundary condition, via the
224 * CScalarFlux_TransLM edge kernel.
225 * \param[in] geometry - Geometrical definition of the problem.
226 * \param[in] solver_container - Container vector with all the solutions.
227 * \param[in] conv_numerics - Unused, kept only for the boundary condition dispatch.
228 * \param[in] visc_numerics - Unused, kept only for the boundary condition dispatch.
229 * \param[in] config - Definition of the particular problem.
230 */
231 void BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
232 CNumerics *visc_numerics, CConfig *config) override;
233
234 /*!
235 * \brief Get the value of the intermittency.
236 * \return Value of the turbulent kinetic energy.
237 */
238 inline su2double GetIntermittency_Inf(void) const override { return Solution_Inf[0]; }
239
240 /*!
241 * \brief Get the value of the intermittency.
242 * \return Value of the turbulent kinetic energy.
243 */
244 inline su2double GetReThetaT_Inf(void) const override { return Solution_Inf[1]; }
245
246 /*!
247 * \brief Load a solution from a restart file.
248 * \param[in] geometry - Geometrical definition of the problem.
249 * \param[in] solver - Container vector with all of the solvers.
250 * \param[in] config - Definition of the particular problem.
251 * \param[in] val_iter - Current external iteration number.
252 * \param[in] val_update_geo - Flag for updating coords and grid velocity.
253 */
254 void LoadRestart(CGeometry** geometry, CSolver*** solver, CConfig* config, int val_iter, bool val_update_geo) final;
255
256};
Headers of the CTurbSolver class.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
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
su2double Solution_Inf[MAXNVAR]
Far-field solution.
Definition CScalarSolver.hpp:73
Definition CSolver.hpp:71
Main class for defining the transition model solver.
Definition CTransLMSolver.hpp:40
su2double GetReThetaT_Inf(void) const override
Get the value of the intermittency.
Definition CTransLMSolver.hpp:244
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, via the CScalarFlux_TransLM edge kernel.
Definition CTransLMSolver.cpp:454
void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Navier-Stokes wall boundary condition.
Definition CTransLMSolver.cpp:409
void Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh) override
Source term computation.
Definition CTransLMSolver.cpp:298
void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Langtry Menter transition wall boundary condition.
Definition CTransLMSolver.cpp:386
void Source_Template(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh) override
Source term computation.
Definition CTransLMSolver.cpp:381
void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo) final
Load a solution from a restart file.
Definition CTransLMSolver.cpp:497
su2double GetIntermittency_Inf(void) const override
Get the value of the intermittency.
Definition CTransLMSolver.hpp:238
void Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh) override
Compute the spatial integration using the CScalarFlux_TransLM edge kernel, which computes and writes ...
Definition CTransLMSolver.cpp:278
~CTransLMSolver()=default
Destructor of the class.
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 CTransLMSolver.cpp:185
void Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh) override
Computes the effective intermtittency.
Definition CTransLMSolver.cpp:194
void BC_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the outlet boundary condition.
Definition CTransLMSolver.cpp:448
void BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the inlet boundary condition.
Definition CTransLMSolver.cpp:417
void BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config) override
Impose the fluid interface (sliding mesh) boundary condition, via the CScalarFlux_TransLM edge kernel...
Definition CTransLMSolver.cpp:478
Main class for defining the turbulence model solver.
Definition CTurbSolver.hpp:40
Class for LM model's correlation functions.
Definition trans_correlations.hpp:35
passivedouble su2double
Definition code_config.hpp:181
TURB_FAMILY
Families of turbulence models.
Definition option_structure.hpp:1080
Structure containing parsed LM options.
Definition option_structure.hpp:1417
Loop invariant flags for a scalar edge flux, built once outside the edge loop so the compiler can uns...
Definition scalar_edge_flux.hpp:55