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

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