All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2023 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  Foam::homogeneousMixture
29 
30 SourceFiles
31  homogeneousMixture.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef homogeneousMixture_H
36 #define homogeneousMixture_H
37 
38 #include "dimensionedTypes.H"
39 #include "FieldListSlice.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class homogeneousMixture Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class ThermoType>
52 {
53 public:
54 
55  // Public Typedefs
56 
57  //- The type of thermodynamics this mixture is instantiated for
58  typedef ThermoType thermoType;
59 
60  //- Mixing type for thermodynamic properties
61  typedef ThermoType thermoMixtureType;
62 
63  //- Mixing type for transport properties
64  typedef ThermoType transportMixtureType;
65 
66 
67 private:
68 
69  // Private Enumerations
70 
71  //- Specie indices
72  enum species { B };
73 
74 
75  // Private Data
76 
77  //- Reactant thermodynamic model
78  thermoType reactants_;
79 
80  //- Product thermodynamic model
81  thermoType products_;
82 
83  //- Mutable storage for the mixed thermodynamic model
84  mutable thermoType mixture_;
85 
86 
87 public:
88 
89  // Constructors
90 
91  //- Construct from a dictionary
93 
94  //- Disallow default bitwise copy construction
96 
97 
98  //- Destructor
99  virtual ~homogeneousMixture()
100  {}
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 mixture for the given composition
118  const thermoType& mixture(const scalar) const;
119 
120  //- Return the mixture for thermodynamic properties
122  (
123  const scalarFieldListSlice&
124  ) const;
125 
126  //- Return the mixture for transport properties
128  (
129  const scalarFieldListSlice&
130  ) const;
131 
132  //- Return the mixture for transport properties
134  (
135  const scalarFieldListSlice&,
136  const thermoMixtureType&
137  ) const;
138 
139  //- Return the reactant mixture
140  const thermoType& reactants(const scalarFieldListSlice&) const;
141 
142  //- Return the product mixture
143  const thermoType& products(const scalarFieldListSlice&) const;
144 
145  //- Read dictionary
146  void read(const dictionary&);
147 
148 
149  // Member Operators
150 
151  //- Disallow default bitwise assignment
152  void operator=(const homogeneousMixture<ThermoType>&) = delete;
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
161 
162 #ifdef NoRepository
163  #include "homogeneousMixture.C"
164 #endif
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Foam::homogeneousMixture.
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.
void read(const dictionary &)
Read dictionary.
const thermoType & mixture(const scalar) const
Return the mixture for the given composition.
const thermoType & products(const scalarFieldListSlice &) const
Return the product mixture.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.