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 | Copyright (C) 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::Saturated
26 
27 Description
28  Model which uses a saturation pressure model for a single species to
29  calculate the interface composition.
30 
31 SourceFiles
32  Saturated.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef Saturated_H
37 #define Saturated_H
38 
40 #include "saturationModel.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class phasePair;
48 
49 namespace interfaceCompositionModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class Saturated Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class Thermo, class OtherThermo>
57 class Saturated
58 :
59  public InterfaceCompositionModel<Thermo, OtherThermo>
60 {
61 protected:
62 
63  // Private data
64 
65  //- Saturated species name
67 
68  //- Saturated species index
70 
71  //- Saturation pressure model
73 
74 
75  // Private Member Functions
76 
77  //- Constant of propotionality between partial pressure and mass
78  // fraction
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("Saturated");
86 
87  // Constructors
88 
89  //- Construct from components
90  Saturated
91  (
92  const dictionary& dict,
93  const phasePair& pair
94  );
95 
96 
97  //- Destructor
98  virtual ~Saturated();
99 
100 
101  // Member Functions
102 
103  //- Update the composition
104  virtual void update(const volScalarField& Tf);
105 
106  //- The interface species fraction
107  virtual tmp<volScalarField> Yf
108  (
109  const word& speciesName,
110  const volScalarField& Tf
111  ) const;
112 
113  //- The interface species fraction derivative w.r.t. temperature
115  (
116  const word& speciesName,
117  const volScalarField& Tf
118  ) const;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace interfaceCompositionModels
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #ifdef NoRepository
130 # include "Saturated.C"
131 #endif
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Saturated(const dictionary &dict, const phasePair &pair)
Construct from components.
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
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
word saturatedName_
Saturated species name.
Definition: Saturated.H:65
tmp< volScalarField > wRatioByP() const
Constant of propotionality between partial pressure and mass.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
dictionary dict
label saturatedIndex_
Saturated species index.
Definition: Saturated.H:68
virtual void update(const volScalarField &Tf)
Update the composition.
TypeName("Saturated")
Runtime type information.
Base class for interface composition models, templated on the two thermodynamic models either side of...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
A class for managing temporary objects.
Definition: PtrList.H:118
autoPtr< saturationModel > saturationModel_
Saturation pressure model.
Definition: Saturated.H:71