1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::phaseChangeTwoPhaseMixture
31 phaseChangeTwoPhaseMixture.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef phaseChangeTwoPhaseMixture_H
37 #define phaseChangeTwoPhaseMixture_H
39 #include "twoPhaseMixture.H"
41 #include "runTimeSelectionTables.H"
42 #include "volFields.H"
43 #include "dimensionedScalar.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class phaseChangeTwoPhaseMixture Declaration
54 \*---------------------------------------------------------------------------*/
56 class phaseChangeTwoPhaseMixture
58 public twoPhaseMixture
65 dictionary phaseChangeTwoPhaseMixtureCoeffs_;
67 //- Saturation vapour pressure
68 dimensionedScalar pSat_;
71 // Private Member Functions
73 //- Disallow copy construct
74 phaseChangeTwoPhaseMixture(const phaseChangeTwoPhaseMixture&);
76 //- Disallow default bitwise assignment
77 void operator=(const phaseChangeTwoPhaseMixture&);
82 //- Runtime type information
83 TypeName("phaseChangeTwoPhaseMixture");
86 // Declare run-time constructor selection table
88 declareRunTimeSelectionTable
91 phaseChangeTwoPhaseMixture,
94 const volVectorField& U,
95 const surfaceScalarField& phi,
96 const word& alpha1Name
104 //- Return a reference to the selected phaseChange model
105 static autoPtr<phaseChangeTwoPhaseMixture> New
107 const volVectorField& U,
108 const surfaceScalarField& phi,
109 const word& alpha1Name = "alpha1"
115 //- Construct from components
116 phaseChangeTwoPhaseMixture
119 const volVectorField& U,
120 const surfaceScalarField& phi,
121 const word& alpha1Name = "alpha1"
127 virtual ~phaseChangeTwoPhaseMixture()
133 //- Return const-access to the saturation vapour pressure
134 const dimensionedScalar& pSat() const
139 //- Return the mass condensation and vaporisation rates as a
140 // coefficient to multiply (1 - alphal) for the condensation rate
141 // and a coefficient to multiply alphal for the vaporisation rate
142 virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
144 //- Return the mass condensation and vaporisation rates as an
145 // explicit term for the condensation rate and a coefficient to
146 // multiply (p - pSat) for the vaporisation rate
147 virtual Pair<tmp<volScalarField> > mDotP() const = 0;
149 //- Return the volumetric condensation and vaporisation rates as a
150 // coefficient to multiply (1 - alphal) for the condensation rate
151 // and a coefficient to multiply alphal for the vaporisation rate
152 Pair<tmp<volScalarField> > vDotAlphal() const;
154 //- Return the volumetric condensation and vaporisation rates as an
155 // explicit term for the condensation rate and a coefficient to
156 // multiply (p - pSat) for the vaporisation rate
157 Pair<tmp<volScalarField> > vDotP() const;
159 //- Correct the phaseChange model
160 virtual void correct() = 0;
162 //- Read the transportProperties dictionary and update
163 virtual bool read() = 0;
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 // ************************************************************************* //