Documentation 6b54b78464
Loading...
Searching...
No Matches
CIncNSSolver.hpp
Go to the documentation of this file.
1/*!
2 * \file CIncNSSolver.hpp
3 * \brief Headers of the CIncNSSolver class
4 * \author F. Palacios, T. Economon, T. Albring
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 "CIncEulerSolver.hpp"
31
32/*!
33 * \class CIncNSSolver
34 * \brief Main class for defining the incompressible Navier-Stokes flow solver.
35 * \ingroup Navier_Stokes_Equations
36 * \author F. Palacios, T. Economon, T. Albring
37 */
38class CIncNSSolver final : public CIncEulerSolver {
39
40 /*!
41 * \brief Generic implementation of the isothermal, heatflux and heat-transfer/convection walls.
42 */
43 void BC_Wall_Generic(const CGeometry *geometry,
44 const CConfig *config,
45 unsigned short val_marker,
46 unsigned short kind_boundary);
47
48 /*!
49 * \brief Compute the velocity^2, SoundSpeed, Pressure, Enthalpy, Viscosity.
50 * \param[in] solver_container - Container vector with all the solutions.
51 * \param[in] config - Definition of the particular problem.
52 * \return - The number of non-physical points.
53 */
54 unsigned long SetPrimitive_Variables(CSolver **solver_container,
55 const CConfig *config) override;
56
57 /*!
58 * \brief Compute the viscous contribution for a particular edge.
59 * \param[in] iEdge - Edge for which the flux and Jacobians are to be computed.
60 * \param[in] geometry - Geometrical definition of the problem.
61 * \param[in] solver_container - Container vector with all the solutions.
62 * \param[in] numerics - Description of the numerical method.
63 * \param[in] config - Definition of the particular problem.
64 * \return The viscous Jacobians, to be applied by the caller together with the convective part.
65 */
66 CNumerics::ResidualType<> Viscous_Residual(unsigned long iEdge, CGeometry *geometry, CSolver **solver_container,
67 CNumerics *numerics, CConfig *config) override;
68
69/*!
70 * \brief Computes the wall shear stress (Tau_Wall) on the surface using a wall function.
71 * \param[in] geometry - Geometrical definition of the problem.
72 * \param[in] solver_container - Container vector with all the solutions.
73 * \param[in] config - Definition of the particular problem.
74 */
75 void SetTau_Wall_WF(CGeometry *geometry,
76 CSolver** solver_container,
77 const CConfig* config);
78
79 /*!
80 * \brief Compute necessary quantities (massflow, integrated heatflux, avg density)
81 * for streamwise periodic cases. Also sets new delta P for prescribed massflow.
82 * \param[in] geometry - Geometrical definition of the problem.
83 * \param[in] config - Definition of the particular problem.
84 * \param[in] iMesh - current mesh level for the multigrid.
85 */
86 void GetStreamwise_Periodic_Properties(const CGeometry *geometry,
87 CConfig *config,
88 const unsigned short iMesh);
89
90 /*!
91 * \brief Compute recovered pressure/temperature for streamwise periodic flow and store in CVariable.
92 * \param[in] config - Definition of the particular problem.
93 * \param[in] geometry - Geometrical definition of the problem.
94 * \param[in] iMesh - current mesh level for the multigrid.
95 */
96 void Compute_Streamwise_Periodic_Recovered_Values(CConfig *config, const CGeometry *geometry,
97 const unsigned short iMesh);
98 /*!
99 * \brief Compute the enthalpy due to species diffusion contribution for multicomponent and reacting flows.
100 * \param[in] iEdge - Edge for which the flux and Jacobians are to be computed.
101 * \param[in] geometry - Geometrical definition of the problem.
102 * \param[in] solver_container - Container vector with all the solutions.
103 * \param[in] numerics - Description of the numerical method.
104 * \param[in] n_species - Number of species in the mixture that a transport equation is solved.
105 * \param[in] implicit - Boolean for implicit iterations.
106 */
107 void Compute_Enthalpy_Diffusion(unsigned long iEdge, CGeometry* geometry, CSolver** solver_container,
108 CNumerics* numerics, const int n_species, const bool implicit);
109
110 public:
111 /*!
112 * \brief Constructor of the class.
113 * \param[in] geometry - Geometrical definition of the problem.
114 * \param[in] config - Definition of the particular problem.
115 */
116 CIncNSSolver(CGeometry *geometry, CConfig *config, unsigned short iMesh);
117
118 /*!
119 * \brief Restart residual and compute gradients.
120 * \param[in] geometry - Geometrical definition of the problem.
121 * \param[in] solver_container - Container vector with all the solutions.
122 * \param[in] config - Definition of the particular problem.
123 * \param[in] iRKStep - Current step of the Runge-Kutta iteration.
124 * \param[in] RunTime_EqSystem - System of equations which is going to be solved.
125 * \param[in] Output - boolean to determine whether to print output.
126 */
127 void Preprocessing(CGeometry *geometry,
128 CSolver **solver_container,
129 CConfig *config,
130 unsigned short iMesh,
131 unsigned short iRKStep,
132 unsigned short RunTime_EqSystem,
133 bool Output) override;
134
135 /*!
136 * \brief Impose a no-slip condition.
137 * \param[in] geometry - Geometrical definition of the problem.
138 * \param[in] solver_container - Container vector with all the solutions.
139 * \param[in] conv_numerics - Description of the numerical method.
140 * \param[in] visc_numerics - Description of the numerical method.
141 * \param[in] config - Definition of the particular problem.
142 * \param[in] val_marker - Surface marker where the boundary condition is applied.
143 */
144 void BC_HeatFlux_Wall(CGeometry *geometry,
145 CSolver **solver_container,
146 CNumerics *conv_numerics,
147 CNumerics *visc_numerics,
148 CConfig *config,
149 unsigned short val_marker) override;
150
151 /*!
152 * \brief Impose an isothermal temperature condition at the wall.
153 * \param[in] geometry - Geometrical definition of the problem.
154 * \param[in] solver_container - Container vector with all the solutions.
155 * \param[in] conv_numerics - Description of the numerical method.
156 * \param[in] visc_numerics - Description of the numerical method.
157 * \param[in] config - Definition of the particular problem.
158 * \param[in] val_marker - Surface marker where the boundary condition is applied.
159 */
160 void BC_Isothermal_Wall(CGeometry *geometry,
161 CSolver **solver_container,
162 CNumerics *conv_numerics,
163 CNumerics *visc_numerics,
164 CConfig *config,
165 unsigned short val_marker) override;
166
167 /*!
168 * \brief Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity.
169 * \param[in] geometry - Geometrical definition of the problem.
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_HeatTransfer_Wall(const CGeometry *geometry,
174 const CConfig *config,
175 const unsigned short val_marker) override;
176
177 /*!
178 * \brief Impose the (received) conjugate heat variables.
179 * \param[in] geometry - Geometrical definition of the problem.
180 * \param[in] solver_container - Container vector with all the solutions.
181 * \param[in] numerics - Description of the numerical method.
182 * \param[in] config - Definition of the particular problem.
183 * \param[in] val_marker - Surface marker where the boundary condition is applied.
184 */
186 CSolver **solver_container,
187 CNumerics *numerics,
188 CConfig *config,
189 unsigned short val_marker) override;
190
191};
Headers of the CIncEulerSolver 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 incompressible Euler flow solver.
Definition CIncEulerSolver.hpp:39
Main class for defining the incompressible Navier-Stokes flow solver.
Definition CIncNSSolver.hpp:38
void BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker) override
Impose the (received) conjugate heat variables.
Definition CIncNSSolver.cpp:617
void BC_HeatTransfer_Wall(const CGeometry *geometry, const CConfig *config, const unsigned short val_marker) override
Impose a heat flux by prescribing a heat transfer coefficient and a temperature at infinity.
Definition CIncNSSolver.cpp:611
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 temperature condition at the wall.
Definition CIncNSSolver.cpp:604
void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) override
Impose a no-slip condition.
Definition CIncNSSolver.cpp:597
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 CIncNSSolver.cpp:64
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Definition CSolver.hpp:71
Return type used in some "ComputeResidual" overloads to give a const-view of the internally stored fl...
Definition CNumerics.hpp:218