initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / multiphase / interPhaseChangeFoam / phaseChangeTwoPhaseMixtures / phaseChangeTwoPhaseMixture / phaseChangeTwoPhaseMixture.H
blob63944d39d12cd2668f9ab0e7166731a8e8f7fea5
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::phaseChangeTwoPhaseMixture
28 Description
30 SourceFiles
31     phaseChangeTwoPhaseMixture.C
32     newPhaseChangeModel.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef phaseChangeTwoPhaseMixture_H
37 #define phaseChangeTwoPhaseMixture_H
39 #include "twoPhaseMixture.H"
40 #include "typeInfo.H"
41 #include "runTimeSelectionTables.H"
42 #include "volFields.H"
43 #include "dimensionedScalar.H"
44 #include "autoPtr.H"
45 #include "Pair.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 /*---------------------------------------------------------------------------*\
53                 Class phaseChangeTwoPhaseMixture Declaration
54 \*---------------------------------------------------------------------------*/
56 class phaseChangeTwoPhaseMixture
58     public twoPhaseMixture
61 protected:
63     // Protected data
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&);
80 public:
82     //- Runtime type information
83     TypeName("phaseChangeTwoPhaseMixture");
86     // Declare run-time constructor selection table
88         declareRunTimeSelectionTable
89         (
90             autoPtr,
91             phaseChangeTwoPhaseMixture,
92             components,
93             (
94                 const volVectorField& U,
95                 const surfaceScalarField& phi,
96                 const word& alpha1Name
97             ),
98             (U, phi, alpha1Name)
99         );
102     // Selectors
104         //- Return a reference to the selected phaseChange model
105         static autoPtr<phaseChangeTwoPhaseMixture> New
106         (
107             const volVectorField& U,
108             const surfaceScalarField& phi,
109             const word& alpha1Name = "alpha1"
110         );
113     // Constructors
115         //- Construct from components
116         phaseChangeTwoPhaseMixture
117         (
118             const word& type,
119             const volVectorField& U,
120             const surfaceScalarField& phi,
121             const word& alpha1Name = "alpha1"
122         );
125     // Destructor
127         virtual ~phaseChangeTwoPhaseMixture()
128         {}
131     // Member Functions
133         //- Return const-access to the saturation vapour pressure
134         const dimensionedScalar& pSat() const
135         {
136             return pSat_;
137         }
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #endif
175 // ************************************************************************* //