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 -------------------------------------------------------------------------------
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 Class
28  Foam::psiuReactionThermo
29 
30 Group
31  grpPsiThermo
32 
33 Description
34  Foam::psiuReactionThermo
35 
36 SourceFiles
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 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class psiuReactionThermo Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public psiReactionThermo
59 {
60 
61 protected:
62 
63  // Protected Member Functions
64 
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("psiuReactionThermo");
73 
74 
75  // Declare run-time constructor selection tables
76 
78  (
79  autoPtr,
81  fvMesh,
82  (const fvMesh& mesh, const word& phaseName),
83  (mesh, phaseName)
84  );
85 
86 
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::basicThermo::p
virtual volScalarField & p()
Pressure [Pa].
Definition: basicThermo.C:602
Foam::psiuReactionThermo::rhou
virtual tmp< volScalarField > rhou() const
Unburnt gas density [kg/m^3].
Definition: psiuReactionThermo.H:177
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::psiuReactionThermo
Foam::psiuReactionThermo.
Definition: psiuReactionThermo.H:55
Foam::psiuReactionThermo::correct
virtual void correct()=0
Update properties.
Foam::psiuReactionThermo::Tb
virtual tmp< volScalarField > Tb() const =0
Burnt gas temperature [K].
Foam::psiuReactionThermo::Tu
virtual const volScalarField & Tu() const =0
Unburnt gas temperature [K].
Foam::psiReactionThermo
Foam::psiReactionThermo.
Definition: psiReactionThermo.H:60
Foam::Field< scalar >
Foam::psiuReactionThermo::mub
virtual tmp< volScalarField > mub() const =0
Dynamic viscosity of burnt gas [kg/ms].
Foam::psiuReactionThermo::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, psiuReactionThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Foam::psiuReactionThermo::~psiuReactionThermo
virtual ~psiuReactionThermo()
Destructor.
Definition: psiuReactionThermo.C:153
Foam::psiuReactionThermo::muu
virtual tmp< volScalarField > muu() const =0
Dynamic viscosity of unburnt gas [kg/ms].
Foam::psiuReactionThermo::heuBoundaryCorrection
void heuBoundaryCorrection(volScalarField &heu)
Definition: psiuReactionThermo.C:79
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::psiuReactionThermo::heu
virtual volScalarField & heu()=0
Unburnt gas enthalpy [J/kg].
Foam::psiuReactionThermo::psiuReactionThermo
psiuReactionThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: psiuReactionThermo.C:108
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::psiuReactionThermo::TypeName
TypeName("psiuReactionThermo")
Runtime type information.
psiReactionThermo.H
Foam::basicThermo::p_
volScalarField & p_
Pressure [Pa].
Definition: basicThermo.H:136
Foam::basicThermo::T
virtual const volScalarField & T() const
Temperature [K].
Definition: basicThermo.C:614
Foam::psiuReactionThermo::psiu
virtual tmp< volScalarField > psiu() const =0
Unburnt gas compressibility [s^2/m^2].
Foam::List< word >
Foam::word::null
static const word null
An empty word.
Definition: word.H:80
cells
const cellShapeList & cells
Definition: gmvOutputHeader.H:3
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::psiuReactionThermo::New
static autoPtr< psiuReactionThermo > New(const fvMesh &, const word &phaseName=word::null)
Definition: psiuReactionThermo.C:131
Foam::psiuReactionThermo::heuBoundaryTypes
wordList heuBoundaryTypes()
Definition: psiuReactionThermo.C:49
Foam::psiuReactionThermo::psib
virtual tmp< volScalarField > psib() const =0
Burnt gas compressibility [s^2/m^2].
Foam::psiuReactionThermo::rhob
virtual tmp< volScalarField > rhob() const
Burnt gas density [kg/m^3].
Definition: psiuReactionThermo.H:183
Foam::dictionary::dictName
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionaryI.H:60