hIcoTabulatedThermoI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "hIcoTabulatedThermo.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class EquationOfState>
32 (
33  const word& name,
34  const hIcoTabulatedThermo& pt
35 )
36 :
37  EquationOfState(name, pt),
38  Hf_(pt.Hf_),
39  Sf_(pt.Sf_),
40  Cp_(pt.Cp_)
41 {}
42 
43 
44 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
45 
46 template<class EquationOfState>
48 (
49  const scalar T
50 ) const
51 {
52  return T;
53 }
54 
55 
56 template<class EquationOfState>
58 (
59  const scalar p,
60  const scalar T
61 ) const
62 {
63  return Cp_.value(T) + EquationOfState::Cp(p, T);
64 }
65 
66 
67 template<class EquationOfState>
69 (
70  const scalar p,
71  const scalar T
72 ) const
73 {
74  return Cp_.intfdT(T) + EquationOfState::H(p, T);
75 }
76 
77 
78 template<class EquationOfState>
80 (
81  const scalar p,
82  const scalar T
83 ) const
84 {
85  return Hs(p, T) + Hf_;
86 }
87 
88 
89 template<class EquationOfState>
91 const
92 {
93  return Hf_;
94 }
95 
96 
97 template<class EquationOfState>
99 (
100  const scalar p,
101  const scalar T
102 ) const
103 {
104  return Cp_.intfByTdT(T) + EquationOfState::Sp(p, T) + Sf_;
105 }
106 
107 
108 template<class EquationOfState>
110 (
111  const scalar T
112 ) const
113 {
114  return Cp_.intfdT(T) + Hf_ - (Cp_.intfByTdT(T) + Sf_)*T;
115 }
116 
117 
118 template<class EquationOfState>
120 (
121  const scalar p,
122  const scalar T
123 ) const
124 {
125  return Cp_.dfdT(T);
126 }
127 
128 
129 // ************************************************************************* //
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
Enthalpy based thermodynamics package using non-uniform tabulated data for heat capacity vs temperatu...
scalar Hs(const scalar p, const scalar T) const
Definition: EtoHthermo.H:11
scalar limit(const scalar) const
Limit the temperature to be in the range Tlow_ to Thigh_.
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
scalar S(const scalar p, const scalar T) const
Entropy [J/kg/K].
A class for handling words, derived from string.
Definition: word.H:59
const tmp< volScalarField::Internal > & Sp
Definition: alphaSuSp.H:7
hIcoTabulatedThermo(const dictionary &dict)
Construct from dictionary.
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
const volScalarField & T
scalar Ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
scalar Cp(const scalar p, const scalar T) const
Definition: EtoHthermo.H:2
scalar Hf() const
Enthalpy of formation [J/kg].