FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

phaseChangeTwoPhaseMixture.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::phaseChangeTwoPhaseMixture
00026 
00027 Description
00028 
00029 SourceFiles
00030     phaseChangeTwoPhaseMixture.C
00031     newPhaseChangeModel.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef phaseChangeTwoPhaseMixture_H
00036 #define phaseChangeTwoPhaseMixture_H
00037 
00038 #include <incompressibleTransportModels/twoPhaseMixture.H>
00039 #include <OpenFOAM/typeInfo.H>
00040 #include <OpenFOAM/runTimeSelectionTables.H>
00041 #include <finiteVolume/volFields.H>
00042 #include <OpenFOAM/dimensionedScalar.H>
00043 #include <OpenFOAM/autoPtr.H>
00044 #include <OpenFOAM/Pair.H>
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace Foam
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                 Class phaseChangeTwoPhaseMixture Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class phaseChangeTwoPhaseMixture
00056 :
00057     public twoPhaseMixture
00058 {
00059 
00060 protected:
00061 
00062     // Protected data
00063 
00064         dictionary phaseChangeTwoPhaseMixtureCoeffs_;
00065 
00066         //- Saturation vapour pressure
00067         dimensionedScalar pSat_;
00068 
00069 
00070     // Private Member Functions
00071 
00072         //- Disallow copy construct
00073         phaseChangeTwoPhaseMixture(const phaseChangeTwoPhaseMixture&);
00074 
00075         //- Disallow default bitwise assignment
00076         void operator=(const phaseChangeTwoPhaseMixture&);
00077 
00078 
00079 public:
00080 
00081     //- Runtime type information
00082     TypeName("phaseChangeTwoPhaseMixture");
00083 
00084 
00085     // Declare run-time constructor selection table
00086 
00087         declareRunTimeSelectionTable
00088         (
00089             autoPtr,
00090             phaseChangeTwoPhaseMixture,
00091             components,
00092             (
00093                 const volVectorField& U,
00094                 const surfaceScalarField& phi,
00095                 const word& alpha1Name
00096             ),
00097             (U, phi, alpha1Name)
00098         );
00099 
00100 
00101     // Selectors
00102 
00103         //- Return a reference to the selected phaseChange model
00104         static autoPtr<phaseChangeTwoPhaseMixture> New
00105         (
00106             const volVectorField& U,
00107             const surfaceScalarField& phi,
00108             const word& alpha1Name = "alpha1"
00109         );
00110 
00111 
00112     // Constructors
00113 
00114         //- Construct from components
00115         phaseChangeTwoPhaseMixture
00116         (
00117             const word& type,
00118             const volVectorField& U,
00119             const surfaceScalarField& phi,
00120             const word& alpha1Name = "alpha1"
00121         );
00122 
00123 
00124     // Destructor
00125 
00126         virtual ~phaseChangeTwoPhaseMixture()
00127         {}
00128 
00129 
00130     // Member Functions
00131 
00132         //- Return const-access to the saturation vapour pressure
00133         const dimensionedScalar& pSat() const
00134         {
00135             return pSat_;
00136         }
00137 
00138         //- Return the mass condensation and vaporisation rates as a
00139         //  coefficient to multiply (1 - alphal) for the condensation rate
00140         //  and a coefficient to multiply  alphal for the vaporisation rate
00141         virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
00142 
00143         //- Return the mass condensation and vaporisation rates as an
00144         //  explicit term for the condensation rate and a coefficient to
00145         //  multiply (p - pSat) for the vaporisation rate
00146         virtual Pair<tmp<volScalarField> > mDotP() const = 0;
00147 
00148         //- Return the volumetric condensation and vaporisation rates as a
00149         //  coefficient to multiply (1 - alphal) for the condensation rate
00150         //  and a coefficient to multiply  alphal for the vaporisation rate
00151         Pair<tmp<volScalarField> > vDotAlphal() const;
00152 
00153         //- Return the volumetric condensation and vaporisation rates as an
00154         //  explicit term for the condensation rate and a coefficient to
00155         //  multiply (p - pSat) for the vaporisation rate
00156         Pair<tmp<volScalarField> > vDotP() const;
00157 
00158         //- Correct the phaseChange model
00159         virtual void correct() = 0;
00160 
00161         //- Read the transportProperties dictionary and update
00162         virtual bool read() = 0;
00163 };
00164 
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 } // End namespace Foam
00169 
00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00171 
00172 #endif
00173 
00174 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines