OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::phaseChangeTwoPhaseMixture
00027 
00028 Description
00029 
00030 SourceFiles
00031     phaseChangeTwoPhaseMixture.C
00032     newPhaseChangeModel.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef phaseChangeTwoPhaseMixture_H
00037 #define phaseChangeTwoPhaseMixture_H
00038 
00039 #include "twoPhaseMixture.H"
00040 #include "typeInfo.H"
00041 #include "runTimeSelectionTables.H"
00042 #include "volFields.H"
00043 #include "dimensionedScalar.H"
00044 #include "autoPtr.H"
00045 #include "Pair.H"
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace Foam
00050 {
00051 
00052 /*---------------------------------------------------------------------------*\
00053                 Class phaseChangeTwoPhaseMixture Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class phaseChangeTwoPhaseMixture
00057 :
00058     public twoPhaseMixture
00059 {
00060 
00061 protected:
00062 
00063     // Protected data
00064 
00065         dictionary phaseChangeTwoPhaseMixtureCoeffs_;
00066 
00067         //- Saturation vapour pressure
00068         dimensionedScalar pSat_;
00069 
00070 
00071     // Private Member Functions
00072 
00073         //- Disallow copy construct
00074         phaseChangeTwoPhaseMixture(const phaseChangeTwoPhaseMixture&);
00075 
00076         //- Disallow default bitwise assignment
00077         void operator=(const phaseChangeTwoPhaseMixture&);
00078 
00079 
00080 public:
00081 
00082     //- Runtime type information
00083     TypeName("phaseChangeTwoPhaseMixture");
00084 
00085 
00086     // Declare run-time constructor selection table
00087 
00088         declareRunTimeSelectionTable
00089         (
00090             autoPtr,
00091             phaseChangeTwoPhaseMixture,
00092             components,
00093             (
00094                 const volVectorField& U,
00095                 const surfaceScalarField& phi,
00096                 const word& alpha1Name
00097             ),
00098             (U, phi, alpha1Name)
00099         );
00100 
00101 
00102     // Selectors
00103 
00104         //- Return a reference to the selected phaseChange model
00105         static autoPtr<phaseChangeTwoPhaseMixture> New
00106         (
00107             const volVectorField& U,
00108             const surfaceScalarField& phi,
00109             const word& alpha1Name = "alpha1"
00110         );
00111 
00112 
00113     // Constructors
00114 
00115         //- Construct from components
00116         phaseChangeTwoPhaseMixture
00117         (
00118             const word& type,
00119             const volVectorField& U,
00120             const surfaceScalarField& phi,
00121             const word& alpha1Name = "alpha1"
00122         );
00123 
00124 
00125     // Destructor
00126 
00127         virtual ~phaseChangeTwoPhaseMixture()
00128         {}
00129 
00130 
00131     // Member Functions
00132 
00133         //- Return const-access to the saturation vapour pressure
00134         const dimensionedScalar& pSat() const
00135         {
00136             return pSat_;
00137         }
00138 
00139         //- Return the mass condensation and vaporisation rates as a
00140         //  coefficient to multiply (1 - alphal) for the condensation rate
00141         //  and a coefficient to multiply  alphal for the vaporisation rate
00142         virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
00143 
00144         //- Return the mass condensation and vaporisation rates as an
00145         //  explicit term for the condensation rate and a coefficient to
00146         //  multiply (p - pSat) for the vaporisation rate
00147         virtual Pair<tmp<volScalarField> > mDotP() const = 0;
00148 
00149         //- Return the volumetric condensation and vaporisation rates as a
00150         //  coefficient to multiply (1 - alphal) for the condensation rate
00151         //  and a coefficient to multiply  alphal for the vaporisation rate
00152         Pair<tmp<volScalarField> > vDotAlphal() const;
00153 
00154         //- Return the volumetric condensation and vaporisation rates as an
00155         //  explicit term for the condensation rate and a coefficient to
00156         //  multiply (p - pSat) for the vaporisation rate
00157         Pair<tmp<volScalarField> > vDotP() const;
00158 
00159         //- Correct the phaseChange model
00160         virtual void correct() = 0;
00161 
00162         //- Read the transportProperties dictionary and update
00163         virtual bool read() = 0;
00164 };
00165 
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00168 
00169 } // End namespace Foam
00170 
00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00172 
00173 #endif
00174 
00175 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd