All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
eTabulatedThermoI.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 "eTabulatedThermo.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class EquationOfState>
32 (
33  const word& name,
34  const eTabulatedThermo& pt
35 )
36 :
37  EquationOfState(name, pt),
38  Hf_(pt.Hf_),
39  Sf_(pt.Sf_),
40  Es_(pt.Es_),
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 Es_.value(p, T);
88 }
89 
90 
91 template<class EquationOfState>
93 (
94  const scalar p,
95  const scalar T
96 ) const
97 {
98  return Es(p, T) + Hf_;
99 }
100 
101 
102 template<class EquationOfState>
104 (
105  const scalar p,
106  const scalar T
107 ) const
108 {
109  return Es(p, T) + p/EquationOfState::rho(p, T);
110 }
111 
112 
113 template<class EquationOfState>
115 (
116  const scalar p,
117  const scalar T
118 ) const
119 {
120  return Ea(p, T) + p/EquationOfState::rho(p, T);
121 }
122 
123 
124 template<class EquationOfState>
126 const
127 {
128  return Hf_;
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 {
163  return 0;
164 }
165 
166 
167 // ************************************************************************* //
eTabulatedThermo(const dictionary &dict)
Construct from dictionary.
scalar Ea(const scalar p, const scalar T) const
Absolute internal energy [J/kg].
Internal energy based thermodynamics package using uniform tabulated data for internal energy and hea...
scalar Hf() const
Enthalpy of formation [J/kg].
scalar Es(const scalar p, const scalar T) const
Definition: HtoEthermo.H:11
scalar Es(const scalar p, const scalar T) const
Sensible internal energy [J/kg].
scalar limit(const scalar) const
Limit the temperature to be in the range Tlow_ to Thigh_.
scalar Cv(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
A class for handling words, derived from string.
Definition: word.H:59
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
const volScalarField & T
scalar Ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
scalar S(const scalar p, const scalar T) const
Entropy [J/kg/K].
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:370
scalar Ea(const scalar p, const scalar T) const
Definition: HtoEthermo.H:20