Documentation 6b54b78464
Loading...
Searching...
No Matches
CIncIdealGas.hpp
Go to the documentation of this file.
1/*!
2 * \file CIncIdealGas.hpp
3 * \brief Defines the incompressible Ideal Gas model.
4 * \author T. Economon
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 CIncIdealGas
34 * \brief Child class for defining an incompressible ideal gas model.
35 * \author: T. Economon
36 */
37class CIncIdealGas final : public CFluidModel {
38 public:
39 /*!
40 * \brief Constructor of the class.
41 */
42 CIncIdealGas(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure, su2double val_Std_Ref_Temp_ND) {
43 /*--- In the incompressible ideal gas model, the thermodynamic pressure
44 is decoupled from the governing equations and held constant. The
45 density is therefore only a function of temperature variations. ---*/
46 Gas_Constant = val_gas_constant;
47 Pressure = val_operating_pressure;
48 Gamma = 1.0;
49 Cp = val_Cp;
50 Cv = Cp;
51 Std_Ref_Temp_ND = val_Std_Ref_Temp_ND;
52 }
53
54 /*!
55 * \brief Set the Dimensionless State using Temperature.
56 * \param[in] t - Temperature value at the point.
57 */
58 void SetTDState_T(su2double t, const su2double *val_scalars = nullptr) override {
59 /*--- The EoS only depends upon temperature. ---*/
60 Temperature = t;
61 Density = Pressure / (Temperature * Gas_Constant);
62 Enthalpy = Cp * (Temperature - Std_Ref_Temp_ND); // Sensible enthalpy relative to REF_TEMP
63 }
64
65 /*!
66 * \brief Set the Dimensionless State using Enthalpy.
67 * \param[in] val_enthalpy - Enthalpy value at the point.
68 */
69 void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override {
70 Enthalpy = val_enthalpy;
71 Temperature = Enthalpy / Cp + Std_Ref_Temp_ND; // Temperature from sensible enthalpy
72 Density = Pressure / (Temperature * Gas_Constant);
73 }
74
75 private:
76 su2double Gas_Constant{0.0}; /*!< \brief Gas Constant. */
77 su2double Gamma{0.0}; /*!< \brief Heat Capacity Ratio. */
78 su2double Std_Ref_Temp_ND{0.0}; /*!< \brief Nondimensional standard reference temperature for enthalpy. */
79};
Defines the main fluid model class for thermophysical properties.
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
su2double Cp
Specific Heat Capacity at constant pressure.
Definition CFluidModel.hpp:64
su2double Temperature
Temperature.
Definition CFluidModel.hpp:55
su2double Cv
Specific Heat Capacity at constant volume.
Definition CFluidModel.hpp:65
su2double Enthalpy
Enthalpy.
Definition CFluidModel.hpp:50
su2double Pressure
Pressure.
Definition CFluidModel.hpp:53
su2double Density
Density.
Definition CFluidModel.hpp:52
Child class for defining an incompressible ideal gas model.
Definition CIncIdealGas.hpp:37
void SetTDState_T(su2double t, const su2double *val_scalars=nullptr) override
Set the Dimensionless State using Temperature.
Definition CIncIdealGas.hpp:58
void SetTDState_h(su2double val_enthalpy, const su2double *val_scalars=nullptr) override
Set the Dimensionless State using Enthalpy.
Definition CIncIdealGas.hpp:69
CIncIdealGas(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure, su2double val_Std_Ref_Temp_ND)
Constructor of the class.
Definition CIncIdealGas.hpp:42
passivedouble su2double
Definition code_config.hpp:181