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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::interfaceCompositionModels::Raoult
28
29Description
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
34SourceFiles
35 Raoult.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef Raoult_H
40#define Raoult_H
41
42#include "InterfaceCompositionModel.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49class phasePair;
50
51namespace interfaceCompositionModels
52{
53
54/*---------------------------------------------------------------------------*\
55 Class Raoult Declaration
56\*---------------------------------------------------------------------------*/
57
58template<class Thermo, class OtherThermo>
59class 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
75public:
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// ************************************************************************* //
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
Base class for interface composition models, templated on the two thermodynamic models either side of...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Raoult's law of ideal mixing. A separate composition model is given for each species....
Definition: Raoult.H:61
TypeName("Raoult")
Runtime type information.
virtual ~Raoult()=default
Destructor.
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Definition: Raoult.C:109
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Definition: Raoult.C:132
const phasePair & pair() const
The phase pair.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
mesh update()
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73