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) 2011-2013 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::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 "typeInfo.H"
40 #include "runTimeSelectionTables.H"
41 #include "volFields.H"
42 #include "dimensionedScalar.H"
43 #include "autoPtr.H"
44 #include "Pair.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class phaseChangeTwoPhaseMixture Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
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  ),
96  (U, phi)
97  );
98 
99 
100  // Selectors
101 
102  //- Return a reference to the selected phaseChange model
104  (
105  const volVectorField& U,
106  const surfaceScalarField& phi
107  );
108 
109 
110  // Constructors
111 
112  //- Construct from components
114  (
115  const word& type,
116  const volVectorField& U,
117  const surfaceScalarField& phi
118  );
119 
120 
121  //- Destructor
123  {}
124 
125 
126  // Member Functions
127 
128  //- Return const-access to the saturation vapour pressure
129  const dimensionedScalar& pSat() const
130  {
131  return pSat_;
132  }
133 
134  //- Return the mass condensation and vaporisation rates as a
135  // coefficient to multiply (1 - alphal) for the condensation rate
136  // and a coefficient to multiply alphal for the vaporisation rate
137  virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
138 
139  //- Return the mass condensation and vaporisation rates as coefficients
140  // to multiply (p - pSat)
141  virtual Pair<tmp<volScalarField> > mDotP() const = 0;
142 
143  //- Return the volumetric condensation and vaporisation rates as a
144  // coefficient to multiply (1 - alphal) for the condensation rate
145  // and a coefficient to multiply alphal for the vaporisation rate
147 
148  //- Return the volumetric condensation and vaporisation rates as
149  // coefficients to multiply (p - pSat)
151 
152  //- Correct the phaseChange model
153  virtual void correct() = 0;
154 
155  //- Read the transportProperties dictionary and update
156  virtual bool read() = 0;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
volFields.H
Foam::phaseChangeTwoPhaseMixture::pSat
const dimensionedScalar & pSat() const
Return const-access to the saturation vapour pressure.
Definition: phaseChangeTwoPhaseMixture.H:128
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
typeInfo.H
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::phaseChangeTwoPhaseMixture::vDotP
Pair< tmp< volScalarField > > vDotP() const
Return the volumetric condensation and vaporisation rates as.
incompressibleTwoPhaseMixture.H
Pair.H
Foam::phaseChangeTwoPhaseMixture::pSat_
dimensionedScalar pSat_
Saturation vapour pressure.
Definition: phaseChangeTwoPhaseMixture.H:66
Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixtureCoeffs_
dictionary phaseChangeTwoPhaseMixtureCoeffs_
Definition: phaseChangeTwoPhaseMixture.H:63
Foam::phaseChangeTwoPhaseMixture::read
virtual bool read()=0
Read the transportProperties dictionary and update.
Foam::phaseChangeTwoPhaseMixture::TypeName
TypeName("phaseChangeTwoPhaseMixture")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::phaseChangeTwoPhaseMixture
Definition: phaseChangeTwoPhaseMixture.H:54
Foam::incompressibleTwoPhaseMixture
A two-phase incompressible transportModel.
Definition: incompressibleTwoPhaseMixture.H:52
Foam::phaseChangeTwoPhaseMixture::mDotP
virtual Pair< tmp< volScalarField > > mDotP() const =0
Return the mass condensation and vaporisation rates as coefficients.
dimensionedScalar.H
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::phaseChangeTwoPhaseMixture::correct
virtual void correct()=0
Correct the phaseChange model.
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::phaseChangeTwoPhaseMixture::operator=
void operator=(const phaseChangeTwoPhaseMixture &)
Disallow default bitwise assignment.
Foam::phaseChangeTwoPhaseMixture::vDotAlphal
Pair< tmp< volScalarField > > vDotAlphal() const
Return the volumetric condensation and vaporisation rates as a.
Foam::incompressibleTwoPhaseMixture::U
const volVectorField & U() const
Return const-access to the mixture velocity.
Definition: incompressibleTwoPhaseMixture.H:127
Foam::phaseChangeTwoPhaseMixture::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, phaseChangeTwoPhaseMixture, components,(const volVectorField &U, const surfaceScalarField &phi),(U, phi))
Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
phaseChangeTwoPhaseMixture(const phaseChangeTwoPhaseMixture &)
Disallow copy construct.
Foam::phaseChangeTwoPhaseMixture::New
static autoPtr< phaseChangeTwoPhaseMixture > New(const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected phaseChange model.
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::phaseChangeTwoPhaseMixture::mDotAlphal
virtual Pair< tmp< volScalarField > > mDotAlphal() const =0
Return the mass condensation and vaporisation rates as a.
Foam::phaseChangeTwoPhaseMixture::~phaseChangeTwoPhaseMixture
virtual ~phaseChangeTwoPhaseMixture()
Destructor.
Definition: phaseChangeTwoPhaseMixture.H:121
autoPtr.H