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-2016 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 data
62 
63  //- Non-vapour species fraction
64  volScalarField YNonVapour_;
65 
66  //- Non-vapour species fraction derivative w.r.t. temperature
67  volScalarField YNonVapourPrime_;
68 
69  //- Species' individual composition models
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("Raoult");
77 
78  // Constructors
79 
80  //- Construct from components
81  Raoult
82  (
83  const dictionary& dict,
84  const phasePair& pair
85  );
86 
87 
88  //- Destructor
89  virtual ~Raoult();
90 
91 
92  // Member Functions
93 
94  //- Update the composition
95  virtual void update(const volScalarField& Tf);
96 
97  //- The interface species fraction
98  virtual tmp<volScalarField> Yf
99  (
100  const word& speciesName,
101  const volScalarField& Tf
102  ) const;
103 
104  //- The interface species fraction derivative w.r.t. temperature
106  (
107  const word& speciesName,
108  const volScalarField& Tf
109  ) const;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace interfaceCompositionModels
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #ifdef NoRepository
121  #include "Raoult.C"
122 #endif
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Base class for interface composition models, templated on the two thermodynamic models either side of...
virtual void update(const volScalarField &Tf)
Update the composition.
A class for handling words, derived from string.
Definition: word.H:59
An STL-conforming hash table.
Definition: HashTable.H:62
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Raoult(const dictionary &dict, const phasePair &pair)
Construct from components.
TypeName("Raoult")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Namespace for OpenFOAM.