Saturated.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) 2015-2018 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::interfaceCompositionModels::Saturated
28
29Description
30 Model which uses a saturation pressure model for a single species to
31 calculate the interface composition.
32
33SourceFiles
34 Saturated.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Saturated_H
39#define Saturated_H
40
41#include "InterfaceCompositionModel.H"
42#include "saturationModel.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49class phasePair;
50
51namespace interfaceCompositionModels
52{
53
54/*---------------------------------------------------------------------------*\
55 Class Saturated Declaration
56\*---------------------------------------------------------------------------*/
57
58template<class Thermo, class OtherThermo>
59class Saturated
60:
61 public InterfaceCompositionModel<Thermo, OtherThermo>
62{
63protected:
64
65 // Private data
66
67 //- Saturated species name
69
70 //- Saturated species index
71 label saturatedIndex_;
72
73 //- Saturation pressure model
75
76
77 // Private Member Functions
78
79 //- Constant of proportionality between partial pressure and mass
80 // fraction
82
83
84public:
85
86 //- Runtime type information
87 TypeName("saturated");
88
89 // Constructors
90
91 //- Construct from components
93 (
94 const dictionary& dict,
95 const phasePair& pair
96 );
97
98
99 //- Destructor
100 virtual ~Saturated();
101
102
103 // Member Functions
104
105 //- Update the composition
106 virtual void update(const volScalarField& Tf);
107
108 //- The interface species fraction
109 virtual tmp<volScalarField> Yf
110 (
111 const word& speciesName,
112 const volScalarField& Tf
113 ) const;
114
115 //- The interface species fraction derivative w.r.t. temperature
117 (
118 const word& speciesName,
119 const volScalarField& Tf
120 ) const;
121};
122
123
124// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126} // End namespace interfaceCompositionModels
127} // End namespace Foam
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131#ifdef NoRepository
132 #include "Saturated.C"
133#endif
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
Base class for interface composition models, templated on the two thermodynamic models either side of...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Model which uses a saturation pressure model for a single species to calculate the interface composit...
Definition: Saturated.H:61
autoPtr< saturationModel > saturationModel_
Saturation pressure model.
Definition: Saturated.H:73
tmp< volScalarField > wRatioByP() const
Constant of proportionality between partial pressure and mass.
Definition: Saturated.C:35
TypeName("saturated")
Runtime type information.
label saturatedIndex_
Saturated species index.
Definition: Saturated.H:70
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Definition: Saturated.C:102
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Definition: Saturated.C:129
word saturatedName_
Saturated species name.
Definition: Saturated.H:67
const phasePair & pair() const
The phase pair.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
mesh update()
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73