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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2014-2017 OpenFOAM Foundation
9 Copyright (C) 2020-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::basicSpecieMixture
29
30Group
31 grpReactionThermophysicalMixtures
32
33Description
34 Specialization of basicMultiComponentMixture for a mixture consisting
35 of a number for molecular species.
36
37SourceFiles
38 basicSpecieMixture.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef basicSpecieMixture_H
43#define basicSpecieMixture_H
44
46#include "specieElement.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53typedef HashTable<List<specieElement>> speciesCompositionTable;
54
55/*---------------------------------------------------------------------------*\
56 Class basicSpecieMixture Declaration
57\*---------------------------------------------------------------------------*/
60:
62{
63
64public:
65
66 //- Run time type information
67 TypeName("basicSpecieMixture");
68
69 //- The base class of the mixture
71
72
73 // Constructors
74
75 //- Construct from dictionary, species names, mesh and phase name
77 (
79 const wordList& specieNames,
80 const fvMesh& mesh,
81 const word& phaseName
82 );
83
84
85 //- Destructor
86 virtual ~basicSpecieMixture() = default;
87
88
89 // Member Functions
90
91 // Per specie properties
92
93 //- Molecular weight of the given specie [kg/kmol]
94 virtual scalar W(const label speciei) const = 0;
95
96 //- Chemical enthalpy [J/kg]
97 virtual scalar Hc(const label speciei) const = 0;
98
99
100 // Per specie thermo properties
101
102 //- Heat capacity at constant pressure [J/(kg K)]
103 virtual scalar Cp
104 (
105 const label speciei,
106 const scalar p,
107 const scalar T
108 ) const = 0;
109
110 //- Heat capacity at constant volume [J/(kg K)]
111 virtual scalar Cv
112 (
113 const label speciei,
114 const scalar p,
115 const scalar T
116 ) const = 0;
117
118 //- Enthalpy/Internal energy [J/kg]
119 virtual scalar HE
120 (
121 const label speciei,
122 const scalar p,
123 const scalar T
124 ) const = 0;
125
126 //- Absolute enthalpy [J/kg]
127 virtual scalar Ha
128 (
129 const label speciei,
130 const scalar p,
131 const scalar T
132 ) const = 0;
133
134 //- Sensible enthalpy [J/kg]
135 virtual scalar Hs
136 (
137 const label speciei,
138 const scalar p,
139 const scalar T
140 ) const = 0;
141
142
143 //- Entropy [J/(kg K)]
144 virtual scalar S
145 (
146 const label speciei,
147 const scalar p,
148 const scalar T
149 ) const = 0;
150
151 //- Sensible internal energy [J/kg]
152 virtual scalar Es
153 (
154 const label speciei,
155 const scalar p,
156 const scalar T
157 ) const = 0;
158
159 //- Gibbs free energy [J/kg]
160 virtual scalar G
161 (
162 const label speciei,
163 const scalar p,
164 const scalar T
165 ) const = 0;
166
167 //- Helmholtz free energy [J/kg]
168 virtual scalar A
169 (
170 const label speciei,
171 const scalar p,
172 const scalar T
173 ) const = 0;
174
175
176 // Per specie transport properties
177
178 //- Dynamic viscosity [kg/m/s]
179 virtual scalar mu
180 (
181 const label speciei,
182 const scalar p,
183 const scalar T
184 ) const = 0;
185
186 //- Thermal conductivity [W/m/K]
187 virtual scalar kappa
188 (
189 const label speciei,
190 const scalar p,
191 const scalar T
192 ) const = 0;
193
194 //- Thermal diffusivity of enthalpy [kg/m/s]
195 virtual scalar alphah
196 (
197 const label speciei,
198 const scalar p,
199 const scalar T
200 ) const = 0;
201
202 //- Density [kg/m3]
203 virtual scalar rho
204 (
205 const label speciei,
206 const scalar p,
207 const scalar T
208 ) const = 0;
209
210 //- Species composition
212 {
214 }
215};
216
217
218// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219
220} // End namespace Foam
221
222// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223
224#endif
225
226// ************************************************************************* //
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
virtual scalar Hc(const label speciei) const =0
Chemical enthalpy [J/kg].
virtual scalar rho(const label speciei, const scalar p, const scalar T) const =0
Density [kg/m3].
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
virtual scalar G(const label speciei, const scalar p, const scalar T) const =0
Gibbs free energy [J/kg].
virtual scalar HE(const label speciei, const scalar p, const scalar T) const =0
Enthalpy/Internal energy [J/kg].
virtual scalar A(const label speciei, const scalar p, const scalar T) const =0
Helmholtz free energy [J/kg].
basicSpecieMixture basicMixtureType
The base class of the mixture.
virtual scalar Cp(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant pressure [J/(kg K)].
virtual scalar W(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
virtual ~basicSpecieMixture()=default
Destructor.
virtual scalar Cv(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant volume [J/(kg K)].
virtual scalar Es(const label speciei, const scalar p, const scalar T) const =0
Sensible internal energy [J/kg].
virtual scalar S(const label speciei, const scalar p, const scalar T) const =0
Entropy [J/(kg K)].
virtual scalar Ha(const label speciei, const scalar p, const scalar T) const =0
Absolute enthalpy [J/kg].
virtual autoPtr< speciesCompositionTable > specieComposition() const
Species composition.
virtual scalar mu(const label speciei, const scalar p, const scalar T) const =0
Dynamic viscosity [kg/m/s].
virtual scalar kappa(const label speciei, const scalar p, const scalar T) const =0
Thermal conductivity [W/m/K].
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
const volScalarField & T
const volScalarField & mu
const dictionary & thermoDict
Definition: EEqn.H:16
const volScalarField & Cv
Definition: EEqn.H:8
const volScalarField & Cp
Definition: EEqn.H:7
dynamicFvMesh & mesh
Namespace for OpenFOAM.
HashTable< List< specieElement > > speciesCompositionTable
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73