BInhomogeneousMixture.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) 2025-2026 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::BInhomogeneousMixture
26 
27 Description
28  Templated burnt gas combustion mixture for inhomogeneous lean,
29  stoichiometric or rich conditions.
30 
31 SourceFiles
32  BInhomogeneousMixture.C
33 
34 See also
35  Foam::bInhomogeneousMixture
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef BInhomogeneousMixture_H
40 #define BInhomogeneousMixture_H
41 
42 #include "bInhomogeneousMixture.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class BInhomogeneousMixture Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class ThermoType>
55 :
57 {
58 public:
59 
60  // Public Typedefs
61 
62  //- The type of thermodynamics this mixture is instantiated for
63  typedef ThermoType thermoType;
64 
65  //- Mixing type for thermodynamic properties
66  typedef ThermoType thermoMixtureType;
67 
68  //- Mixing type for transport properties
69  typedef ThermoType transportMixtureType;
70 
71 
72 private:
73 
74  // Private Data
75 
76  //- Fuel thermodynamic model
77  thermoType fuel_;
78 
79  //- Oxidant thermodynamic model
80  thermoType oxidant_;
81 
82  //- Product thermodynamic model
83  thermoType products_;
84 
85  //- Mutable storage for the mixed thermodynamic model
86  mutable thermoType mixture_;
87 
88 
89  // Private Member Functions
90 
91  //- Return the mixture for the given composition
92  const thermoType& mixture(const scalar ft) const;
93 
94 
95 public:
96 
97  // Constructors
98 
99  //- Construct from a dictionary
101 
102  //- Disallow default bitwise copy construction
104  (
106  ) = delete;
107 
108 
109  // Member Functions
110 
111  //- Return the instantiated type name
112  static word typeName()
113  {
114  return
116  + '<' + ThermoType::typeName() + '>';
117  }
118 
119  inline const ThermoType& specieThermo(const label speciei) const
120  {
122  << "Cannot return specieThermo for specie " << speciei << " ft "
123  << exit(FatalError);
124  return products_;
125  }
126 
127  //- Return the mixture for thermodynamic properties
129  (
130  const scalarFieldListSlice&
131  ) const;
132 
133  //- Return the mixture for transport properties
135  (
136  const scalarFieldListSlice&
137  ) const;
138 
139  //- Return the mixture for transport properties
141  (
142  const scalarFieldListSlice&,
143  const thermoMixtureType&
144  ) const;
145 
146  //- Read dictionary
147  void read(const dictionary&);
148 
149 
150  // Member Operators
151 
152  //- Disallow default bitwise assignment
153  void operator=(const BInhomogeneousMixture<ThermoType>&) = delete;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #ifdef NoRepository
164  #include "BInhomogeneousMixture.C"
165 #endif
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
Templated burnt gas combustion mixture for inhomogeneous lean, stoichiometric or rich conditions.
const ThermoType & specieThermo(const label speciei) const
ThermoType thermoType
The type of thermodynamics this mixture is instantiated for.
const thermoMixtureType & thermoMixture(const scalarFieldListSlice &) const
Return the mixture for thermodynamic properties.
static word typeName()
Return the instantiated type name.
ThermoType transportMixtureType
Mixing type for transport properties.
const transportMixtureType & transportMixture(const scalarFieldListSlice &) const
Return the mixture for transport properties.
ThermoType thermoMixtureType
Mixing type for thermodynamic properties.
void read(const dictionary &)
Read dictionary.
void operator=(const BInhomogeneousMixture< ThermoType > &)=delete
Disallow default bitwise assignment.
BInhomogeneousMixture(const dictionary &)
Construct from a dictionary.
Burnt gas combustion mixture for inhomogeneous lean, stoichiometric or rich conditions.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for handling words, derived from string.
Definition: word.H:63
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
error FatalError