icoTabulatedI.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  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "icoTabulated.H"
30 
31 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
32 
33 template<class Specie>
35 (
36  const Specie& sp,
37  const nonUniformTable& rho
38 )
39 :
40  Specie(sp),
41  rho_(rho)
42 {}
43 
44 
45 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 
47 template<class Specie>
49 (
50  const word& name,
51  const icoTabulated<Specie>& ip
52 )
53 :
54  Specie(name, ip),
55  rho_(ip.rho_)
56 {}
57 
58 
59 template<class Specie>
62 {
63  return autoPtr<icoTabulated<Specie>>::New(*this);
64 }
65 
66 
67 template<class Specie>
70 {
72 }
73 
74 
75 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
76 
77 template<class Specie>
78 inline Foam::scalar Foam::icoTabulated<Specie>::rho
79 (
80  scalar p,
81  scalar T
82 ) const
83 {
84  return rho_.f(p, T);
85 }
86 
87 
88 template<class Specie>
89 inline Foam::scalar Foam::icoTabulated<Specie>::H
90 (
91  scalar p,
92  scalar T
93 ) const
94 {
95  return p/this->rho(p, T);
96 }
97 
98 
99 template<class Specie>
100 inline Foam::scalar Foam::icoTabulated<Specie>::Cp
101 (
102  scalar p,
103  scalar T
104 ) const
105 {
106  return 0;
107 }
108 
109 
110 template<class Specie>
111 inline Foam::scalar Foam::icoTabulated<Specie>::E
112 (
113  scalar p,
114  scalar T
115 ) const
116 {
117  return 0;
118 }
119 
120 
121 template<class Specie>
122 inline Foam::scalar Foam::icoTabulated<Specie>::Cv
123 (
124  scalar p,
125  scalar T
126 ) const
127 {
128  return 0;
129 }
130 
131 
132 template<class Specie>
133 inline Foam::scalar Foam::icoTabulated<Specie>::S
134 (
135  scalar p,
136  scalar T
137 ) const
138 {
139  return 0;
140 }
141 
142 
143 template<class Specie>
144 inline Foam::scalar Foam::icoTabulated<Specie>::psi
145 (
146  scalar p,
147  scalar T
148 ) const
149 {
150  return 0;
151 }
152 
153 
154 template<class Specie>
155 inline Foam::scalar Foam::icoTabulated<Specie>::Z
156 (
157  scalar p,
158  scalar T
159 ) const
160 {
161  return 0;
162 }
163 
164 
165 template<class Specie>
166 inline Foam::scalar Foam::icoTabulated<Specie>::CpMCv
167 (
168  scalar p,
169  scalar T
170 ) const
171 {
172  return 0;
173 }
174 
175 
176 // ************************************************************************* //
Foam::icoTabulated::CpMCv
scalar CpMCv(scalar p, scalar T) const
Return (Cp - Cv) [J/(kg K].
Definition: icoTabulatedI.H:167
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::icoTabulated::rho
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
Definition: icoTabulatedI.H:79
Foam::icoTabulated::Z
scalar Z(scalar p, scalar T) const
Return compression factor [].
Definition: icoTabulatedI.H:156
Foam::icoTabulated::icoTabulated
icoTabulated(const Specie &sp, const nonUniformTable &rho)
Construct from components.
Definition: icoTabulatedI.H:35
Foam::icoTabulated::clone
autoPtr< icoTabulated > clone() const
Construct and return a clone.
Definition: icoTabulatedI.H:61
rho
rho
Definition: readInitialConditions.H:88
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::icoTabulated::New
static autoPtr< icoTabulated > New(const dictionary &dict)
Selector from dictionary.
Definition: icoTabulatedI.H:69
Foam::icoTabulated::H
scalar H(const scalar p, const scalar T) const
Return enthalpy departure [J/kg].
Definition: icoTabulatedI.H:90
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::icoTabulated
Incompressible of equation of state using non-uniform tabulated density vs temperature.
Definition: icoTabulated.H:78
icoTabulated.H
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::icoTabulated::Cp
scalar Cp(scalar p, scalar T) const
Return Cp departure [J/(kg K].
Definition: icoTabulatedI.H:101
Foam::icoTabulated::E
scalar E(const scalar p, const scalar T) const
Return internal energy departure [J/kg].
Definition: icoTabulatedI.H:112
Foam::icoTabulated::psi
scalar psi(scalar p, scalar T) const
Return compressibility [s^2/m^2].
Definition: icoTabulatedI.H:145
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::icoTabulated::Cv
scalar Cv(scalar p, scalar T) const
Return Cv departure [J/(kg K].
Definition: icoTabulatedI.H:123
Foam::icoTabulated::S
scalar S(const scalar p, const scalar T) const
Return entropy departure to the integral of Cp/T [J/kg/K].
Definition: icoTabulatedI.H:134