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-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::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  //- Reactant thermodynamic model
80  thermoType reactants_;
81 
82  //- Product thermodynamic model
83  thermoType products_;
84 
85  //- Mutable storage for the mixed thermodynamic model
86  mutable thermoType mixture_;
87 
88 
89 public:
90 
91  // Constructors
92 
93  //- Construct from a dictionary
95 
96  //- Disallow default bitwise copy construction
98 
99 
100  //- Destructor
101  virtual ~homogeneousMixture()
102  {}
103 
104 
105  // Member Functions
106 
107  //- Return the instantiated type name
108  static word typeName()
109  {
110  return "homogeneousMixture<" + ThermoType::typeName() + '>';
111  }
112 
113  //- Return the specie names
114  static wordList specieNames()
115  {
116  return {"b"};
117  }
118 
119  //- Return the residual fraction of fuel in the burnt mixture
120  scalar fres(const scalarFieldListSlice& Y) const
121  {
122  return 0;
123  }
124 
125  //- Return the mixture for the given composition
126  const thermoType& mixture(const scalar) const;
127 
128  //- Return the mixture for thermodynamic properties
130  (
131  const scalarFieldListSlice&
132  ) const;
133 
134  //- Return the mixture for transport properties
136  (
137  const scalarFieldListSlice&
138  ) const;
139 
140  //- Return the mixture for transport properties
142  (
143  const scalarFieldListSlice&,
144  const thermoMixtureType&
145  ) const;
146 
147  //- Return the reactant mixture
148  const thermoType& reactants(const scalarFieldListSlice&) const;
149 
150  //- Return the product mixture
151  const thermoType& products(const scalarFieldListSlice&) const;
152 
153  //- Reset the mixture to an unburnt state not implemented
154  void reset(PtrList<volScalarField>& Y) const
155  {
157  }
158 
159  //- Read dictionary
160  void read(const dictionary&);
161 
162 
163  // Member Operators
164 
165  //- Disallow default bitwise assignment
166  void operator=(const homogeneousMixture<ThermoType>&) = delete;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
175 
176 #ifdef NoRepository
177  #include "homogeneousMixture.C"
178 #endif
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
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.
virtual ~homogeneousMixture()
Destructor.
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.
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