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-2015 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  //- Number of moles of the given specie []
86  virtual scalar nMoles(const label speciei) const = 0;
87 
88  //- Molecular weight of the given specie [kg/kmol]
89  virtual scalar W(const label speciei) const = 0;
90 
91  //- Molecular weight of the mixture [kg/kmol]
92  tmp<volScalarField> W() const;
93 
94 
95  // Per specie thermo properties
96 
97  //- Heat capacity at constant pressure [J/(kg K)]
98  virtual scalar Cp
99  (
100  const label speciei,
101  const scalar p,
102  const scalar T
103  ) const = 0;
104 
105  //- Heat capacity at constant volume [J/(kg K)]
106  virtual scalar Cv
107  (
108  const label speciei,
109  const scalar p,
110  const scalar T
111  ) const = 0;
112 
113  //- Absolute enthalpy [J/kg]
114  virtual scalar Ha
115  (
116  const label speciei,
117  const scalar p,
118  const scalar T
119  ) const = 0;
120 
121  //- Sensible enthalpy [J/kg]
122  virtual scalar Hs
123  (
124  const label speciei,
125  const scalar p,
126  const scalar T
127  ) const = 0;
128 
129  //- Chemical enthalpy [J/kg]
130  virtual scalar Hc(const label speciei) const = 0;
131 
132  //- Entropy [J/(kg K)]
133  virtual scalar S
134  (
135  const label speciei,
136  const scalar p,
137  const scalar T
138  ) const = 0;
139 
140  //- Sensible internal energy [J/kg]
141  virtual scalar Es
142  (
143  const label speciei,
144  const scalar p,
145  const scalar T
146  ) const = 0;
147 
148  //- Gibbs free energy [J/kg]
149  virtual scalar G
150  (
151  const label speciei,
152  const scalar p,
153  const scalar T
154  ) const = 0;
155 
156  //- Helmholtz free energy [J/kg]
157  virtual scalar A
158  (
159  const label speciei,
160  const scalar p,
161  const scalar T
162  ) const = 0;
163 
164 
165  // Per specie transport properties
166 
167  //- Dynamic viscosity [kg/m/s]
168  virtual scalar mu
169  (
170  const label speciei,
171  const scalar p,
172  const scalar T
173  ) const = 0;
174 
175  //- Thermal conductivity [W/m/K]
176  virtual scalar kappa
177  (
178  const label speciei,
179  const scalar p,
180  const scalar T
181  ) const = 0;
182 
183  //- Thermal diffusivity of enthalpy [kg/m/s]
184  virtual scalar alphah
185  (
186  const label speciei,
187  const scalar p,
188  const scalar T
189  ) const = 0;
190 
191  //- Density [kg/m3]
192  virtual scalar rho
193  (
194  const label speciei,
195  const scalar p,
196  const scalar T
197  ) const = 0;
198 };
199 
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 } // End namespace Foam
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 #endif
208 
209 // ************************************************************************* //
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual scalar mu(const label speciei, const scalar p, const scalar T) const =0
Dynamic viscosity [kg/m/s].
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual scalar G(const label speciei, const scalar p, const scalar T) const =0
Gibbs free energy [J/kg].
A class for handling words, derived from string.
Definition: word.H:59
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
basicSpecieMixture basicMixtureType
The base class of the mixture.
virtual scalar Cv(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant volume [J/(kg K)].
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual scalar S(const label speciei, const scalar p, const scalar T) const =0
Entropy [J/(kg K)].
Namespace for OpenFOAM.
virtual scalar nMoles(const label speciei) const =0
Number of moles of the given specie [].
volScalarField & p
Definition: createFields.H:51
virtual scalar kappa(const label speciei, const scalar p, const scalar T) const =0
Thermal conductivity [W/m/K].
virtual ~basicSpecieMixture()
Destructor.
virtual scalar Es(const label speciei, const scalar p, const scalar T) const =0
Sensible internal energy [J/kg].
virtual scalar Hc(const label speciei) const =0
Chemical enthalpy [J/kg].
tmp< volScalarField > W() const
Molecular weight of the mixture [kg/kmol].
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
basicSpecieMixture(const dictionary &, const wordList &specieNames, const fvMesh &, const word &)
Construct from dictionary, species names, mesh and phase name.
virtual scalar alphah(const label speciei, const scalar p, const scalar T) const =0
Thermal diffusivity of enthalpy [kg/m/s].
TypeName("basicSpecieMixture")
Run time type information.
virtual scalar Ha(const label speciei, const scalar p, const scalar T) const =0
Absolute enthalpy [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 rho(const label speciei, const scalar p, const scalar T) const =0
Density [kg/m3].
virtual scalar A(const label speciei, const scalar p, const scalar T) const =0
Helmholtz free energy [J/kg].
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
A class for managing temporary objects.
Definition: PtrList.H:118