PDRDragModel.C
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-2017 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
26\*---------------------------------------------------------------------------*/
27
28#include "PDRDragModel.H"
29
30// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31
32namespace Foam
33{
34 defineTypeNameAndDebug(PDRDragModel, 0);
35 defineRunTimeSelectionTable(PDRDragModel, dictionary);
36};
37
38
39// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
40
42(
43 const dictionary& PDRProperties,
44 const compressible::RASModel& turbulence,
45 const volScalarField& rho,
46 const volVectorField& U,
47 const surfaceScalarField& phi
48)
49:
50 regIOobject
51 (
52 IOobject
53 (
54 "PDRDragModel",
55 U.time().constant(),
56 U.db()
57 )
58 ),
59 PDRDragModelCoeffs_
60 (
61 PDRProperties.subDict
62 (
63 PDRProperties.get<word>("PDRDragModel") + "Coeffs"
64 )
65 ),
66 turbulence_(turbulence),
67 rho_(rho),
68 U_(U),
69 phi_(phi),
70 on_(PDRDragModelCoeffs_.get<bool>("drag"))
71{}
72
73
74// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
75
77{}
78
79
80// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
81
82bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
83{
84 PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
85
86 PDRDragModelCoeffs_.readEntry("drag", on_);
87
88 return true;
89}
90
91
92// ************************************************************************* //
surfaceScalarField & phi
Base-class for sub-grid obstacle drag models. The available drag model is at basic....
Definition: PDRDragModel.H:58
virtual ~PDRDragModel()
Destructor.
virtual bool read()
Inherit read from regIOobject.
constant condensation/saturation model.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
U
Definition: pEqn.H:72
bool
Definition: EEqn.H:20
compressible::turbulenceModel & turbulence
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.