hTabulatedThermoI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2020 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "hTabulatedThermo.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 template<class EquationOfState>
34 (
35  const word& name,
36  const hTabulatedThermo& pt
37 )
38 :
39  EquationOfState(name, pt),
40  Hf_(pt.Hf_),
41  Sf_(pt.Sf_),
42  Cp_(pt.Cp_)
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_.f(p, T) + EquationOfState::Cp(p, T);
66 }
67 
68 
69 template<class EquationOfState>
71 (
72  const scalar p,
73  const scalar T
74 ) const
75 {
76  return Hs(p, T) + Hf_;
77 }
78 
79 
80 template<class EquationOfState>
82 (
83  const scalar p,
84  const scalar T
85 ) const
86 {
87  return Cp_.intfdT(p, T) + EquationOfState::H(p, T);
88 }
89 
90 
91 template<class EquationOfState>
93 const
94 {
95  return Hf_;
96 }
97 
98 
99 template<class EquationOfState>
101 (
102  const scalar p,
103  const scalar T
104 ) const
105 {
106  return Cp_.intfByTdT(p, T) + EquationOfState::Sp(p, T) + Sf_;
107 }
108 
109 
110 template<class EquationOfState>
112 (
113  const scalar T
114 ) const
115 {
116  return Cp_.intfdT(Pstd, T) + Hf_ - (Cp_.intfByTdT(Pstd, T) + Sf_)*T;
117 }
118 
119 
120 template<class EquationOfState>
122 (
123  const scalar p,
124  const scalar T
125 ) const
126 {
127  return Cp_.dfdT(p, T);
128 }
129 
130 
131 // ************************************************************************* //
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::hTabulatedThermo::Hc
scalar Hc() const
Chemical enthalpy [J/kg].
Definition: hTabulatedThermoI.H:92
Foam::hTabulatedThermo::Gstd
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
Definition: hTabulatedThermoI.H:112
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::hTabulatedThermo::limit
scalar limit(const scalar T) const
Limit the temperature to be in the temperature range.
Definition: hTabulatedThermoI.H:50
Hs
scalar Hs(const scalar p, const scalar T) const
Definition: EtoHthermo.H:17
Foam::constant::standard::Pstd
const dimensionedScalar Pstd
Standard pressure.
Definition: thermodynamicConstants.C:48
Foam::hTabulatedThermo::Hs
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
Definition: hTabulatedThermoI.H:82
Foam::hTabulatedThermo
Enthalpy based thermodynamics package using non-uniform tabulated data for heat capacity vs temperatu...
Definition: hTabulatedThermo.H:90
H
volScalarField H(IOobject("H", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
Sp
zeroField Sp
Definition: alphaSuSp.H:2
Foam::hTabulatedThermo::hTabulatedThermo
hTabulatedThermo(const dictionary &dict)
Construct from dictionary.
Definition: hTabulatedThermo.C:36
Foam::hTabulatedThermo::Ha
scalar Ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
Definition: hTabulatedThermoI.H:71
hTabulatedThermo.H
T
const volScalarField & T
Definition: createFieldRefs.H:2
Foam::hTabulatedThermo::Cp
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
Definition: hTabulatedThermoI.H:60
Foam::hTabulatedThermo::dCpdT
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
Definition: hTabulatedThermoI.H:122
Cp
const volScalarField & Cp
Definition: EEqn.H:7
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::hTabulatedThermo::S
scalar S(const scalar p, const scalar T) const
Entropy [J/kg/K].
Definition: hTabulatedThermoI.H:101