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 -------------------------------------------------------------------------------
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 Class
27  Foam::interfaceCompositionModels::Saturated
28 
29 Description
30  Model which uses a saturation pressure model for a single species to
31  calculate the interface composition.
32 
33 SourceFiles
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 
46 namespace Foam
47 {
48 
49 class phasePair;
50 
51 namespace interfaceCompositionModels
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class Saturated Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Thermo, class OtherThermo>
59 class Saturated
60 :
61  public InterfaceCompositionModel<Thermo, OtherThermo>
62 {
63 protected:
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 
84 public:
85 
86  //- Runtime type information
87  TypeName("saturated");
88 
89  // Constructors
90 
91  //- Construct from components
92  Saturated
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 // ************************************************************************* //
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:53
Foam::InterfaceCompositionModel
Base class for interface composition models, templated on the two thermodynamic models either side of...
Definition: InterfaceCompositionModel.H:58
Foam::interfaceCompositionModels::Saturated::TypeName
TypeName("saturated")
Runtime type information.
Foam::interfaceCompositionModels::Saturated::saturatedIndex_
label saturatedIndex_
Saturated species index.
Definition: Saturated.H:70
Saturated.C
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::interfaceCompositionModels::Saturated::YfPrime
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Definition: Saturated.C:129
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::interfaceCompositionModel::pair
const phasePair & pair() const
The phase pair.
Definition: interfaceCompositionModel.C:122
Foam::interfaceCompositionModels::Saturated
Model which uses a saturation pressure model for a single species to calculate the interface composit...
Definition: Saturated.H:58
Foam::interfaceCompositionModels::Saturated::update
virtual void update(const volScalarField &Tf)
Update the composition.
Definition: Saturated.C:93
saturationModel.H
Foam::interfaceCompositionModels::Saturated::Saturated
Saturated(const dictionary &dict, const phasePair &pair)
Construct from components.
Definition: Saturated.C:52
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::interfaceCompositionModels::Saturated::Yf
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Definition: Saturated.C:102
Foam::interfaceCompositionModels::Saturated::saturatedName_
word saturatedName_
Saturated species name.
Definition: Saturated.H:67
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::interfaceCompositionModels::Saturated::wRatioByP
tmp< volScalarField > wRatioByP() const
Constant of proportionality between partial pressure and mass.
Definition: Saturated.C:35
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::interfaceCompositionModels::Saturated::saturationModel_
autoPtr< saturationModel > saturationModel_
Saturation pressure model.
Definition: Saturated.H:73
Foam::interfaceCompositionModels::Saturated::~Saturated
virtual ~Saturated()
Destructor.
Definition: Saturated.C:84