NonRandomTwoLiquid.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::NonRandomTwoLiquid
26 
27 Description
28  Non ideal law for the mixing of two species. A separate composition model
29  is given for each species. The composition of a species is equal to the
30  value given by the model, scaled by the species fraction in the bulk of the
31  other phase, and multiplied by the activity coefficient for that species.
32  The gas behaviour is assumed ideal; i.e. the fugacity coefficient is taken
33  as equal to 1.
34 
35 SourceFiles
36  NonRandomTwoLiquid.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef NonRandomTwoLiquid_H
41 #define NonRandomTwoLiquid_H
42 
44 #include "saturationModel.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 class phasePair;
52 
53 namespace interfaceCompositionModels
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class NonRandomTwoLiquid Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class Thermo, class OtherThermo>
62 :
63  public InterfaceCompositionModel<Thermo, OtherThermo>
64 {
65 private:
66 
67  // Private data
68 
69  //- Activity coefficient for species 1
71 
72  //- Activity coefficient for species 2
74 
75  //- Name of species 1
77 
78  //- Name of species 2
80 
81  //- Indiex of species 1 within this thermo
83 
84  //- Indiex of species 2 within this thermo
86 
87  //- Non-randomness constant parameter for species 1
89 
90  //- Non-randomness constant parameter for species 2
92 
93  //- Non-randomness linear paramater for species 1
95 
96  //- Non-randomness linear paramater for species 2
98 
99  //- Interaction parameter model for species 1
101 
102  //- Interaction parameter model for species 2
104 
105  //- Composition model for species 1
107 
108  //- Composition model for species 2
110 
111 
112 public:
113 
114  //- Runtime type information
115  TypeName("NonRandomTwoLiquid");
116 
117  // Constructors
118 
119  //- Construct from components
121  (
122  const dictionary& dict,
123  const phasePair& pair
124  );
125 
126 
127  //- Destructor
128  virtual ~NonRandomTwoLiquid();
129 
130 
131  // Member Functions
132 
133  //- Update the composition
134  virtual void update(const volScalarField& Tf);
135 
136  //- The interface species fraction
137  virtual tmp<volScalarField> Yf
138  (
139  const word& speciesName,
140  const volScalarField& Tf
141  ) const;
142 
143  //- The interface species fraction derivative w.r.t. temperature
145  (
146  const word& speciesName,
147  const volScalarField& Tf
148  ) const;
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace interfaceCompositionModels
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #ifdef NoRepository
160 # include "NonRandomTwoLiquid.C"
161 #endif
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
Foam::phasePair
Definition: phasePair.H:49
Foam::InterfaceCompositionModel
Base class for interface composition models, templated on the two thermodynamic models either side of...
Definition: InterfaceCompositionModel.H:55
Foam::interfaceCompositionModels::NonRandomTwoLiquid::NonRandomTwoLiquid
NonRandomTwoLiquid(const dictionary &dict, const phasePair &pair)
Construct from components.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::interfaceCompositionModels::NonRandomTwoLiquid::TypeName
TypeName("NonRandomTwoLiquid")
Runtime type information.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::interfaceCompositionModels::NonRandomTwoLiquid::update
virtual void update(const volScalarField &Tf)
Update the composition.
Foam::interfaceCompositionModels::NonRandomTwoLiquid::species1Index_
label species1Index_
Indiex of species 1 within this thermo.
Definition: NonRandomTwoLiquid.H:81
Foam::interfaceCompositionModels::NonRandomTwoLiquid::alpha12_
dimensionedScalar alpha12_
Non-randomness constant parameter for species 1.
Definition: NonRandomTwoLiquid.H:87
Foam::interfaceCompositionModels::NonRandomTwoLiquid::species1Name_
word species1Name_
Name of species 1.
Definition: NonRandomTwoLiquid.H:75
Foam::interfaceCompositionModels::NonRandomTwoLiquid
Definition: NonRandomTwoLiquid.H:60
Foam::interfaceCompositionModels::NonRandomTwoLiquid::species2Name_
word species2Name_
Name of species 2.
Definition: NonRandomTwoLiquid.H:78
Foam::interfaceCompositionModels::NonRandomTwoLiquid::saturationModel21_
autoPtr< saturationModel > saturationModel21_
Interaction parameter model for species 2.
Definition: NonRandomTwoLiquid.H:102
saturationModel.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::interfaceCompositionModels::NonRandomTwoLiquid::gamma2_
volScalarField gamma2_
Activity coefficient for species 2.
Definition: NonRandomTwoLiquid.H:72
Foam::interfaceCompositionModels::NonRandomTwoLiquid::speciesModel1_
autoPtr< interfaceCompositionModel > speciesModel1_
Composition model for species 1.
Definition: NonRandomTwoLiquid.H:105
Foam::interfaceCompositionModels::NonRandomTwoLiquid::beta12_
dimensionedScalar beta12_
Non-randomness linear paramater for species 1.
Definition: NonRandomTwoLiquid.H:93
Foam::interfaceCompositionModels::NonRandomTwoLiquid::species2Index_
label species2Index_
Indiex of species 2 within this thermo.
Definition: NonRandomTwoLiquid.H:84
InterfaceCompositionModel.H
NonRandomTwoLiquid.C
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::interfaceCompositionModels::NonRandomTwoLiquid::YfPrime
virtual tmp< volScalarField > YfPrime(const word &speciesName, const volScalarField &Tf) const
The interface species fraction derivative w.r.t. temperature.
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::interfaceCompositionModels::NonRandomTwoLiquid::speciesModel2_
autoPtr< interfaceCompositionModel > speciesModel2_
Composition model for species 2.
Definition: NonRandomTwoLiquid.H:108
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::interfaceCompositionModels::NonRandomTwoLiquid::alpha21_
dimensionedScalar alpha21_
Non-randomness constant parameter for species 2.
Definition: NonRandomTwoLiquid.H:90
Foam::interfaceCompositionModels::NonRandomTwoLiquid::gamma1_
volScalarField gamma1_
Activity coefficient for species 1.
Definition: NonRandomTwoLiquid.H:69
Foam::interfaceCompositionModels::NonRandomTwoLiquid::~NonRandomTwoLiquid
virtual ~NonRandomTwoLiquid()
Destructor.
Foam::interfaceCompositionModels::NonRandomTwoLiquid::beta21_
dimensionedScalar beta21_
Non-randomness linear paramater for species 2.
Definition: NonRandomTwoLiquid.H:96
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::interfaceCompositionModels::NonRandomTwoLiquid::Yf
virtual tmp< volScalarField > Yf(const word &speciesName, const volScalarField &Tf) const
The interface species fraction.
Foam::interfaceCompositionModels::NonRandomTwoLiquid::saturationModel12_
autoPtr< saturationModel > saturationModel12_
Interaction parameter model for species 1.
Definition: NonRandomTwoLiquid.H:99