inhomogeneousEGRMixture.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) 2024-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::inhomogeneousEGRMixture
26 
27 Description
28  Combustion mixture for inhomogeneous lean, stoichiometric or rich conditions
29  with exhaust gas recirculation
30 
31  in which the mixture-fraction \c ft, fuel mass-fraction \c fu and exhaust
32  gas recirculation mass-fraction \c egr define the composition.
33 
34 SourceFiles
35  inhomogeneousEGRMixture.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef inhomogeneousEGRMixture_H
40 #define inhomogeneousEGRMixture_H
41 
42 #include "dimensionedTypes.H"
43 #include "FieldListSlice.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class inhomogeneousEGRMixture Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class ThermoType>
56 {
57 public:
58 
59  // Public Typedefs
60 
61  //- The type of thermodynamics this mixture is instantiated for
62  typedef ThermoType thermoType;
63 
64  //- Mixing type for thermodynamic properties
65  typedef ThermoType thermoMixtureType;
66 
67  //- Mixing type for transport properties
68  typedef ThermoType transportMixtureType;
69 
70 
71 private:
72 
73  // Private Enumerations
74 
75  //- Specie indices
76  enum species { FT, FU, B, EGR };
77 
78 
79  // Private Data
80 
81  //- Stoichiometric air/fuel ratio
82  scalar stoicRatio_;
83 
84  //- Fuel thermodynamic model
85  thermoType fuel_;
86 
87  //- Oxidant thermodynamic model
88  thermoType oxidant_;
89 
90  //- Product thermodynamic model
91  thermoType products_;
92 
93  //- Mutable storage for the mixed thermodynamic model
94  mutable thermoType mixture_;
95 
96 
97 public:
98 
99  // Constructors
100 
101  //- Construct from a dictionary
103 
104  //- Disallow default bitwise copy construction
106  (
108  ) = delete;
109 
110 
111  // Member Functions
112 
113  //- Return the instantiated type name
114  static word typeName()
115  {
116  return "inhomogeneousEGRMixture<" + ThermoType::typeName() + '>';
117  }
118 
119  //- Return the specie names
120  static wordList specieNames()
121  {
122  return {"ft", "fu", "b", "egr"};
123  }
124 
125  //- Return the residual fraction of fuel in the burnt mixture
126  scalar fres(const scalarFieldListSlice& Y) const;
127 
128  //- Return the fuel-oxidant equivalence ratio
129  scalar Phi(const scalarFieldListSlice& Y) const;
130 
131  //- Return the mixture for the given composition
132  const thermoType& mixture
133  (
134  const scalar ft,
135  const scalar fu,
136  const scalar egr
137  ) const;
138 
139  //- Return the mixture for thermodynamic properties
141  (
142  const scalarFieldListSlice&
143  ) const;
144 
145  //- Return the mixture for transport properties
147  (
148  const scalarFieldListSlice&
149  ) const;
150 
151  //- Return the mixture for transport properties
153  (
154  const scalarFieldListSlice&,
155  const thermoMixtureType&
156  ) const;
157 
158  //- Return the reactant mixture
159  const thermoType& reactants(const scalarFieldListSlice&) const;
160 
161  //- Return the product mixture
162  const thermoType& products(const scalarFieldListSlice&) const;
163 
164  //- Reset the mixture to an unburnt state and update EGR
165  void reset(PtrList<volScalarField>& Y) const;
166 
167  //- Read dictionary
168  void read(const dictionary&);
169 
170 
171  // Member Operators
172 
173  //- Disallow default bitwise assignment
174  void operator=(const inhomogeneousEGRMixture<ThermoType>&) = delete;
175 };
176 
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 } // End namespace Foam
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
183 
184 #ifdef NoRepository
185  #include "inhomogeneousEGRMixture.C"
186 #endif
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Combustion mixture for inhomogeneous lean, stoichiometric or rich conditions with exhaust gas recircu...
static wordList specieNames()
Return the specie names.
const thermoType & products(const scalarFieldListSlice &) const
Return the product mixture.
const thermoType & reactants(const scalarFieldListSlice &) const
Return the reactant mixture.
const thermoMixtureType & thermoMixture(const scalarFieldListSlice &) const
Return the mixture for thermodynamic properties.
ThermoType thermoType
The type of thermodynamics this mixture is instantiated for.
void operator=(const inhomogeneousEGRMixture< ThermoType > &)=delete
Disallow default bitwise assignment.
static word typeName()
Return the instantiated type name.
inhomogeneousEGRMixture(const dictionary &)
Construct from a dictionary.
ThermoType transportMixtureType
Mixing type for transport properties.
scalar fres(const scalarFieldListSlice &Y) const
Return the residual fraction of fuel in the burnt mixture.
ThermoType thermoMixtureType
Mixing type for thermodynamic properties.
const transportMixtureType & transportMixture(const scalarFieldListSlice &) const
Return the mixture for transport properties.
scalar Phi(const scalarFieldListSlice &Y) const
Return the fuel-oxidant equivalence ratio.
void read(const dictionary &)
Read dictionary.
void reset(PtrList< volScalarField > &Y) const
Reset the mixture to an unburnt state and update EGR.
const thermoType & mixture(const scalar ft, const scalar fu, const scalar egr) const
Return the mixture for the given composition.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
PtrList< volScalarField > & Y