1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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
25 \*---------------------------------------------------------------------------*/
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 namespace PDRDragModels
36 defineTypeNameAndDebug(basic, 0);
37 addToRunTimeSelectionTable(PDRDragModel, basic, dictionary);
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 Foam::PDRDragModels::basic::basic
46 const dictionary& PDRProperties,
47 const compressible::RASModel& turbulence,
48 const volScalarField& rho,
49 const volVectorField& U,
50 const surfaceScalarField& phi
53 PDRDragModel(PDRProperties, turbulence, rho, U, phi),
54 Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")),
55 Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")),
67 U_.mesh().time().findInstance(polyMesh::meshSubDir, "Aw"),
83 U_.mesh().time().findInstance(polyMesh::meshSubDir, "CR"),
97 U_.mesh().time().findInstance(polyMesh::meshSubDir, "CT"),
108 // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
110 Foam::PDRDragModels::basic::~basic()
114 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
116 Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
118 const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
120 return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_;
124 Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
126 const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
129 (0.5*rho_)*mag(U_)*(U_ & CT_ & U_)
130 + Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
134 bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
136 PDRDragModel::read(PDRProperties);
138 PDRDragModelCoeffs_.lookup("Csu") >> Csu.value();
139 PDRDragModelCoeffs_.lookup("Csk") >> Csk.value();
145 // ************************************************************************* //