Documentation a537f1bdf2
Loading...
Searching...
No Matches
CNEMONSVariable.hpp
Go to the documentation of this file.
1/*!
2 * \file CNEMONSVariable.hpp
3 * \brief Class for defining the variables of the compressible NEMO Navier-Stokes solver.
4 * \author C. Garbacz, W. Maier, S.R. Copeland.
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
31
32/*!
33 * \class CNEMONSVariable
34 * \brief Main class for defining the variables of the NEMO Navier-Stokes' solver.
35 * \ingroup Navier_Stokes_Equations
36 * \author C. Garbacz, W. Maier, S.R. Copeland.
37 */
38class CNEMONSVariable final : public CNEMOEulerVariable {
39private:
40 VectorType Prandtl_Lam; /*!< \brief Laminar Prandtl number. */
41 VectorType Temperature_Ref; /*!< \brief Reference temperature of the fluid. */
42 VectorType Viscosity_Ref; /*!< \brief Reference viscosity of the fluid. */
43 VectorType Viscosity_Inf; /*!< \brief Viscosity of the fluid at the infinity. */
44 MatrixType DiffusionCoeff; /*!< \brief Diffusion coefficient of the mixture. */
45 CVectorOfMatrix Dij; /*!< \brief Binary diffusion coefficients. */
46 VectorType LaminarViscosity; /*!< \brief Viscosity of the fluid. */
47 VectorType ThermalCond; /*!< \brief T-R thermal conductivity of the gas mixture. */
48 VectorType ThermalCond_ve; /*!< \brief V-E thermal conductivity of the gas mixture. */
49 MatrixType Enthalpys; /*!< \brief Species enthalpies of the mixture. */
50
51 su2double inv_TimeScale; /*!< \brief Inverse of the reference time scale. */
52
53 VectorType Tau_Wall; /*!< \brief Magnitude of the wall shear stress from a wall function. */
54 VectorType DES_LengthScale; /*!< \brief DES Length Scale. */
55 VectorType lesMode; /*!< \brief Sensor for local simulation mode (0=RANS, 1=LES). */
56 VectorType Roe_Dissipation; /*!< \brief Roe low dissipation coefficient. */
57 VectorType Vortex_Tilting; /*!< \brief Value of the vortex tilting variable for DES length scale computation. */
58
59public:
60
61 /*!
62 * \brief Constructor of the class.
63 * \param[in] val_density - Value of the flow density (initialization value).
64 * \param[in] val_massfrac - Value of the flow mass fraction (initialization value).
65 * \param[in] val_velocity - Value of the flow velocity (initialization value).
66 * \param[in] val_temperature - Value of the flow temperature (initialization value).
67 * \param[in] val_temperature_ve - Value of the flow temperature_ve (initialization value).
68 * \param[in] npoint - Number of points/nodes/vertices in the domain.
69 * \param[in] val_nDim - Number of dimensions of the problem.
70 * \param[in] val_nVar - Number of conserved variables.
71 * \param[in] val_nPrimVar - Number of primitive variables.
72 * \param[in] val_nPrimVargrad - Number of primitive gradient variables.
73 * \param[in] config - Definition of the particular problem.
74 */
75 CNEMONSVariable(su2double val_density, const su2double *val_massfrac, const su2double *val_velocity,
76 su2double val_temperature, su2double val_temperature_ve, unsigned long npoint,
77 unsigned long val_nDim, unsigned long val_nVar, unsigned long val_nPrimVar,
78 unsigned long val_nPrimVarGrad, const CConfig *config, CNEMOGas *fluidmodel);
79
80 /*!
81 * \brief Get the primitive variables for all points.
82 * \return Reference to primitives.
83 */
84 inline const MatrixType& GetPrimitive_Aux(void) const { return Primitive_Aux; }
85
86 /*!
87 * \brief Set all the primitive variables for compressible flows.
88 */
89 bool SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel) final;
90
91 /*!
92 * \overload
93 * \param[in] eddy_visc - Value of the eddy viscosity.
94 */
95 inline void SetEddyViscosity(unsigned long iPoint, su2double eddy_visc) override { Primitive(iPoint,EDDY_VISC_INDEX) = eddy_visc; }
96
97 /*!
98 * \brief Get the species diffusion coefficient.
99 * \return Value of the species diffusion coefficient.
100 */
101 inline su2double* GetDiffusionCoeff(unsigned long iPoint) override { return DiffusionCoeff[iPoint]; }
102
103 /*!
104 * \brief Get the species enthalpy.
105 * \return Value of the species enthalpy.
106 */
107 inline su2double* GetEnthalpys(unsigned long iPoint) override { return Enthalpys[iPoint]; }
108
109 /*!
110 * \brief Get the laminar viscosity of the flow.
111 * \return Value of the laminar viscosity of the flow.
112 */
113 inline su2double GetLaminarViscosity(unsigned long iPoint) const override { return LaminarViscosity(iPoint); }
114
115 /*!
116 * \brief Get the eddy viscosity of the flow.
117 * \return The eddy viscosity of the flow.
118 */
119 inline su2double GetEddyViscosity(unsigned long iPoint) const override { return Primitive(iPoint,EDDY_VISC_INDEX); }
120
121 /*!
122 * \brief Get the thermal conductivity of the flow.
123 * \return Value of the laminar viscosity of the flow.
124 */
125 inline su2double GetThermalConductivity(unsigned long iPoint) const override {return ThermalCond(iPoint); }
126
127 /*!
128 * \brief Get the vib-el. thermal conductivity of the flow.
129 * \return Value of the laminar viscosity of the flow.
130 */
131 inline su2double GetThermalConductivity_ve(unsigned long iPoint) const override { return ThermalCond_ve(iPoint); }
132};
Class for defining the variables of the compressible NEMO Euler solver.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
MatrixType Primitive
Primitive variables.
Definition CFlowVariable.hpp:41
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
Main class for defining the variables of the NEMO Euler's solver.
Definition CNEMOEulerVariable.hpp:43
CNEMOGas * fluidmodel
Index definition for NEMO pritimive variables.
Definition CNEMOEulerVariable.hpp:93
unsigned long EDDY_VISC_INDEX
Definition CNEMOEulerVariable.hpp:98
MatrixType Primitive_Aux
Primitive auxiliary variables (Y_s, T, Tve, ...) in compressible flows.
Definition CNEMOEulerVariable.hpp:79
Class for defining the 2T (trans-rotational and vibro-electronic) nonequilibrium gas model.
Definition CNEMOGas.hpp:38
Main class for defining the variables of the NEMO Navier-Stokes' solver.
Definition CNEMONSVariable.hpp:38
su2double * GetDiffusionCoeff(unsigned long iPoint) override
Get the species diffusion coefficient.
Definition CNEMONSVariable.hpp:101
su2double GetEddyViscosity(unsigned long iPoint) const override
Get the eddy viscosity of the flow.
Definition CNEMONSVariable.hpp:119
su2double GetThermalConductivity_ve(unsigned long iPoint) const override
Get the vib-el. thermal conductivity of the flow.
Definition CNEMONSVariable.hpp:131
bool SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel) final
Set all the primitive variables for compressible flows.
Definition CNEMONSVariable.cpp:80
const MatrixType & GetPrimitive_Aux(void) const
Get the primitive variables for all points.
Definition CNEMONSVariable.hpp:84
su2double GetLaminarViscosity(unsigned long iPoint) const override
Get the laminar viscosity of the flow.
Definition CNEMONSVariable.hpp:113
su2double * GetEnthalpys(unsigned long iPoint) override
Get the species enthalpy.
Definition CNEMONSVariable.hpp:107
void SetEddyViscosity(unsigned long iPoint, su2double eddy_visc) override
Definition CNEMONSVariable.hpp:95
su2double GetThermalConductivity(unsigned long iPoint) const override
Get the thermal conductivity of the flow.
Definition CNEMONSVariable.hpp:125
passivedouble su2double
Definition code_config.hpp:181