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 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  dimensionedScalar 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  //- Destructor
112  virtual ~inhomogeneousEGRMixture()
113  {}
114 
115 
116  // Member Functions
117 
118  //- Return the instantiated type name
119  static word typeName()
120  {
121  return "inhomogeneousEGRMixture<" + ThermoType::typeName() + '>';
122  }
123 
124  //- Return the specie names
125  static wordList specieNames()
126  {
127  return {"ft", "fu", "b", "egr"};
128  }
129 
130  //- Return the residual fraction of fuel in the burnt mixture
131  scalar fres(const scalarFieldListSlice& Y) const;
132 
133  //- Return the mixture for the given composition
134  const thermoType& mixture
135  (
136  const scalar ft,
137  const scalar fu,
138  const scalar egr
139  ) const;
140 
141  //- Return the mixture for thermodynamic properties
143  (
144  const scalarFieldListSlice&
145  ) const;
146 
147  //- Return the mixture for transport properties
149  (
150  const scalarFieldListSlice&
151  ) const;
152 
153  //- Return the mixture for transport properties
155  (
156  const scalarFieldListSlice&,
157  const thermoMixtureType&
158  ) const;
159 
160  //- Return the reactant mixture
161  const thermoType& reactants(const scalarFieldListSlice&) const;
162 
163  //- Return the product mixture
164  const thermoType& products(const scalarFieldListSlice&) const;
165 
166  //- Reset the mixture to an unburnt state and update EGR
167  void reset(PtrList<volScalarField>& Y) const;
168 
169  //- Read dictionary
170  void read(const dictionary&);
171 
172 
173  // Member Operators
174 
175  //- Disallow default bitwise assignment
176  void operator=(const inhomogeneousEGRMixture<ThermoType>&) = delete;
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
185 
186 #ifdef NoRepository
187  #include "inhomogeneousEGRMixture.C"
188 #endif
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
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.
virtual ~inhomogeneousEGRMixture()
Destructor.
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.
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:62
Namespace for OpenFOAM.
PtrList< volScalarField > & Y