psiuReactionThermo.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) 2011-2012 OpenFOAM Foundation
9 Copyright (C) 2017 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::psiuReactionThermo
29
30Group
31 grpPsiThermo
32
33Description
34 Foam::psiuReactionThermo
35
36SourceFiles
37 psiuReactionThermo.C
38 psiuReactionThermoNew.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef psiuReactionThermo_H
43#define psiuReactionThermo_H
44
45#include "psiReactionThermo.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class psiuReactionThermo Declaration
54\*---------------------------------------------------------------------------*/
57:
59{
60
61protected:
62
63 // Protected Member Functions
64
67
68
69public:
70
71 //- Runtime type information
72 TypeName("psiuReactionThermo");
73
74
75 // Declare run-time constructor selection tables
78 (
79 autoPtr,
81 fvMesh,
82 (const fvMesh& mesh, const word& phaseName),
83 (mesh, phaseName)
84 );
85
88 (
89 autoPtr,
91 fvMeshDictPhase,
92 (const fvMesh& mesh, const word& phaseName, const word& dictName),
93 (mesh, phaseName, dictName)
94 );
95
96
97 // Constructors
98
99 //- Construct from mesh and phase name
101 (
102 const fvMesh&,
103 const word& phaseName
104 );
105
106
107 //- Construct from mesh,dictionary,phase name with a single temperature
109 (
110 const fvMesh&,
111 const word& phaseName,
112 const word& dictName
113 );
114
115
116 // Selectors
117
119 (
120 const fvMesh&,
121 const word& phaseName=word::null
122 );
123
124
126 (
127 const fvMesh&,
128 const word& phaseName,
129 const word& dictName
130 );
131
132
133 //- Destructor
134 virtual ~psiuReactionThermo();
135
136
137 // Member functions
138
139 //- Update properties
140 virtual void correct() = 0;
141
142
143 // Access to thermodynamic state variables.
144
145 //- Unburnt gas enthalpy [J/kg]
146 // Non-const access allowed for transport equations
147 virtual volScalarField& heu() = 0;
148
149 //- Unburnt gas enthalpy [J/kg]
150 virtual const volScalarField& heu() const = 0;
151
152
153 // Fields derived from thermodynamic state variables
154
155 //- Unburnt gas enthalpy for cell-set [J/kg]
156 virtual tmp<scalarField> heu
157 (
158 const scalarField& p,
159 const scalarField& T,
160 const labelList& cells
161 ) const = 0;
162
163 //- Unburnt gas enthalpy for patch [J/kg]
164 virtual tmp<scalarField> heu
165 (
166 const scalarField& p,
167 const scalarField& T,
168 const label patchi
169 ) const = 0;
170
171 //- Unburnt gas temperature [K]
172 virtual const volScalarField& Tu() const = 0;
173
174 //- Burnt gas temperature [K]
175 virtual tmp<volScalarField> Tb() const = 0;
176
177 //- Unburnt gas density [kg/m^3]
178 virtual tmp<volScalarField> rhou() const
179 {
180 return p_*psiu();
181 }
182
183 //- Burnt gas density [kg/m^3]
184 virtual tmp<volScalarField> rhob() const
185 {
186 return p_*psib();
187 }
188
189 //- Unburnt gas compressibility [s^2/m^2]
190 virtual tmp<volScalarField> psiu() const = 0;
191
192 //- Burnt gas compressibility [s^2/m^2]
193 virtual tmp<volScalarField> psib() const = 0;
194
195 //- Dynamic viscosity of unburnt gas [kg/ms]
196 virtual tmp<volScalarField> muu() const = 0;
197
198 //- Dynamic viscosity of burnt gas [kg/ms]
199 virtual tmp<volScalarField> mub() const = 0;
200};
201
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205} // End namespace Foam
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209#endif
210
211// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
static const word dictName
Definition: basicThermo.H:256
volScalarField & p_
Pressure [Pa].
Definition: basicThermo.H:136
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Foam::psiReactionThermo.
Foam::psiuReactionThermo.
virtual tmp< scalarField > heu(const scalarField &p, const scalarField &T, const label patchi) const =0
Unburnt gas enthalpy for patch [J/kg].
void heuBoundaryCorrection(volScalarField &heu)
declareRunTimeSelectionTable(autoPtr, psiuReactionThermo, fvMeshDictPhase,(const fvMesh &mesh, const word &phaseName, const word &dictName),(mesh, phaseName, dictName))
declareRunTimeSelectionTable(autoPtr, psiuReactionThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
virtual ~psiuReactionThermo()
Destructor.
virtual tmp< volScalarField > psib() const =0
Burnt gas compressibility [s^2/m^2].
virtual tmp< volScalarField > psiu() const =0
Unburnt gas compressibility [s^2/m^2].
virtual tmp< volScalarField > rhob() const
Burnt gas density [kg/m^3].
static autoPtr< psiuReactionThermo > New(const fvMesh &, const word &phaseName=word::null)
virtual void correct()=0
Update properties.
virtual tmp< volScalarField > mub() const =0
Dynamic viscosity of burnt gas [kg/ms].
virtual tmp< volScalarField > muu() const =0
Dynamic viscosity of unburnt gas [kg/ms].
virtual tmp< scalarField > heu(const scalarField &p, const scalarField &T, const labelList &cells) const =0
Unburnt gas enthalpy for cell-set [J/kg].
virtual const volScalarField & heu() const =0
Unburnt gas enthalpy [J/kg].
TypeName("psiuReactionThermo")
Runtime type information.
virtual tmp< volScalarField > Tb() const =0
Burnt gas temperature [K].
virtual volScalarField & heu()=0
Unburnt gas enthalpy [J/kg].
virtual tmp< volScalarField > rhou() const
Unburnt gas density [kg/m^3].
virtual const volScalarField & Tu() const =0
Unburnt gas temperature [K].
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
const volScalarField & T
dynamicFvMesh & mesh
const cellShapeList & cells
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73