Raoult.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::Raoult
26 
27 Description
28  Raoult's law of ideal mixing. A separate composition model is given for
29  each species. The composition of a species is equal to the value given by
30  the model scaled by the species fraction in the bulk of the other phase.
31 
32 SourceFiles
33  Raoult.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef Raoult_H
38 #define Raoult_H
39 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class phasePair;
48 
49 namespace interfaceCompositionModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class Raoult Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class Thermo, class OtherThermo>
57 class Raoult
58 :
59  public InterfaceCompositionModel<Thermo, OtherThermo>
60 {
61 private:
62 
63  // Private data
64 
65  //- Non-vapour species fraction
66  volScalarField YNonVapour_;
67 
68  //- Non-vapour species fraction derivative w.r.t. temperature
69  volScalarField YNonVapourPrime_;
70 
71  //- Species' individual composition models
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("Raoult");
79 
80  // Constructors
81 
82  //- Construct from components
83  Raoult
84  (
85  const dictionary& dict,
86  const phasePair& pair
87  );
88 
89 
90  //- Destructor
91  virtual ~Raoult();
92 
93 
94  // Member Functions
95 
96  //- Update the composition
97  virtual void update(const volScalarField& Tf);
98 
99  //- The interface species fraction
100  virtual tmp<volScalarField> Yf
101  (
102  const word& speciesName,
103  const volScalarField& Tf
104  ) const;
105 
106  //- The interface species fraction derivative w.r.t. temperature
108  (
109  const word& speciesName,
110  const volScalarField& Tf
111  ) const;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace interfaceCompositionModels
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #ifdef NoRepository
123 # include "Raoult.C"
124 #endif
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
An STL-conforming hash table.
Definition: HashTable.H:61
A class for handling words, derived from string.
Definition: word.H:59
TypeName("Raoult")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
dictionary dict
Raoult(const dictionary &dict, const phasePair &pair)
Construct from components.
Base class for interface composition models, templated on the two thermodynamic models either side of...
A class for managing temporary objects.
Definition: PtrList.H:118
virtual void update(const volScalarField &Tf)
Update the composition.