psiuMulticomponentThermo.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-2022 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::psiuMulticomponentThermo
26 
27 Description
28  Base-class for combustion fluid thermodynamic properties based on
29  compressibility.
30 
31 See also
32  Foam::basicThermo
33 
34 SourceFiles
35  psiuMulticomponentThermo.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef psiuMulticomponentThermo_H
40 #define psiuMulticomponentThermo_H
41 
42 #include "psiThermo.H"
43 #include "basicCombustionMixture.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class psiuMulticomponentThermo Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  virtual public psiThermo
57 {
58 protected:
59 
60  // Protected Member Functions
61 
62  //- Return the unburnt enthalpy/internal energy field boundary types
63  // by interrogating the temperature field boundary types
65 
66  //- ...
68 
69 
70 public:
71 
72  // Public Classes
73 
74  //- Forward declare the implementation class
75  class implementation;
76 
77  //- Forward declare the composite class
78  class composite;
79 
80 
81  //- Runtime type information
82  TypeName("psiuMulticomponentThermo");
83 
84 
85  // Declare run-time constructor selection tables
86 
88  (
89  autoPtr,
91  fvMesh,
92  (const fvMesh& mesh, const word& phaseName),
93  (mesh, phaseName)
94  );
95 
96 
97  // Selectors
98 
99  //- Standard selection based on fvMesh
101  (
102  const fvMesh&,
103  const word& phaseName=word::null
104  );
105 
106 
107  //- Destructor
108  virtual ~psiuMulticomponentThermo();
109 
110 
111  // Member Functions
112 
113  //- Update properties
114  virtual void correct() = 0;
115 
116  //- Return the composition of the combustion mixture
117  virtual basicCombustionMixture& composition() = 0;
118 
119  //- Return the composition of the combustion mixture
120  virtual const basicCombustionMixture& composition() const = 0;
121 
122 
123  // Access to thermodynamic state variables.
124 
125  //- Unburnt gas enthalpy [J/kg]
126  // Non-const access allowed for transport equations
127  virtual volScalarField& heu() = 0;
128 
129  //- Unburnt gas enthalpy [J/kg]
130  virtual const volScalarField& heu() const = 0;
131 
132 
133  // Fields derived from thermodynamic state variables
134 
135  //- Unburnt gas enthalpy for cell-set [J/kg]
136  virtual tmp<scalarField> heu
137  (
138  const scalarField& T,
139  const labelList& cells
140  ) const = 0;
141 
142  //- Unburnt gas enthalpy for patch [J/kg]
143  virtual tmp<scalarField> heu
144  (
145  const scalarField& T,
146  const label patchi
147  ) const = 0;
148 
149  //- Unburnt gas temperature [K]
150  virtual const volScalarField& Tu() const = 0;
151 
152  //- Burnt gas temperature [K]
153  virtual tmp<volScalarField> Tb() const = 0;
154 
155  //- Unburnt gas density [kg/m^3]
156  virtual tmp<volScalarField> rhou() const
157  {
158  return p()*psiu();
159  }
160 
161  //- Burnt gas density [kg/m^3]
162  virtual tmp<volScalarField> rhob() const
163  {
164  return p()*psib();
165  }
166 
167  //- Unburnt gas compressibility [s^2/m^2]
168  virtual tmp<volScalarField> psiu() const = 0;
169 
170  //- Burnt gas compressibility [s^2/m^2]
171  virtual tmp<volScalarField> psib() const = 0;
172 
173  //- Dynamic viscosity of unburnt gas [kg/m/s]
174  virtual tmp<volScalarField> muu() const = 0;
175 
176  //- Dynamic viscosity of burnt gas [kg/m/s]
177  virtual tmp<volScalarField> mub() const = 0;
178 };
179 
180 
181 /*---------------------------------------------------------------------------*\
182  Class psiuMulticomponentThermo::implementation Declaration
183 \*---------------------------------------------------------------------------*/
184 
186 :
187  virtual public psiuMulticomponentThermo
188 {
189 public:
190 
191  // Constructors
192 
193  //- Construct from mesh and phase name
194  implementation(const fvMesh&, const word& phaseName);
195 
196 
197  //- Destructor
198  virtual ~implementation();
199 };
200 
201 
202 /*---------------------------------------------------------------------------*\
203  Class psiuMulticomponentThermo::composite Declaration
204 \*---------------------------------------------------------------------------*/
205 
207 :
212 {
213 public:
214 
215  // Constructors
216 
217  //- Construct from mesh and phase name
218  composite
219  (
220  const fvMesh& mesh,
221  const word& phaseName
222  )
223  :
228  {}
229 };
230 
231 
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 
234 } // End namespace Foam
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 #endif
239 
240 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Specialisation of the basicMixture for combustion.
virtual const fvMesh & mesh() const
Return const access to the mesh.
Definition: basicThermo.H:484
virtual const word & phaseName() const
Phase name.
Definition: basicThermo.H:490
Base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:78
virtual const fvMesh & mesh() const =0
Return const access to the mesh.
virtual const volScalarField & T() const =0
Temperature [K].
virtual const word & phaseName() const =0
Phase name.
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:57
virtual volScalarField & p()=0
Pressure [Pa].
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Base-class for fluid thermodynamic properties based on compressibility.
Definition: psiThermo.H:54
composite(const fvMesh &mesh, const word &phaseName)
Construct from mesh and phase name.
implementation(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Base-class for combustion fluid thermodynamic properties based on compressibility.
void heuBoundaryCorrection(volScalarField &heu)
...
wordList heuBoundaryTypes()
Return the unburnt enthalpy/internal energy field boundary types.
virtual volScalarField & heu()=0
Unburnt gas enthalpy [J/kg].
virtual ~psiuMulticomponentThermo()
Destructor.
virtual tmp< volScalarField > rhob() const
Burnt gas density [kg/m^3].
virtual tmp< volScalarField > muu() const =0
Dynamic viscosity of unburnt gas [kg/m/s].
virtual tmp< volScalarField > psib() const =0
Burnt gas compressibility [s^2/m^2].
virtual const volScalarField & Tu() const =0
Unburnt gas temperature [K].
virtual tmp< volScalarField > psiu() const =0
Unburnt gas compressibility [s^2/m^2].
virtual void correct()=0
Update properties.
virtual tmp< volScalarField > rhou() const
Unburnt gas density [kg/m^3].
virtual tmp< volScalarField > Tb() const =0
Burnt gas temperature [K].
TypeName("psiuMulticomponentThermo")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, psiuMulticomponentThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
virtual tmp< volScalarField > mub() const =0
Dynamic viscosity of burnt gas [kg/m/s].
static autoPtr< psiuMulticomponentThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
virtual basicCombustionMixture & composition()=0
Return the composition of the combustion mixture.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
static const word null
An empty word.
Definition: word.H:77
label patchi
const cellShapeList & cells
Namespace for OpenFOAM.
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