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

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