coefficientMultiComponentMixture.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) 2020 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::coefficientMultiComponentMixture
26 
27 Description
28  Thermophysical properties mixing class which applies mass-fraction weighted
29  mixing to the thermodynamic and transport coefficients.
30 
31 SourceFiles
32  coefficientMultiComponentMixture.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef coefficientMultiComponentMixture_H
37 #define coefficientMultiComponentMixture_H
38 
39 #include "multiComponentMixture.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class coefficientMultiComponentMixture Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class ThermoType>
52 :
53  public multiComponentMixture<ThermoType>
54 {
55 
56 public:
57 
58  //- Mixing type for thermodynamic properties
59  typedef ThermoType thermoMixtureType;
60 
61  //- Mixing type for transport properties
62  typedef ThermoType transportMixtureType;
63 
64 
65 private:
66 
67  // Private Data
68 
69  //- Temporary storage for the cell/face mixture thermo data
70  mutable thermoMixtureType mixture_;
71 
72 
73 public:
74 
75  // Constructors
76 
77  //- Construct from dictionary, mesh and phase name
79  (
80  const dictionary&,
81  const fvMesh&,
82  const word&
83  );
84 
85  //- Disallow default bitwise copy construction
87  (
89  ) = delete;
90 
91 
92  //- Destructor
94  {}
95 
96 
97  // Member Functions
98 
99  //- Return the instantiated type name
100  static word typeName()
101  {
102  return "multiComponentMixture<" + ThermoType::typeName() + '>';
103  }
104 
105  const thermoMixtureType& cellThermoMixture(const label celli) const;
106 
107  const thermoMixtureType& patchFaceThermoMixture
108  (
109  const label patchi,
110  const label facei
111  ) const;
112 
113  const transportMixtureType& cellTransportMixture
114  (
115  const label celli
116  ) const
117  {
118  return cellThermoMixture(celli);
119  }
120 
121  const transportMixtureType& patchFaceTransportMixture
122  (
123  const label patchi,
124  const label facei
125  ) const
126  {
127  return patchFaceThermoMixture(patchi, facei);
128  }
129 
130  const transportMixtureType& cellTransportMixture
131  (
132  const label,
133  const thermoMixtureType& thermoMixture
134  ) const
135  {
136  return thermoMixture;
137  }
138 
139  const transportMixtureType& patchFaceTransportMixture
140  (
141  const label,
142  const label,
143  const thermoMixtureType& thermoMixture
144  ) const
145  {
146  return thermoMixture;
147  }
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #ifdef NoRepository
159 #endif
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const transportMixtureType & cellTransportMixture(const label celli) const
ThermoType transportMixtureType
Mixing type for transport properties.
Thermophysical properties mixing class which applies mass-fraction weighted mixing to the thermodynam...
const thermoMixtureType & patchFaceThermoMixture(const label patchi, const label facei) const
static word typeName()
Return the instantiated type name.
A class for handling words, derived from string.
Definition: word.H:59
Foam::multiComponentMixture.
const transportMixtureType & patchFaceTransportMixture(const label patchi, const label facei) const
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
coefficientMultiComponentMixture(const dictionary &, const fvMesh &, const word &)
Construct from dictionary, mesh and phase name.
ThermoType thermoMixtureType
Mixing type for thermodynamic properties.
const thermoMixtureType & cellThermoMixture(const label celli) const
Namespace for OpenFOAM.