SpecieMixture.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "SpecieMixture.H"
29 #include "fvMesh.H"
30 
31 
32 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
33 
34 template<class MixtureType>
36 (
37  const dictionary& thermoDict,
38  const fvMesh& mesh,
39  const word& phaseName
40 )
41 :
42  MixtureType
43  (
44  thermoDict,
45  mesh,
46  phaseName
47  )
48 {}
49 
50 
51 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
52 
53 template<class MixtureType>
55 (
56  const label speciei
57 ) const
58 {
59  return this->getLocalThermo(speciei).W();
60 }
61 
62 
63 template<class MixtureType>
64 Foam::scalar Foam::SpecieMixture<MixtureType>::Hc(const label speciei) const
65 {
66  return this->getLocalThermo(speciei).Hc();
67 }
68 
69 
70 template<class MixtureType>
72 (
73  const label speciei,
74  const scalar p,
75  const scalar T
76 ) const
77 {
78  return this->getLocalThermo(speciei).Cp(p, T);
79 }
80 
81 
82 template<class MixtureType>
84 (
85  const label speciei,
86  const scalar p,
87  const scalar T
88 ) const
89 {
90  return this->getLocalThermo(speciei).Cv(p, T);
91 }
92 
93 
94 template<class MixtureType>
96 (
97  const label speciei,
98  const scalar p,
99  const scalar T
100 ) const
101 {
102  return this->getLocalThermo(speciei).HE(p, T);
103 }
104 
105 
106 template<class MixtureType>
108 (
109  const label speciei,
110  const scalar p,
111  const scalar T
112 ) const
113 {
114  return this->getLocalThermo(speciei).Ha(p, T);
115 }
116 
117 
118 template<class MixtureType>
120 (
121  const label speciei,
122  const scalar p,
123  const scalar T
124 ) const
125 {
126  return this->getLocalThermo(speciei).Hs(p, T);
127 }
128 
129 
130 template<class MixtureType>
132 (
133  const label speciei,
134  const scalar p,
135  const scalar T
136 ) const
137 {
138  return this->getLocalThermo(speciei).S(p, T);
139 }
140 
141 
142 template<class MixtureType>
144 (
145  const label speciei,
146  const scalar p,
147  const scalar T
148 ) const
149 {
150  return this->getLocalThermo(speciei).Es(p, T);
151 }
152 
153 
154 template<class MixtureType>
156 (
157  const label speciei,
158  const scalar p,
159  const scalar T
160 ) const
161 {
162  return this->getLocalThermo(speciei).G(p, T);
163 }
164 
165 
166 template<class MixtureType>
168 (
169  const label speciei,
170  const scalar p,
171  const scalar T
172 ) const
173 {
174  return this->getLocalThermo(speciei).A(p, T);
175 }
176 
177 
178 template<class MixtureType>
180 (
181  const label speciei,
182  const scalar p,
183  const scalar T
184 ) const
185 {
186  return this->getLocalThermo(speciei).mu(p, T);
187 }
188 
189 
190 template<class MixtureType>
192 (
193  const label speciei,
194  const scalar p,
195  const scalar T
196 ) const
197 {
198  return this->getLocalThermo(speciei).kappa(p, T);
199 }
200 
201 
202 template<class MixtureType>
204 (
205  const label speciei,
206  const scalar p,
207  const scalar T
208 ) const
209 {
210  return this->getLocalThermo(speciei).alphah(p, T);
211 }
212 
213 
214 template<class MixtureType>
216 (
217  const label speciei,
218  const scalar p,
219  const scalar T
220 ) const
221 {
222  return this->getLocalThermo(speciei).rho(p, T);
223 }
224 
225 
226 // ************************************************************************* //
Foam::SpecieMixture::A
virtual scalar A(const label speciei, const scalar p, const scalar T) const
Helmholtz free energy [J/kg].
Definition: SpecieMixture.C:168
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::SpecieMixture::Cp
virtual tmp< volScalarField > Cp() const =0
Heat capacity at constant pressure for patch [J/kg/K].
Foam::SpecieMixture::mu
virtual scalar mu(const label speciei, const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].
Definition: SpecieMixture.C:180
Foam::SpecieMixture::Cv
virtual tmp< volScalarField > Cv() const =0
Heat capacity at constant volume [J/kg/K].
Foam::SpecieMixture::Hs
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
Definition: SpecieMixture.C:120
Foam::SpecieMixture::HE
virtual scalar HE(const label speciei, const scalar p, const scalar T) const
Enthalpy/Internal energy [J/kg].
Definition: SpecieMixture.C:96
Foam::SpecieMixture::Es
virtual scalar Es(const label speciei, const scalar p, const scalar T) const
Sensible internal energy [J/kg].
Definition: SpecieMixture.C:144
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam::SpecieMixture::W
virtual tmp< volScalarField > W() const =0
Molecular weight of the given specie [kg/kmol].
T
const volScalarField & T
Definition: createFieldRefs.H:2
Foam::SpecieMixture::SpecieMixture
SpecieMixture(const dictionary &thermoDict, const fvMesh &mesh, const word &phaseName)
Construct from dictionary, mesh and phase name.
Definition: SpecieMixture.C:36
Foam::SpecieMixture::G
virtual scalar G(const label speciei, const scalar p, const scalar T) const
Gibbs free energy [J/kg].
Definition: SpecieMixture.C:156
Foam::SpecieMixture::S
virtual scalar S(const label speciei, const scalar p, const scalar T) const
Entropy [J/(kg K)].
Definition: SpecieMixture.C:132
thermoDict
const dictionary & thermoDict
Definition: EEqn.H:16
SpecieMixture.H
Foam::SpecieMixture::Ha
virtual scalar Ha(const label speciei, const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
Definition: SpecieMixture.C:108
Foam::SpecieMixture::kappa
virtual tmp< volScalarField > kappa() const =0
Thermal diffusivity for temperature of mixture [J/m/s/K].
Foam::SpecieMixture::rho
virtual scalar rho(const label speciei, const scalar p, const scalar T) const
Density [kg/m3].
Definition: SpecieMixture.C:216
Foam::SpecieMixture::Hc
virtual scalar Hc(const label speciei) const
Chemical enthalpy [J/kg].
Definition: SpecieMixture.C:64
Foam::SpecieMixture::alphah
virtual scalar alphah(const label speciei, const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/m/s].
Definition: SpecieMixture.C:204