All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2020 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 "psiThermo.H"
40 #include "basicCombustionMixture.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class psiuReactionThermo Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public psiThermo
54 {
55 
56 protected:
57 
58  // Protected Member Functions
59 
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("psiuReactionThermo");
68 
69 
70  // Declare run-time constructor selection tables
71 
73  (
74  autoPtr,
76  fvMesh,
77  (const fvMesh& mesh, const word& phaseName),
78  (mesh, phaseName)
79  );
80 
81 
82  // Constructors
83 
84  //- Construct from mesh and phase name
86  (
87  const fvMesh&,
88  const word& phaseName
89  );
90 
91 
92  // Selectors
93 
95  (
96  const fvMesh&,
97  const word& phaseName=word::null
98  );
99 
100 
101  //- Destructor
102  virtual ~psiuReactionThermo();
103 
104 
105  // Member Functions
106 
107  //- Update properties
108  virtual void correct() = 0;
109 
110  //- Return the composition of the combustion mixture
111  virtual basicCombustionMixture& composition() = 0;
112 
113  //- Return the composition of the combustion mixture
114  virtual const basicCombustionMixture& composition() const = 0;
115 
116 
117  // Access to thermodynamic state variables.
118 
119  //- Unburnt gas enthalpy [J/kg]
120  // Non-const access allowed for transport equations
121  virtual volScalarField& heu() = 0;
122 
123  //- Unburnt gas enthalpy [J/kg]
124  virtual const volScalarField& heu() const = 0;
125 
126 
127  // Fields derived from thermodynamic state variables
128 
129  //- Unburnt gas enthalpy for cell-set [J/kg]
130  virtual tmp<scalarField> heu
131  (
132  const scalarField& T,
133  const labelList& cells
134  ) const = 0;
135 
136  //- Unburnt gas enthalpy for patch [J/kg]
137  virtual tmp<scalarField> heu
138  (
139  const scalarField& T,
140  const label patchi
141  ) const = 0;
142 
143  //- Unburnt gas temperature [K]
144  virtual const volScalarField& Tu() const = 0;
145 
146  //- Burnt gas temperature [K]
147  virtual tmp<volScalarField> Tb() const = 0;
148 
149  //- Unburnt gas density [kg/m^3]
150  virtual tmp<volScalarField> rhou() const
151  {
152  return p_*psiu();
153  }
154 
155  //- Burnt gas density [kg/m^3]
156  virtual tmp<volScalarField> rhob() const
157  {
158  return p_*psib();
159  }
160 
161  //- Unburnt gas compressibility [s^2/m^2]
162  virtual tmp<volScalarField> psiu() const = 0;
163 
164  //- Burnt gas compressibility [s^2/m^2]
165  virtual tmp<volScalarField> psib() const = 0;
166 
167  //- Dynamic viscosity of unburnt gas [kg/m/s]
168  virtual tmp<volScalarField> muu() const = 0;
169 
170  //- Dynamic viscosity of burnt gas [kg/m/s]
171  virtual tmp<volScalarField> mub() const = 0;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
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/m/s].
virtual basicCombustionMixture & composition()=0
Return the composition of the combustion mixture.
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:482
psiuReactionThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
dynamicFvMesh & mesh
const cellShapeList & cells
volScalarField & p_
Pressure [Pa].
Definition: fluidThermo.H:58
virtual tmp< volScalarField > mub() const =0
Dynamic viscosity of burnt gas [kg/m/s].
A class for handling words, derived from string.
Definition: word.H:59
Specialization of the basicMixture for combustion.
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.
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)
Basic thermodynamic properties based on compressibility.
Definition: psiThermo.H:49
virtual tmp< volScalarField > rhob() const
Burnt gas density [kg/m^3].
Namespace for OpenFOAM.