basicSpecieMixture.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2014-2017 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::basicSpecieMixture
26 
27 Description
28  Specialization of basicMultiComponentMixture for a mixture consisting
29  of a number for molecular species.
30 
31 SourceFiles
32  basicSpecieMixture.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef basicSpecieMixture_H
37 #define basicSpecieMixture_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class basicSpecieMixture Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
53 {
54 
55 public:
56 
57  //- Run time type information
58  TypeName("basicSpecieMixture");
59 
60  //- The base class of the mixture
62 
63 
64  // Constructors
65 
66  //- Construct from dictionary, species names, mesh and phase name
68  (
69  const dictionary&,
70  const wordList& specieNames,
71  const fvMesh&,
72  const word&
73  );
74 
75 
76  //- Destructor
77  virtual ~basicSpecieMixture()
78  {}
79 
80 
81  // Member functions
82 
83  // Per specie properties
84 
85  //- Molecular weight of the given specie [kg/kmol]
86  virtual scalar W(const label speciei) const = 0;
87 
88  //- Molecular weight of the mixture [kg/kmol]
89  tmp<volScalarField> W() const;
90 
91 
92  // Per specie thermo properties
93 
94  //- Heat capacity at constant pressure [J/(kg K)]
95  virtual scalar Cp
96  (
97  const label speciei,
98  const scalar p,
99  const scalar T
100  ) const = 0;
101 
102  //- Heat capacity at constant volume [J/(kg K)]
103  virtual scalar Cv
104  (
105  const label speciei,
106  const scalar p,
107  const scalar T
108  ) const = 0;
109 
110  //- Absolute enthalpy [J/kg]
111  virtual scalar Ha
112  (
113  const label speciei,
114  const scalar p,
115  const scalar T
116  ) const = 0;
117 
118  //- Sensible enthalpy [J/kg]
119  virtual scalar Hs
120  (
121  const label speciei,
122  const scalar p,
123  const scalar T
124  ) const = 0;
125 
126  //- Chemical enthalpy [J/kg]
127  virtual scalar Hc(const label speciei) const = 0;
128 
129  //- Entropy [J/(kg K)]
130  virtual scalar S
131  (
132  const label speciei,
133  const scalar p,
134  const scalar T
135  ) const = 0;
136 
137  //- Sensible internal energy [J/kg]
138  virtual scalar Es
139  (
140  const label speciei,
141  const scalar p,
142  const scalar T
143  ) const = 0;
144 
145  //- Gibbs free energy [J/kg]
146  virtual scalar G
147  (
148  const label speciei,
149  const scalar p,
150  const scalar T
151  ) const = 0;
152 
153  //- Helmholtz free energy [J/kg]
154  virtual scalar A
155  (
156  const label speciei,
157  const scalar p,
158  const scalar T
159  ) const = 0;
160 
161 
162  // Per specie transport properties
163 
164  //- Dynamic viscosity [kg/m/s]
165  virtual scalar mu
166  (
167  const label speciei,
168  const scalar p,
169  const scalar T
170  ) const = 0;
171 
172  //- Thermal conductivity [W/m/K]
173  virtual scalar kappa
174  (
175  const label speciei,
176  const scalar p,
177  const scalar T
178  ) const = 0;
179 
180  //- Thermal diffusivity of enthalpy [kg/m/s]
181  virtual scalar alphah
182  (
183  const label speciei,
184  const scalar p,
185  const scalar T
186  ) const = 0;
187 
188  //- Density [kg/m3]
189  virtual scalar rho
190  (
191  const label speciei,
192  const scalar p,
193  const scalar T
194  ) const = 0;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************************************************************* //
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:137
virtual scalar kappa(const label speciei, const scalar p, const scalar T) const =0
Thermal conductivity [W/m/K].
virtual scalar Es(const label speciei, const scalar p, const scalar T) const =0
Sensible internal energy [J/kg].
virtual scalar Ha(const label speciei, const scalar p, const scalar T) const =0
Absolute enthalpy [J/kg].
virtual scalar rho(const label speciei, const scalar p, const scalar T) const =0
Density [kg/m3].
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
virtual scalar A(const label speciei, const scalar p, const scalar T) const =0
Helmholtz free energy [J/kg].
virtual scalar Cp(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant pressure [J/(kg K)].
virtual scalar mu(const label speciei, const scalar p, const scalar T) const =0
Dynamic viscosity [kg/m/s].
A class for handling words, derived from string.
Definition: word.H:59
virtual scalar Hc(const label speciei) const =0
Chemical enthalpy [J/kg].
virtual ~basicSpecieMixture()
Destructor.
tmp< volScalarField > W() const
Molecular weight of the mixture [kg/kmol].
virtual scalar Cv(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant volume [J/(kg K)].
virtual scalar G(const label speciei, const scalar p, const scalar T) const =0
Gibbs free energy [J/kg].
virtual scalar S(const label speciei, const scalar p, const scalar T) const =0
Entropy [J/(kg K)].
virtual scalar alphah(const label speciei, const scalar p, const scalar T) const =0
Thermal diffusivity of enthalpy [kg/m/s].
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
TypeName("basicSpecieMixture")
Run time type information.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
basicSpecieMixture basicMixtureType
The base class of the mixture.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
basicSpecieMixture(const dictionary &, const wordList &specieNames, const fvMesh &, const word &)
Construct from dictionary, species names, mesh and phase name.
Namespace for OpenFOAM.