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-------------------------------------------------------------------------------
10License
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
32template<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
48template<class EquationOfState>
50(
51 const scalar T
52) const
53{
54 return T;
55}
56
57
58template<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
69template<class EquationOfState>
71(
72 const scalar p,
73 const scalar T
74) const
75{
76 return Hs(p, T) + Hf_;
77}
78
79
80template<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
91template<class EquationOfState>
93const
94{
95 return Hf_;
96}
97
98
99template<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
110template<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
120template<class EquationOfState>
122(
123 const scalar p,
124 const scalar T
125) const
126{
127 return Cp_.dfdT(p, T);
128}
129
130
131// ************************************************************************* //
scalar Hs(const scalar p, const scalar T) const
Definition: EtoHthermo.H:17
compactSpatialTensor S
The joint motion sub-space (3-DoF)
Definition: joint.H:132
friend complex limit(const complex &c1, const complex &c2)
Definition: complexI.H:263
Enthalpy based thermodynamics package using non-uniform tabulated data for heat capacity vs temperatu...
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 Hc() const
Chemical enthalpy [J/kg].
scalar Ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
const volScalarField & T
const volScalarField & Cp
Definition: EEqn.H:7
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59