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-2023 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 // ************************************************************************* //
scalar es(const scalar p, const scalar T) const
Definition: HtoEthermo.H:11
scalar ea(const scalar p, const scalar T) const
Definition: HtoEthermo.H:20
Internal energy based thermodynamics package using uniform tabulated data for internal energy and hea...
scalar gStd(const scalar T) const
Gibbs free energy of the mixture in the standard state [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.
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
scalar ea(const scalar p, const scalar T) const
Absolute internal energy [J/kg].
eTabulatedThermo(const word &name, const dictionary &dict)
Construct from name and dictionary.
scalar Cv(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
scalar ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
scalar hf() const
Enthalpy of formation [J/kg].
scalar limit(const scalar) const
Limit the temperature to be in the range Tlow_ to Thigh_.
scalar es(const scalar p, const scalar T) const
Sensible internal energy [J/kg].
scalar hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
A class for handling words, derived from string.
Definition: word.H:62
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:381
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
volScalarField & p