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