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

PDRDragModel.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::PDRDragModel
00026 
00027 Description
00028     Base-class for sub-grid obstacle drag models. The available drag model is at
00029     \link basic.H \endlink.
00030 
00031 SourceFiles
00032     PDRDragModel.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef PDRDragModel_H
00037 #define PDRDragModel_H
00038 
00039 #include <OpenFOAM/IOdictionary.H>
00040 #include <reactionThermophysicalModels/hhuCombustionThermo.H>
00041 #include <compressibleRASModels/RASModel.H>
00042 #include <finiteVolume/multivariateSurfaceInterpolationScheme.H>
00043 #include <OpenFOAM/runTimeSelectionTables.H>
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                           Class PDRDragModel Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class PDRDragModel
00055 :
00056     public regIOobject
00057 {
00058 
00059 protected:
00060 
00061     // Protected data
00062 
00063         dictionary PDRDragModelCoeffs_;
00064 
00065         const compressible::RASModel& turbulence_;
00066         const volScalarField& rho_;
00067         const volVectorField& U_;
00068         const surfaceScalarField& phi_;
00069 
00070         Switch on_;
00071 
00072 
00073 private:
00074 
00075     // Private Member Functions
00076 
00077         //- Disallow copy construct
00078         PDRDragModel(const PDRDragModel&);
00079 
00080         //- Disallow default bitwise assignment
00081         void operator=(const PDRDragModel&);
00082 
00083 
00084 public:
00085 
00086     //- Runtime type information
00087     TypeName("PDRDragModel");
00088 
00089 
00090     // Declare run-time constructor selection table
00091 
00092         declareRunTimeSelectionTable
00093         (
00094             autoPtr,
00095             PDRDragModel,
00096             dictionary,
00097             (
00098                 const dictionary& PDRProperties,
00099                 const compressible::RASModel& turbulence,
00100                 const volScalarField& rho,
00101                 const volVectorField& U,
00102                 const surfaceScalarField& phi
00103             ),
00104             (
00105                 PDRProperties,
00106                 turbulence,
00107                 rho,
00108                 U,
00109                 phi
00110             )
00111         );
00112 
00113 
00114     // Selectors
00115 
00116         //- Return a reference to the selected Xi model
00117         static autoPtr<PDRDragModel> New
00118         (
00119             const dictionary& PDRProperties,
00120             const compressible::RASModel& turbulence,
00121             const volScalarField& rho,
00122             const volVectorField& U,
00123             const surfaceScalarField& phi
00124         );
00125 
00126 
00127     // Constructors
00128 
00129         //- Construct from components
00130         PDRDragModel
00131         (
00132             const dictionary& PDRProperties,
00133             const compressible::RASModel& turbulence,
00134             const volScalarField& rho,
00135             const volVectorField& U,
00136             const surfaceScalarField& phi
00137         );
00138 
00139 
00140     // Destructor
00141 
00142         virtual ~PDRDragModel();
00143 
00144 
00145     // Member Functions
00146 
00147         //- Return true if the drag model is switched on
00148         bool on() const
00149         {
00150             return on_;
00151         }
00152 
00153         //- Return the momentum drag coefficient
00154         virtual tmp<volSymmTensorField> Dcu() const = 0;
00155 
00156         //- Return the momentum drag turbulence generation rate
00157         virtual tmp<volScalarField> Gk() const = 0;
00158 
00159         //- Update properties from given dictionary
00160         virtual bool read(const dictionary& PDRProperties) = 0;
00161 
00162         virtual bool writeData(Ostream&) const
00163         {
00164             return true;
00165         }
00166 };
00167 
00168 
00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00170 
00171 } // End namespace Foam
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 #endif
00176 
00177 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines