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  Hs_(pt.Hs_),
41  Cp_(pt.Cp_),
42  Cv_(pt.Cv_)
43 {}
44 
45 
46 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
47 
48 template<class EquationOfState>
50 (
51  const scalar T
52 ) const
53 {
54  return T;
55 }
56 
57 
58 template<class EquationOfState>
60 (
61  const scalar p,
62  const scalar T
63 ) const
64 {
65  return Cp_.value(p, T);
66 }
67 
68 
69 template<class EquationOfState>
71 (
72  const scalar p,
73  const scalar T
74 ) const
75 {
76  return Cv_.value(p, T);
77 }
78 
79 
80 template<class EquationOfState>
82 (
83  const scalar p,
84  const scalar T
85 ) const
86 {
87  return Hs_.value(p, T);
88 }
89 
90 
91 template<class EquationOfState>
93 (
94  const scalar p,
95  const scalar T
96 ) const
97 {
98  return Hs(p, T) + Hf_;
99 }
100 
101 
102 template<class EquationOfState>
104 const
105 {
106  return Hf_;
107 }
108 
109 
110 template<class EquationOfState>
112 (
113  const scalar p,
114  const scalar T
115 ) const
116 {
117  return Hs(p, T) - p/EquationOfState::rho(p, T);
118 }
119 
120 
121 template<class EquationOfState>
123 (
124  const scalar p,
125  const scalar T
126 ) const
127 {
128  return Ha(p, T) - p/EquationOfState::rho(p, T);
129 }
130 
131 
132 template<class EquationOfState>
134 (
135  const scalar p,
136  const scalar T
137 ) const
138 {
140  return 0;
141 }
142 
143 
144 template<class EquationOfState>
146 (
147  const scalar T
148 ) const
149 {
151  return 0;
152 }
153 
154 
155 template<class EquationOfState>
157 (
158  const scalar p,
159  const scalar T
160 ) const
161 {
162  return Cp_.dfdT(p, T);
163 }
164 
165 
166 // ************************************************************************* //
scalar Cv(const scalar p, const scalar T) const
Heat capacity at constant volume [J/kg/K].
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 uniform tabulated data for enthalpy and heat capacity vs ...
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].
scalar Ea(const scalar p, const scalar T) const
Absolute internal energy [J/kg].
A class for handling words, derived from string.
Definition: word.H:59
scalar Es(const scalar p, const scalar T) const
Sensible internal energy [J/kg].
scalar S(const scalar p, const scalar T) const
Entropy [J/kg/K].
const volScalarField & T
scalar Hf() const
Enthalpy of formation [J/kg].
scalar Ha(const scalar p, const scalar T) const
Definition: EtoHthermo.H:20
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353