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-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 "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 hs(const scalar p, const scalar T) const
Definition: EtoHthermo.H:11
scalar Cp(const scalar p, const scalar T) const
Definition: EtoHthermo.H:2
Enthalpy based thermodynamics package using non-uniform tabulated data for heat capacity vs temperatu...
scalar gStd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
hIcoTabulatedThermo(const word &name, const dictionary &dict)
Construct from name and dictionary.
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 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 hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
A class for handling words, derived from string.
Definition: word.H:62
const dimensionedScalar h
Planck constant.
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