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