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-2024 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  //- Reset the mixture to an unburnt state and update EGR
100  virtual void reset();
101 
102 
103  // Thermodynamic state
104 
105  //- Unburnt gas temperature [K]
106  virtual const volScalarField& Tu() const
107  {
108  return Tu_;
109  }
110 
111  //- Unburnt gas enthalpy [J/kg]
112  virtual const volScalarField& heu() const
113  {
114  return heu_;
115  }
116 
117  //- Unburnt gas enthalpy [J/kg]
118  // Non-const access allowed for transport equations
119  virtual volScalarField& heu()
120  {
121  return heu_;
122  }
123 
124 
125  // Derived thermodynamic properties
126 
127  //- Unburnt gas enthalpy for cell-set [J/kg]
128  virtual tmp<scalarField> heu
129  (
130  const scalarField& T,
131  const labelList& cells
132  ) const;
133 
134  //- Unburnt gas enthalpy for patch [J/kg]
135  virtual tmp<scalarField> heu
136  (
137  const scalarField& T,
138  const label patchi
139  ) const;
140 
141  //- Burnt gas temperature [K]
142  virtual tmp<volScalarField> Tb() const;
143 
144  //- Standard enthalpy of reaction [J/kg]
145  virtual tmp<volScalarField> hr() const;
146 
147  //- Unburnt gas compressibility [s^2/m^2]
148  virtual tmp<volScalarField> psiu() const;
149 
150  //- Burnt gas compressibility [s^2/m^2]
151  virtual tmp<volScalarField> psib() const;
152 
153 
154  // Derived transport properties
155 
156  //- Dynamic viscosity of unburnt gas [kg/m/s]
157  virtual tmp<volScalarField> muu() const;
158 
159  //- Dynamic viscosity of burnt gas [kg/m/s]
160  virtual tmp<volScalarField> mub() const;
161 
162 
163  // Member Operators
164 
165  //- Disallow default bitwise assignment
166  void operator=(const PsiuMulticomponentThermo<BaseThermo>&) = delete;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
175 
176 #ifdef NoRepository
177  #include "PsiuMulticomponentThermo.C"
178 #endif
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
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 > 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:96
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
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(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)