Documentation 6b54b78464
Loading...
Searching...
No Matches
CNEMONSSolver.hpp
Go to the documentation of this file.
1/*!
2 * \file CNEMONSSolver.hpp
3 * \brief Headers of the CNEMONSSolver class
4 * \author S. R. Copeland, F. Palacios, W. Maier.
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 <cmath>
31#include <iostream>
32#include <cstdlib>
33
34#include "CNEMOEulerSolver.hpp"
35
36/*!
37 * \class CNEMONSSolver
38 * \brief Main class for defining the NEMO Navier-Stokes flow solver.
39 * \ingroup Navier_Stokes_Equations
40 * \author S. R. Copeland, F. Palacios, W. Maier.
41 */
42class CNEMONSSolver final : public CNEMOEulerSolver {
43private:
44
45 /*!
46 * \brief Compute the velocity^2, SoundSpeed, Pressure, Enthalpy, Viscosity.
47 * \param[in] solver_container - Container vector with all the solutions.
48 * \param[in] config - Definition of the particular problem.
49 * \param[in] Output - boolean to determine whether to print output.
50 * \return - The number of non-physical points.
51 */
52 unsigned long SetPrimitive_Variables(CSolver **solver_container,
53 CConfig *config, bool Output) override;
54
55 /*!
56 * \brief Compute the viscous residuals.
57 * \param[in] geometry - Geometrical definition of the problem.
58 * \param[in] solver_container - Container vector with all the solutions.
59 * \param[in] numerics - Description of the numerical method.
60 * \param[in] config - Definition of the particular problem.
61 * \param[in] iMesh - Index of the mesh in multigrid computations.
62 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
63 */
64 void Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container,
65 CConfig *config, unsigned short iMesh, unsigned short iRKStep) override;
66
67 /*!
68 * \brief Computes the wall shear stress (Tau_Wall) on the surface using a wall function.
69 * \param[in] geometry - Geometrical definition of the problem.
70 * \param[in] solver_container - Container vector with all the solutions.
71 * \param[in] config - Definition of the particular problem.
72 */
73 void SetTau_Wall_WF(CGeometry *geometry, CSolver** solver_container, const CConfig* config);
74
75public:
76
77 /*!
78 * \brief Constructor of the class.
79 */
80 CNEMONSSolver() = default;
81
82 /*!
83 * \overload
84 * \param[in] geometry - Geometrical definition of the problem.
85 * \param[in] config - Definition of the particular problem.
86 */
87 CNEMONSSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh);
88
89 /*!
90 * \brief Destructor of the class.
91 */
92 ~CNEMONSSolver() = default;
93
94 /*!
95 * \brief Compute the gradient of the primitive variables using Green-Gauss method,
96 * and stores the result in the <i>Gradient_Primitive</i> variable.
97 * \param[in] geometry - Geometrical definition of the problem.
98 * \param[in] config - Definition of the particular problem.
99 * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction.
100 */
101 void SetPrimitive_Gradient_GG(CGeometry *geometry,
102 const CConfig *config,
103 bool reconstruction = false) override;
104
105 /*!
106 * \brief Restart residual and compute gradients.
107 * \param[in] geometry - Geometrical definition of the problem.
108 * \param[in] solver_container - Container vector with all the solutions.
109 * \param[in] config - Definition of the particular problem.
110 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
111 * \param[in] RunTime_EqSystem - System of equations which is going to be solved.
112 * \param[in] Output - boolean to determine whether to print output.
113 */
114 void Preprocessing(CGeometry *geometry,
115 CSolver **solver_container,
116 CConfig *config,
117 unsigned short iMesh,
118 unsigned short iRKStep,
119 unsigned short RunTime_EqSystem,
120 bool Output) override;
121
122 /*!
123 * \brief Impose a constant heat-flux condition at the wall.
124 * \param[in] geometry - Geometrical definition of the problem.
125 * \param[in] solver_container - Container vector with all the solutions.
126 * \param[in] conv_numerics - Description of the numerical method for convective terms.
127 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
128 * \param[in] config - Definition of the particular problem.
129 * \param[in] val_marker - Surface marker where the boundary condition is applied.
130 */
131 void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
132 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override;
133
134 /*!
135 * \brief Impose a constant heat-flux condition at the wall.
136 * \param[in] geometry - Geometrical definition of the problem.
137 * \param[in] solver_container - Container vector with all the solutions.
138 * \param[in] conv_numerics - Description of the numerical method for convective terms.
139 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
140 * \param[in] config - Definition of the particular problem.
141 * \param[in] val_marker - Surface marker where the boundary condition is applied.
142 */
144 CSolver **solver_container,
145 CNumerics *conv_numerics,
146 CNumerics *visc_numerics,
147 CConfig *config, unsigned short val_marker);
148
149 /*!
150 * \brief Impose a constant heat-flux condition at the wall.
151 * \param[in] geometry - Geometrical definition of the problem.
152 * \param[in] solver_container - Container vector with all the solutions.
153 * \param[in] conv_numerics - Description of the numerical method for convective terms.
154 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
155 * \param[in] config - Definition of the particular problem.
156 * \param[in] val_marker - Surface marker where the boundary condition is applied.
157 */
159 CSolver **solver_container,
160 CNumerics *conv_numerics,
161 CNumerics *visc_numerics,
162 CConfig *config, unsigned short val_marker);
163
164 /*!
165 * \brief Generic implementation of the isothermal wall.
166 * \param[in] geometry - Geometrical definition of the problem.
167 * \param[in] solver_container - Container vector with all the solutions.
168 * \param[in] conv_numerics - Description of the numerical method for convective terms.
169 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
170 * \param[in] config - Definition of the particular problem.
171 * \param[in] val_marker - Surface marker where the boundary condition is applied.
172 */
173 void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
174 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override;
175
176 /*!
177 * \brief Impose the Navier-Stokes boundary condition (strong).
178 * \param[in] geometry - Geometrical definition of the problem.
179 * \param[in] solver_container - Container vector with all the solutions.
180 * \param[in] conv_numerics - Description of the numerical method for convective terms.
181 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
182 * \param[in] config - Definition of the particular problem.
183 * \param[in] val_marker - Surface marker where the boundary condition is applied.
184 */
185 void BC_IsothermalNonCatalytic_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics,
186 CNumerics *visc_numerics, CConfig *config, unsigned short val_marker);
187
188 /*!
189 * \brief Impose the Navier-Stokes boundary condition (strong).
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 for convective terms.
193 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
194 * \param[in] config - Definition of the particular problem.
195 * \param[in] val_marker - Surface marker where the boundary condition is applied.
196 */
198 CSolver **solver_container,
199 CNumerics *conv_numerics,
200 CNumerics *visc_numerics,
201 CConfig *config, unsigned short val_marker);
202
203 /*!
204 * \brief Impose the Navier-Stokes boundary condition (strong).
205 * \param[in] geometry - Geometrical definition of the problem.
206 * \param[in] solver_container - Container vector with all the solutions.
207 * \param[in] conv_numerics - Description of the numerical method for convective terms.
208 * \param[in] visc_numerics - Description of the numerical method for viscous terms.
209 * \param[in] config - Definition of the particular problem.
210 * \param[in] val_marker - Surface marker where the boundary condition is applied.
211 */
212 void BC_Smoluchowski_Maxwell(CGeometry *geometry,
213 CSolver **solver_container,
214 CNumerics *conv_numerics,
215 CNumerics *visc_numerics,
216 CConfig *config,
217 unsigned short val_marker) override;
218};
Headers of the CNEMOEulerSolver 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
Main class for defining the NEMO Euler's flow solver.
Definition CNEMOEulerSolver.hpp:41
Main class for defining the NEMO Navier-Stokes flow solver.
Definition CNEMONSSolver.hpp:42
void BC_IsothermalNonCatalytic_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the Navier-Stokes boundary condition (strong).
Definition CNEMONSSolver.cpp:531
void BC_HeatFluxCatalytic_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose a constant heat-flux condition at the wall.
Definition CNEMONSSolver.cpp:348
~CNEMONSSolver()=default
Destructor of the class.
void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Generic implementation of the isothermal wall.
Definition CNEMONSSolver.cpp:516
void BC_Smoluchowski_Maxwell(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose the Navier-Stokes boundary condition (strong).
Definition CNEMONSSolver.cpp:852
void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose a constant heat-flux condition at the wall.
Definition CNEMONSSolver.cpp:330
void BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose a constant heat-flux condition at the wall.
Definition CNEMONSSolver.cpp:247
CNEMONSSolver()=default
Constructor of the class.
void BC_IsothermalCatalytic_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the Navier-Stokes boundary condition (strong).
Definition CNEMONSSolver.cpp:656
void SetPrimitive_Gradient_GG(CGeometry *geometry, const CConfig *config, bool reconstruction=false) override
Compute the gradient of the primitive variables using Green-Gauss method, and stores the result in th...
Definition CNEMONSSolver.cpp:149
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 CNEMONSSolver.cpp:58
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Definition CSolver.hpp:71