PDRDragModel.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::PDRDragModel
28
29Description
30 Base-class for sub-grid obstacle drag models. The available drag model is at
31 \link basic.H \endlink.
32
33SourceFiles
34 PDRDragModel.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef PDRDragModel_H
39#define PDRDragModel_H
40
41#include "IOdictionary.H"
42#include "psiuReactionThermo.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class PDRDragModel Declaration
54\*---------------------------------------------------------------------------*/
56class PDRDragModel
57:
58 public regIOobject
59{
60
61protected:
62
63 // Protected data
72 bool on_;
73
74
75private:
76
77 // Private Member Functions
78
79 //- No copy construct
80 PDRDragModel(const PDRDragModel&) = delete;
81
82 //- No copy assignment
83 void operator=(const PDRDragModel&) = delete;
84
85
86public:
87
88 //- Runtime type information
89 TypeName("PDRDragModel");
90
91
92 // Declare run-time constructor selection table
95 (
96 autoPtr,
99 (
100 const dictionary& PDRProperties,
101 const compressible::RASModel& turbulence,
102 const volScalarField& rho,
103 const volVectorField& U,
105 ),
106 (
107 PDRProperties,
108 turbulence,
109 rho,
110 U,
111 phi
112 )
113 );
114
115
116 // Selectors
117
118 //- Return a reference to the selected Xi model
120 (
121 const dictionary& PDRProperties,
122 const compressible::RASModel& turbulence,
123 const volScalarField& rho,
124 const volVectorField& U,
126 );
127
128
129 // Constructors
130
131 //- Construct from components
133 (
134 const dictionary& PDRProperties,
135 const compressible::RASModel& turbulence,
136 const volScalarField& rho,
137 const volVectorField& U,
139 );
140
141
142 //- Destructor
143 virtual ~PDRDragModel();
144
145
146 // Member Functions
147
148 //- Return true if the drag model is switched on
149 bool on() const
150 {
151 return on_;
152 }
153
154 //- Return the momentum drag coefficient
155 virtual tmp<volSymmTensorField> Dcu() const = 0;
156
157 //- Return the momentum drag turbulence generation rate
158 virtual tmp<volScalarField> Gk() const = 0;
159
160 //- Inherit read from regIOobject
161 using regIOobject::read;
162
163 //- Update properties from given dictionary
164 virtual bool read(const dictionary& PDRProperties) = 0;
166 virtual bool writeData(Ostream&) const
167 {
168 return true;
169 }
171 virtual void writeFields() const
172 {
174 }
175};
176
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180} // End namespace Foam
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184#endif
185
186// ************************************************************************* //
surfaceScalarField & phi
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Base-class for sub-grid obstacle drag models. The available drag model is at basic....
Definition: PDRDragModel.H:58
bool on() const
Return true if the drag model is switched on.
Definition: PDRDragModel.H:148
static autoPtr< PDRDragModel > New(const dictionary &PDRProperties, const compressible::RASModel &turbulence, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected Xi model.
virtual tmp< volSymmTensorField > Dcu() const =0
Return the momentum drag coefficient.
virtual ~PDRDragModel()
Destructor.
const surfaceScalarField & phi_
Definition: PDRDragModel.H:69
virtual bool read(const dictionary &PDRProperties)=0
Update properties from given dictionary.
PDRDragModel(const dictionary &PDRProperties, const compressible::RASModel &turbulence, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
const volVectorField & U_
Definition: PDRDragModel.H:68
dictionary PDRDragModelCoeffs_
Definition: PDRDragModel.H:64
TypeName("PDRDragModel")
Runtime type information.
virtual tmp< volScalarField > Gk() const =0
Return the momentum drag turbulence generation rate.
virtual bool writeData(Ostream &) const
Pure virtual writeData function.
Definition: PDRDragModel.H:165
const volScalarField & rho_
Definition: PDRDragModel.H:67
const compressible::RASModel & turbulence_
Definition: PDRDragModel.H:66
declareRunTimeSelectionTable(autoPtr, PDRDragModel, dictionary,(const dictionary &PDRProperties, const compressible::RASModel &turbulence, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi),(PDRProperties, turbulence, rho, U, phi))
virtual void writeFields() const
Definition: PDRDragModel.H:170
virtual bool read()
Inherit read from regIOobject.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:76
virtual bool read()
Read object.
A class for managing temporary objects.
Definition: tmp.H:65
U
Definition: pEqn.H:72
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
RASModel< EddyDiffusivity< turbulenceModel > > RASModel
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73