psiuReactionThermo.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::psiuReactionThermo
26 
27 Description
28  Foam::psiuReactionThermo
29 
30 SourceFiles
31  psiuReactionThermo.C
32  psiuReactionThermoNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef psiuReactionThermo_H
37 #define psiuReactionThermo_H
38 
39 #include "psiReactionThermo.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class psiuReactionThermo Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public psiReactionThermo
53 {
54 
55 protected:
56 
57  // Protected Member Functions
58 
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("psiuReactionThermo");
67 
68 
69  // Declare run-time constructor selection tables
70 
72  (
73  autoPtr,
75  fvMesh,
76  (const fvMesh& mesh, const word& phaseName),
77  (mesh, phaseName)
78  );
79 
80 
81  // Constructors
82 
83  //- Construct from mesh and phase name
85  (
86  const fvMesh&,
87  const word& phaseName
88  );
89 
90 
91  // Selectors
92 
94  (
95  const fvMesh&,
96  const word& phaseName=word::null
97  );
98 
99 
100  //- Destructor
101  virtual ~psiuReactionThermo();
102 
103 
104  // Member functions
105 
106  //- Update properties
107  virtual void correct() = 0;
108 
109 
110  // Access to thermodynamic state variables.
111 
112  //- Unburnt gas enthalpy [J/kg]
113  // Non-const access allowed for transport equations
114  virtual volScalarField& heu() = 0;
115 
116  //- Unburnt gas enthalpy [J/kg]
117  virtual const volScalarField& heu() const = 0;
118 
119 
120  // Fields derived from thermodynamic state variables
121 
122  //- Unburnt gas enthalpy for cell-set [J/kg]
123  virtual tmp<scalarField> heu
124  (
125  const scalarField& p,
126  const scalarField& T,
127  const labelList& cells
128  ) const = 0;
129 
130  //- Unburnt gas enthalpy for patch [J/kg]
131  virtual tmp<scalarField> heu
132  (
133  const scalarField& p,
134  const scalarField& T,
135  const label patchi
136  ) const = 0;
137 
138  //- Unburnt gas temperature [K]
139  virtual const volScalarField& Tu() const = 0;
140 
141  //- Burnt gas temperature [K]
142  virtual tmp<volScalarField> Tb() const = 0;
143 
144  //- Unburnt gas density [kg/m^3]
145  virtual tmp<volScalarField> rhou() const
146  {
147  return p_*psiu();
148  }
149 
150  //- Burnt gas density [kg/m^3]
151  virtual tmp<volScalarField> rhob() const
152  {
153  return p_*psib();
154  }
155 
156  //- Unburnt gas compressibility [s^2/m^2]
157  virtual tmp<volScalarField> psiu() const = 0;
158 
159  //- Burnt gas compressibility [s^2/m^2]
160  virtual tmp<volScalarField> psib() const = 0;
161 
162  //- Dynamic viscosity of unburnt gas [kg/ms]
163  virtual tmp<volScalarField> muu() const = 0;
164 
165  //- Dynamic viscosity of burnt gas [kg/ms]
166  virtual tmp<volScalarField> mub() const = 0;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #endif
177 
178 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
virtual tmp< volScalarField > muu() const =0
Dynamic viscosity of unburnt gas [kg/ms].
virtual tmp< volScalarField > rhou() const
Unburnt gas density [kg/m^3].
virtual ~psiuReactionThermo()
Destructor.
virtual const volScalarField & Tu() const =0
Unburnt gas temperature [K].
virtual const volScalarField & T() const
Temperature [K].
Definition: basicThermo.C:499
virtual volScalarField & p()
Pressure [Pa].
Definition: basicThermo.C:487
psiuReactionThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
dynamicFvMesh & mesh
const cellShapeList & cells
volScalarField & p_
Pressure [Pa].
Definition: basicThermo.H:68
virtual tmp< volScalarField > mub() const =0
Dynamic viscosity of burnt gas [kg/ms].
A class for handling words, derived from string.
Definition: word.H:59
virtual void correct()=0
Update properties.
static const word null
An empty word.
Definition: word.H:77
virtual tmp< volScalarField > psiu() const =0
Unburnt gas compressibility [s^2/m^2].
virtual tmp< volScalarField > Tb() const =0
Burnt gas temperature [K].
Foam::psiuReactionThermo.
Foam::psiReactionThermo.
virtual volScalarField & heu()=0
Unburnt gas enthalpy [J/kg].
label patchi
void heuBoundaryCorrection(volScalarField &heu)
virtual tmp< volScalarField > psib() const =0
Burnt gas compressibility [s^2/m^2].
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
declareRunTimeSelectionTable(autoPtr, psiuReactionThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
TypeName("psiuReactionThermo")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:53
static autoPtr< psiuReactionThermo > New(const fvMesh &, const word &phaseName=word::null)
virtual tmp< volScalarField > rhob() const
Burnt gas density [kg/m^3].
Namespace for OpenFOAM.