1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Base-class for sub-grid obstacle drag models.
34 \*---------------------------------------------------------------------------*/
36 #ifndef PDRDragModel_H
37 #define PDRDragModel_H
39 #include "IOdictionary.H"
40 #include "hhuCombustionThermo.H"
42 #include "multivariateSurfaceInterpolationScheme.H"
43 #include "runTimeSelectionTables.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class PDRDragModel Declaration
52 \*---------------------------------------------------------------------------*/
63 dictionary PDRDragModelCoeffs_;
65 const compressible::RASModel& turbulence_;
66 const volScalarField& rho_;
67 const volVectorField& U_;
68 const surfaceScalarField& phi_;
75 // Private Member Functions
77 //- Disallow copy construct
78 PDRDragModel(const PDRDragModel&);
80 //- Disallow default bitwise assignment
81 void operator=(const PDRDragModel&);
86 //- Runtime type information
87 TypeName("PDRDragModel");
90 // Declare run-time constructor selection table
92 declareRunTimeSelectionTable
98 const dictionary& PDRProperties,
99 const compressible::RASModel& turbulence,
100 const volScalarField& rho,
101 const volVectorField& U,
102 const surfaceScalarField& phi
116 //- Return a reference to the selected Xi model
117 static autoPtr<PDRDragModel> New
119 const dictionary& PDRProperties,
120 const compressible::RASModel& turbulence,
121 const volScalarField& rho,
122 const volVectorField& U,
123 const surfaceScalarField& phi
129 //- Construct from components
132 const dictionary& PDRProperties,
133 const compressible::RASModel& turbulence,
134 const volScalarField& rho,
135 const volVectorField& U,
136 const surfaceScalarField& phi
142 virtual ~PDRDragModel();
147 //- Return true if the drag model is switched on
153 //- Return the momentum drag coefficient
154 virtual tmp<volSymmTensorField> Dcu() const = 0;
156 //- Return the momentum drag turbulence generation rate
157 virtual tmp<volScalarField> Gk() const = 0;
159 //- Update properties from given dictionary
160 virtual bool read(const dictionary& PDRProperties) = 0;
162 virtual bool writeData(Ostream&) const
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 // ************************************************************************* //