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