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-2025 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  Thermo implementation based on compressibility with additional unburnt
29  thermodynamic state
30 
31 SourceFiles
32  PsiuMulticomponentThermo.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef PsiuMulticomponentThermo_H
37 #define PsiuMulticomponentThermo_H
38 
39 #include "BasicThermo.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class PsiuMulticomponentThermo Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class BaseThermo>
52 :
53  public BaseThermo
54 {
55  // Private Data
56 
57  //- Unburnt temperature
58  volScalarField Tu_;
59 
60  //- Unburnt energy
61  volScalarField heu_;
62 
63 
64  // Private Member Functions
65 
66  //- Calculate the thermo variables
67  void calculate();
68 
69 
70 public:
71 
72  // Constructors
73 
74  //- Construct from mesh and phase name
75  PsiuMulticomponentThermo(const fvMesh&, const word& phaseName);
76 
77  //- Disallow default bitwise copy construction
79  (
81  ) = delete;
82 
83 
84  //- Destructor
85  virtual ~PsiuMulticomponentThermo();
86 
87 
88  // Member Functions
89 
90  //- Update properties
91  virtual void correct();
92 
93 
94  // Mass fractions
95 
96  //- Return the residual fraction of fuel in the burnt mixture
97  virtual tmp<volScalarField> fres() const;
98 
99  //- Return the fuel-oxidant equivalence ratio
100  virtual tmp<volScalarField> Phi() const;
101 
102  //- Reset the mixture to an unburnt state and update EGR
103  virtual void reset();
104 
105 
106  // Thermodynamic state
107 
108  //- Unburnt gas temperature [K]
109  virtual const volScalarField& Tu() const
110  {
111  return Tu_;
112  }
113 
114  //- Unburnt gas enthalpy [J/kg]
115  virtual const volScalarField& heu() const
116  {
117  return heu_;
118  }
119 
120  //- Unburnt gas enthalpy [J/kg]
121  // Non-const access allowed for transport equations
122  virtual volScalarField& heu()
123  {
124  return heu_;
125  }
126 
127 
128  // Derived thermodynamic properties
129 
130  //- Unburnt gas enthalpy for cell-set [J/kg]
131  virtual tmp<scalarField> heu
132  (
133  const scalarField& T,
134  const labelList& cells
135  ) const;
136 
137  //- Unburnt gas enthalpy for patch [J/kg]
138  virtual tmp<scalarField> heu
139  (
140  const scalarField& T,
141  const label patchi
142  ) const;
143 
144  //- Burnt gas temperature [K]
145  virtual tmp<volScalarField> Tb() const;
146 
147  //- Standard enthalpy of reaction [J/kg]
148  virtual tmp<volScalarField> hr() const;
149 
150  //- Unburnt gas compressibility [s^2/m^2]
151  virtual tmp<volScalarField> psiu() const;
152 
153  //- Burnt gas compressibility [s^2/m^2]
154  virtual tmp<volScalarField> psib() const;
155 
156 
157  // Derived transport properties
158 
159  //- Dynamic viscosity of unburnt gas [kg/m/s]
160  virtual tmp<volScalarField> muu() const;
161 
162  //- Dynamic viscosity of burnt gas [kg/m/s]
163  virtual tmp<volScalarField> mub() const;
164 
165 
166  // Member Operators
167 
168  //- Disallow default bitwise assignment
169  void operator=(const PsiuMulticomponentThermo<BaseThermo>&) = delete;
170 };
171 
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
178 
179 #ifdef NoRepository
180  #include "PsiuMulticomponentThermo.C"
181 #endif
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
Generic GeometricField class.
Thermo implementation based on compressibility with additional unburnt thermodynamic state.
virtual tmp< volScalarField > mub() const
Dynamic viscosity of burnt gas [kg/m/s].
PsiuMulticomponentThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
virtual void correct()
Update properties.
virtual const volScalarField & Tu() const
Unburnt gas temperature [K].
virtual tmp< volScalarField > muu() const
Dynamic viscosity of unburnt gas [kg/m/s].
virtual tmp< volScalarField > Phi() const
Return the fuel-oxidant equivalence ratio.
virtual tmp< volScalarField > hr() const
Standard enthalpy of reaction [J/kg].
virtual const volScalarField & heu() const
Unburnt gas enthalpy [J/kg].
virtual tmp< volScalarField > Tb() const
Burnt gas temperature [K].
virtual tmp< volScalarField > psib() const
Burnt gas compressibility [s^2/m^2].
virtual tmp< volScalarField > psiu() const
Unburnt gas compressibility [s^2/m^2].
virtual void reset()
Reset the mixture to an unburnt state and update EGR.
void operator=(const PsiuMulticomponentThermo< BaseThermo > &)=delete
Disallow default bitwise assignment.
virtual ~PsiuMulticomponentThermo()
Destructor.
virtual tmp< volScalarField > fres() const
Return the residual fraction of fuel in the burnt mixture.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
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
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)