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 | 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::Raoult
28 
29 Description
30  Raoult's law of ideal mixing. A separate composition model is given for
31  each species. The composition of a species is equal to the value given by
32  the model scaled by the species fraction in the bulk of the other phase.
33 
34 SourceFiles
35  Raoult.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Raoult_H
40 #define Raoult_H
41 
42 #include "InterfaceCompositionModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class phasePair;
50 
51 namespace interfaceCompositionModels
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class Raoult Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Thermo, class OtherThermo>
59 class Raoult
60 :
61  public InterfaceCompositionModel<Thermo, OtherThermo>
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() = default;
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 // ************************************************************************* //
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::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::interfaceCompositionModels::Raoult::YfPrime
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Definition: Raoult.C:132
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::interfaceCompositionModels::Raoult::Raoult
Raoult(const dictionary &dict, const phasePair &pair)
Construct from components.
Definition: Raoult.C:34
Foam::interfaceCompositionModel::pair
const phasePair & pair() const
The phase pair.
Definition: interfaceCompositionModel.C:122
Foam::interfaceCompositionModels::Raoult::update
virtual void update(const volScalarField &Tf)
Update the composition.
Definition: Raoult.C:85
Foam::interfaceCompositionModels::Raoult::Yf
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Definition: Raoult.C:109
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::interfaceCompositionModels::Raoult
Raoult's law of ideal mixing. A separate composition model is given for each species....
Definition: Raoult.H:58
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Raoult.C
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::interfaceCompositionModels::Raoult::~Raoult
virtual ~Raoult()=default
Destructor.
Foam::interfaceCompositionModels::Raoult::TypeName
TypeName("Raoult")
Runtime type information.