Documentation a537f1bdf2
Loading...
Searching...
No Matches
CIdealGas.hpp
Go to the documentation of this file.
1/*!
2 * \file CIdealGas.hpp
3 * \brief Defines the ideal gas model.
4 * \author S. Vitale, G. Gori, M. Pini, A. Guardone, P. Colonna
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 "CFluidModel.hpp"
31
32/*!
33 * \class CIdealGas
34 * \brief Child class for defining the ideal gas model.
35 * \author: S.Vitale, M.Pini.
36 */
37class CIdealGas : public CFluidModel {
38 protected:
39 su2double Gamma{0.0}; /*!< \brief Ratio of Specific Heats. */
40 su2double Gamma_Minus_One{0.0}; /*!< \brief Ratio of Specific Heats Minus One. */
41 su2double Gas_Constant{0.0}; /*!< \brief Gas Constant. */
42 bool ComputeEntropy{true}; /*!< \brief Whether or not to compute entropy. */
43
44 public:
45 /*!
46 * \brief Constructor of the class.
47 */
48 CIdealGas(su2double gamma, su2double R, bool CompEntropy = true);
49
50 /*!
51 * \brief Set the Dimensionless State using Density and Internal Energy
52 * \param[in] rho - first thermodynamic variable.
53 * \param[in] e - second thermodynamic variable.
54 */
55 void SetTDState_rhoe(su2double rho, su2double e) override;
56
57 /*!
58 * \brief Set the Dimensionless State using Pressure and Temperature
59 * \param[in] P - first thermodynamic variable.
60 * \param[in] T - second thermodynamic variable.
61 */
62 void SetTDState_PT(su2double P, su2double T) override;
63
64 /*!
65 * \brief Set the Dimensionless State using Pressure and Density
66 * \param[in] P - first thermodynamic variable.
67 * \param[in] rho - second thermodynamic variable.
68 */
69 void SetTDState_Prho(su2double P, su2double rho) override;
70
71 /*!
72 * \brief Set the Dimensionless Internal Energy using Pressure and Density
73 * \param[in] P - first thermodynamic variable.
74 * \param[in] rho - second thermodynamic variable.
75 */
76 void SetEnergy_Prho(su2double P, su2double rho) override;
77
78 /*!
79 * \brief Set the Dimensionless State using Enthalpy and Entropy
80 * \param[in] th1 - first thermodynamic variable (h).
81 * \param[in] th2 - second thermodynamic variable (s).
82 *
83 */
84 void SetTDState_hs(su2double h, su2double s) override;
85
86 /*!
87 * \brief Set the Dimensionless State using Density and Temperature
88 * \param[in] th1 - first thermodynamic variable (rho).
89 * \param[in] th2 - second thermodynamic variable (T).
90 *
91 */
92 void SetTDState_rhoT(su2double rho, su2double T) override;
93
94 /*!
95 * \brief Set the Dimensionless State using Pressure and Entropy
96 * \param[in] th1 - first thermodynamic variable (P).
97 * \param[in] th2 - second thermodynamic variable (s).
98 */
99 void SetTDState_Ps(su2double P, su2double s) override;
100
101 /*!
102 * \brief compute some derivatives of enthalpy and entropy needed for subsonic inflow BC
103 * \param[in] InputSpec - Input pair for FLP calls ("Pv").
104 * \param[in] th1 - first thermodynamic variable (P).
105 * \param[in] th2 - second thermodynamic variable (v).
106 *
107 */
108 void ComputeDerivativeNRBC_Prho(su2double P, su2double rho) override;
109};
Defines the main fluid model class for thermophysical properties.
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
Child class for defining the ideal gas model.
Definition CIdealGas.hpp:37
bool ComputeEntropy
Whether or not to compute entropy.
Definition CIdealGas.hpp:42
void SetTDState_PT(su2double P, su2double T) override
Set the Dimensionless State using Pressure and Temperature.
Definition CIdealGas.cpp:55
void SetTDState_rhoT(su2double rho, su2double T) override
Set the Dimensionless State using Density and Temperature.
Definition CIdealGas.cpp:83
void SetTDState_rhoe(su2double rho, su2double e) override
Set the Dimensionless State using Density and Internal Energy.
Definition CIdealGas.cpp:43
su2double Gamma
Ratio of Specific Heats.
Definition CIdealGas.hpp:39
void SetTDState_hs(su2double h, su2double s) override
Set the Dimensionless State using Enthalpy and Entropy.
Definition CIdealGas.cpp:68
su2double Gamma_Minus_One
Ratio of Specific Heats Minus One.
Definition CIdealGas.hpp:40
void SetTDState_Prho(su2double P, su2double rho) override
Set the Dimensionless State using Pressure and Density.
Definition CIdealGas.cpp:61
void SetTDState_Ps(su2double P, su2double s) override
Set the Dimensionless State using Pressure and Entropy.
Definition CIdealGas.cpp:76
void SetEnergy_Prho(su2double P, su2double rho) override
Set the Dimensionless Internal Energy using Pressure and Density.
Definition CIdealGas.cpp:66
su2double Gas_Constant
Gas Constant.
Definition CIdealGas.hpp:41
void ComputeDerivativeNRBC_Prho(su2double P, su2double rho) override
compute some derivatives of enthalpy and entropy needed for subsonic inflow BC
Definition CIdealGas.cpp:88
passivedouble su2double
Definition code_config.hpp:181