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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::basicSpecieMixture
29 
30 Group
31  grpReactionThermophysicalMixtures
32 
33 Description
34  Specialization of basicMultiComponentMixture for a mixture consisting
35  of a number for molecular species.
36 
37 SourceFiles
38  basicSpecieMixture.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef basicSpecieMixture_H
43 #define basicSpecieMixture_H
44 
46 #include "specieElement.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 typedef HashTable<List<specieElement>> speciesCompositionTable;
54 
55 /*---------------------------------------------------------------------------*\
56  Class basicSpecieMixture Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 :
62 {
63 
64 public:
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  (
78  const dictionary& thermoDict,
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 // ************************************************************************* //
Foam::autoPtr::New
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::basicSpecieMixture::rho
virtual scalar rho(const label speciei, const scalar p, const scalar T) const =0
Density [kg/m3].
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::basicSpecieMixture::basicMixtureType
basicSpecieMixture basicMixtureType
The base class of the mixture.
Definition: basicSpecieMixture.H:69
Foam::basicSpecieMixture::HE
virtual scalar HE(const label speciei, const scalar p, const scalar T) const =0
Enthalpy/Internal energy [J/kg].
Foam::basicSpecieMixture
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Definition: basicSpecieMixture.H:58
Foam::basicSpecieMixture::basicSpecieMixture
basicSpecieMixture(const dictionary &thermoDict, const wordList &specieNames, const fvMesh &mesh, const word &phaseName)
Construct from dictionary, species names, mesh and phase name.
Definition: basicSpecieMixture.C:41
Foam::basicSpecieMixture::mu
virtual scalar mu(const label speciei, const scalar p, const scalar T) const =0
Dynamic viscosity [kg/m/s].
Foam::basicSpecieMixture::specieComposition
virtual autoPtr< speciesCompositionTable > specieComposition() const
Species composition.
Definition: basicSpecieMixture.H:210
Foam::speciesCompositionTable
HashTable< List< specieElement > > speciesCompositionTable
Definition: chemistryReader.H:54
Foam::basicSpecieMixture::TypeName
TypeName("basicSpecieMixture")
Run time type information.
Foam::basicSpecieMixture::Hs
virtual scalar Hs(const label speciei, const scalar p, const scalar T) const =0
Sensible enthalpy [J/kg].
Foam::basicSpecieMixture::kappa
virtual scalar kappa(const label speciei, const scalar p, const scalar T) const =0
Thermal conductivity [W/m/K].
specieElement.H
Foam::basicSpecieMixture::S
virtual scalar S(const label speciei, const scalar p, const scalar T) const =0
Entropy [J/(kg K)].
Foam::basicSpecieMixture::Ha
virtual scalar Ha(const label speciei, const scalar p, const scalar T) const =0
Absolute enthalpy [J/kg].
Foam::basicSpecieMixture::Es
virtual scalar Es(const label speciei, const scalar p, const scalar T) const =0
Sensible internal energy [J/kg].
Foam::basicSpecieMixture::Cv
virtual scalar Cv(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant volume [J/(kg K)].
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::basicSpecieMixture::W
virtual scalar W(const label speciei) const =0
Molecular weight of the given specie [kg/kmol].
Foam::basicSpecieMixture::alphah
virtual scalar alphah(const label speciei, const scalar p, const scalar T) const =0
Thermal diffusivity of enthalpy [kg/m/s].
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
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
basicMultiComponentMixture.H
thermoDict
const dictionary & thermoDict
Definition: EEqn.H:16
Foam::List< word >
Foam::basicSpecieMixture::~basicSpecieMixture
virtual ~basicSpecieMixture()=default
Destructor.
Foam::basicSpecieMixture::A
virtual scalar A(const label speciei, const scalar p, const scalar T) const =0
Helmholtz free energy [J/kg].
Foam::basicSpecieMixture::G
virtual scalar G(const label speciei, const scalar p, const scalar T) const =0
Gibbs free energy [J/kg].
Foam::basicMultiComponentMixture
Multi-component mixture.
Definition: basicMultiComponentMixture.H:60
Foam::basicSpecieMixture::Hc
virtual scalar Hc(const label speciei) const =0
Chemical enthalpy [J/kg].
Foam::basicSpecieMixture::Cp
virtual scalar Cp(const label speciei, const scalar p, const scalar T) const =0
Heat capacity at constant pressure [J/(kg K)].