hTabulatedThermoI.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 "hTabulatedThermo.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class EquationOfState>
32 (
33  const word& name,
34  const hTabulatedThermo& 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_.f(p, 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 Hs(p, T) + Hf_;
75 }
76 
77 
78 template<class EquationOfState>
80 (
81  const scalar p,
82  const scalar T
83 ) const
84 {
85  return Cp_.intfdT(p, T) + EquationOfState::H(p, T);
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(p, 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(Pstd, T) + Hf_ - (Cp_.intfByTdT(Pstd, 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(p, T);
126 }
127 
128 
129 // ************************************************************************* //
scalar limit(const scalar) const
Limit the temperature to be in the range Tlow_ to Thigh_.
scalar Hs(const scalar p, const scalar T) const
Definition: EtoHthermo.H:11
Enthalpy based thermodynamics package using non-uniform tabulated data for heat capacity vs temperatu...
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
hTabulatedThermo(const dictionary &dict)
Construct from dictionary.
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
scalar Ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
A class for handling words, derived from string.
Definition: word.H:59
scalar S(const scalar p, const scalar T) const
Entropy [J/kg/K].
const volScalarField & T
scalar Cp(const scalar p, const scalar T) const
Definition: EtoHthermo.H:2
const dimensionedScalar & Pstd
Standard pressure.
scalar Hf() const
Enthalpy of formation [J/kg].
zeroField Sp
Definition: alphaSuSp.H:2