inhomogeneousMixture.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::inhomogeneousMixture
26 
27 Description
28  Combustion mixture for inhomogeneous lean, stoichiometric or rich conditions
29 
30  in which the mixture-fraction \c ft and fuel mass-fraction \c fu define the
31  composition.
32 
33 SourceFiles
34  inhomogeneousMixture.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef inhomogeneousMixture_H
39 #define inhomogeneousMixture_H
40 
41 #include "dimensionedTypes.H"
42 #include "FieldListSlice.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class inhomogeneousMixture 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, FU, 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 "inhomogeneousMixture<" + ThermoType::typeName() + '>';
116  }
117 
118  //- Return the specie names
119  static wordList specieNames()
120  {
121  return {"ft", "fu", "b"};
122  }
123 
124  //- Return the residual fraction of fuel in the burnt mixture
125  scalar fres(const scalarFieldListSlice& Y) const;
126 
127  //- Return the fuel-oxidant equivalence ratio
128  scalar Phi(const scalarFieldListSlice& Y) const;
129 
130  //- Return the mixture for the given composition
131  const thermoType& mixture(const scalar ft, const scalar fu) const;
132 
133  //- Return the mixture for thermodynamic properties
135  (
136  const scalarFieldListSlice& Y
137  ) const;
138 
139  //- Return the mixture for transport properties
141  (
142  const scalarFieldListSlice& Y
143  ) const;
144 
145  //- Return the mixture for transport properties
147  (
148  const scalarFieldListSlice& Y,
149  const thermoMixtureType&
150  ) const;
151 
152  //- Return the reactant mixture
153  const thermoType& reactants(const scalarFieldListSlice&) const;
154 
155  //- Return the product mixture
156  const thermoType& products(const scalarFieldListSlice&) const;
157 
158  //- Reset the mixture to an unburnt state not implemented
159  void reset(PtrList<volScalarField>& Y) const
160  {
162  }
163 
164  //- Read dictionary
165  void read(const dictionary&);
166 
167 
168  // Member Operators
169 
170  //- Disallow default bitwise assignment
171  void operator=(const inhomogeneousMixture<ThermoType>&) = delete;
172 };
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
180 
181 #ifdef NoRepository
182  #include "inhomogeneousMixture.C"
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
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.
static wordList specieNames()
Return the specie names.
const thermoMixtureType & thermoMixture(const scalarFieldListSlice &Y) const
Return the mixture for thermodynamic properties.
ThermoType thermoType
The type of thermodynamics this mixture is instantiated for.
const thermoType & products(const scalarFieldListSlice &) const
Return the product mixture.
static word typeName()
Return the instantiated type name.
const transportMixtureType & transportMixture(const scalarFieldListSlice &Y) const
Return the mixture for transport properties.
ThermoType transportMixtureType
Mixing type for transport properties.
scalar fres(const scalarFieldListSlice &Y) const
Return the residual fraction of fuel in the burnt mixture.
inhomogeneousMixture(const dictionary &)
Construct from a dictionary.
ThermoType thermoMixtureType
Mixing type for thermodynamic properties.
scalar Phi(const scalarFieldListSlice &Y) const
Return the fuel-oxidant equivalence ratio.
const thermoType & reactants(const scalarFieldListSlice &) const
Return the reactant mixture.
void read(const dictionary &)
Read dictionary.
void reset(PtrList< volScalarField > &Y) const
Reset the mixture to an unburnt state not implemented.
void operator=(const inhomogeneousMixture< ThermoType > &)=delete
Disallow default bitwise assignment.
const thermoType & mixture(const scalar ft, const scalar fu) const
Return the mixture for the given composition.
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
Namespace for OpenFOAM.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
PtrList< volScalarField > & Y