All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2023 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  // Thermodynamic state
95 
96  //- Unburnt gas temperature [K]
97  virtual const volScalarField& Tu() const
98  {
99  return Tu_;
100  }
101 
102  //- Unburnt gas enthalpy [J/kg]
103  virtual const volScalarField& heu() const
104  {
105  return heu_;
106  }
107 
108  //- Unburnt gas enthalpy [J/kg]
109  // Non-const access allowed for transport equations
110  virtual volScalarField& heu()
111  {
112  return heu_;
113  }
114 
115 
116  // Derived thermodynamic properties
117 
118  //- Unburnt gas enthalpy for cell-set [J/kg]
119  virtual tmp<scalarField> heu
120  (
121  const scalarField& T,
122  const labelList& cells
123  ) const;
124 
125  //- Unburnt gas enthalpy for patch [J/kg]
126  virtual tmp<scalarField> heu
127  (
128  const scalarField& T,
129  const label patchi
130  ) const;
131 
132  //- Burnt gas temperature [K]
133  virtual tmp<volScalarField> Tb() const;
134 
135  //- Unburnt gas compressibility [s^2/m^2]
136  virtual tmp<volScalarField> psiu() const;
137 
138  //- Burnt gas compressibility [s^2/m^2]
139  virtual tmp<volScalarField> psib() const;
140 
141 
142  // Derived transport properties
143 
144  //- Dynamic viscosity of unburnt gas [kg/m/s]
145  virtual tmp<volScalarField> muu() const;
146 
147  //- Dynamic viscosity of burnt gas [kg/m/s]
148  virtual tmp<volScalarField> mub() const;
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const PsiuMulticomponentThermo<BaseThermo>&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
163 
164 #ifdef NoRepository
165  #include "PsiuMulticomponentThermo.C"
166 #endif
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
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 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].
void operator=(const PsiuMulticomponentThermo< BaseThermo > &)=delete
Disallow default bitwise assignment.
virtual ~PsiuMulticomponentThermo()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
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(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)