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

phaseModel.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::phaseModel
00026 
00027 SourceFiles
00028     phaseModel.C
00029 
00030 \*---------------------------------------------------------------------------*/
00031 
00032 #ifndef phaseModel_H
00033 #define phaseModel_H
00034 
00035 #include <OpenFOAM/dictionary.H>
00036 #include <OpenFOAM/dimensionedScalar.H>
00037 #include <finiteVolume/volFields.H>
00038 #include <finiteVolume/surfaceFields.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                            Class phaseModel Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 class phaseModel
00050 {
00051     // Private data
00052 
00053         dictionary dict_;
00054 
00055         //- Name of phase
00056         word name_;
00057 
00058         //- Characteristic diameter of phase
00059         dimensionedScalar d_;
00060 
00061         //- kinematic viscosity
00062         dimensionedScalar nu_;
00063 
00064         //- density
00065         dimensionedScalar rho_;
00066 
00067         //- Velocity
00068         volVectorField U_;
00069 
00070         //- Fluxes
00071         autoPtr<surfaceScalarField> phiPtr_;
00072 
00073 
00074 public:
00075 
00076     // Constructors
00077 
00078         phaseModel
00079         (
00080             const fvMesh& mesh,
00081             const dictionary& transportProperties,
00082             const word& phaseName
00083         );
00084 
00085 
00086     // Selectors
00087 
00088         //- Return a reference to the selected turbulence model
00089         static autoPtr<phaseModel> New
00090         (
00091             const fvMesh& mesh,
00092             const dictionary& transportProperties,
00093             const word& phaseName
00094         );
00095 
00096 
00097     //- Destructor
00098     virtual ~phaseModel();
00099 
00100 
00101     // Member Functions
00102 
00103         const word& name() const
00104         {
00105             return name_;
00106         }
00107 
00108         const dimensionedScalar& d() const
00109         {
00110             return d_;
00111         }
00112 
00113         const dimensionedScalar& nu() const
00114         {
00115             return nu_;
00116         }
00117 
00118         const dimensionedScalar& rho() const
00119         {
00120             return rho_;
00121         }
00122 
00123         const volVectorField& U() const
00124         {
00125             return U_;
00126         }
00127 
00128         volVectorField& U()
00129         {
00130             return U_;
00131         }
00132 
00133         const surfaceScalarField& phi() const
00134         {
00135             return phiPtr_();
00136         }
00137 
00138         surfaceScalarField& phi()
00139         {
00140             return phiPtr_();
00141         }
00142 };
00143 
00144 
00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00146 
00147 } // End namespace Foam
00148 
00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00150 
00151 #endif
00152 
00153 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines