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