FreeFOAM The Cross-Platform CFD Toolkit
phaseChangeTwoPhaseMixture.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) 1991-2010 OpenCFD Ltd.
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::phaseChangeTwoPhaseMixture
26 
27 Description
28 
29 SourceFiles
30  phaseChangeTwoPhaseMixture.C
31  newPhaseChangeModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef phaseChangeTwoPhaseMixture_H
36 #define phaseChangeTwoPhaseMixture_H
37 
39 #include <OpenFOAM/typeInfo.H>
41 #include <finiteVolume/volFields.H>
43 #include <OpenFOAM/autoPtr.H>
44 #include <OpenFOAM/Pair.H>
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class phaseChangeTwoPhaseMixture Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public twoPhaseMixture
58 {
59 
60 protected:
61 
62  // Protected data
63 
65 
66  //- Saturation vapour pressure
68 
69 
70  // Private Member Functions
71 
72  //- Disallow copy construct
74 
75  //- Disallow default bitwise assignment
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("phaseChangeTwoPhaseMixture");
83 
84 
85  // Declare run-time constructor selection table
86 
88  (
89  autoPtr,
91  components,
92  (
93  const volVectorField& U,
94  const surfaceScalarField& phi,
95  const word& alpha1Name
96  ),
97  (U, phi, alpha1Name)
98  );
99 
100 
101  // Selectors
102 
103  //- Return a reference to the selected phaseChange model
105  (
106  const volVectorField& U,
107  const surfaceScalarField& phi,
108  const word& alpha1Name = "alpha1"
109  );
110 
111 
112  // Constructors
113 
114  //- Construct from components
116  (
117  const word& type,
118  const volVectorField& U,
119  const surfaceScalarField& phi,
120  const word& alpha1Name = "alpha1"
121  );
122 
123 
124  // Destructor
125 
127  {}
128 
129 
130  // Member Functions
131 
132  //- Return const-access to the saturation vapour pressure
133  const dimensionedScalar& pSat() const
134  {
135  return pSat_;
136  }
137 
138  //- Return the mass condensation and vaporisation rates as a
139  // coefficient to multiply (1 - alphal) for the condensation rate
140  // and a coefficient to multiply alphal for the vaporisation rate
141  virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
142 
143  //- Return the mass condensation and vaporisation rates as an
144  // explicit term for the condensation rate and a coefficient to
145  // multiply (p - pSat) for the vaporisation rate
146  virtual Pair<tmp<volScalarField> > mDotP() const = 0;
147 
148  //- Return the volumetric condensation and vaporisation rates as a
149  // coefficient to multiply (1 - alphal) for the condensation rate
150  // and a coefficient to multiply alphal for the vaporisation rate
152 
153  //- Return the volumetric condensation and vaporisation rates as an
154  // explicit term for the condensation rate and a coefficient to
155  // multiply (p - pSat) for the vaporisation rate
157 
158  //- Correct the phaseChange model
159  virtual void correct() = 0;
160 
161  //- Read the transportProperties dictionary and update
162  virtual bool read() = 0;
163 };
164 
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 } // End namespace Foam
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************ vim: set sw=4 sts=4 et: ************************ //