basic.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "basic.H"
00028 #include "addToRunTimeSelectionTable.H"
00029
00030
00031
00032 namespace Foam
00033 {
00034 namespace PDRDragModels
00035 {
00036 defineTypeNameAndDebug(basic, 0);
00037 addToRunTimeSelectionTable(PDRDragModel, basic, dictionary);
00038 };
00039 };
00040
00041
00042
00043
00044 Foam::PDRDragModels::basic::basic
00045 (
00046 const dictionary& PDRProperties,
00047 const compressible::RASModel& turbulence,
00048 const volScalarField& rho,
00049 const volVectorField& U,
00050 const surfaceScalarField& phi
00051 )
00052 :
00053 PDRDragModel(PDRProperties, turbulence, rho, U, phi),
00054 Csu("Csu", dimless, PDRDragModelCoeffs_.lookup("Csu")),
00055 Csk("Csk", dimless, PDRDragModelCoeffs_.lookup("Csk")),
00056
00057 Aw2_
00058 (
00059 "Aw2",
00060 sqr
00061 (
00062 volScalarField
00063 (
00064 IOobject
00065 (
00066 "Aw",
00067 U_.mesh().time().findInstance(polyMesh::meshSubDir, "Aw"),
00068 polyMesh::meshSubDir,
00069 U_.mesh(),
00070 IOobject::MUST_READ,
00071 IOobject::NO_WRITE
00072 ),
00073 U_.mesh()
00074 )
00075 )
00076 ),
00077
00078 CR_
00079 (
00080 IOobject
00081 (
00082 "CR",
00083 U_.mesh().time().findInstance(polyMesh::meshSubDir, "CR"),
00084 polyMesh::meshSubDir,
00085 U_.mesh(),
00086 IOobject::MUST_READ,
00087 IOobject::NO_WRITE
00088 ),
00089 U_.mesh()
00090 ),
00091
00092 CT_
00093 (
00094 IOobject
00095 (
00096 "CT",
00097 U_.mesh().time().findInstance(polyMesh::meshSubDir, "CT"),
00098 polyMesh::meshSubDir,
00099 U_.mesh(),
00100 IOobject::MUST_READ,
00101 IOobject::NO_WRITE
00102 ),
00103 U_.mesh()
00104 )
00105 {}
00106
00107
00108
00109
00110 Foam::PDRDragModels::basic::~basic()
00111 {}
00112
00113
00114
00115
00116 Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
00117 {
00118 const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
00119
00120 return (0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*Aw2_;
00121 }
00122
00123
00124 Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
00125 {
00126 const volScalarField& betav = U_.db().lookupObject<volScalarField>("betav");
00127
00128 return
00129 (0.5*rho_)*mag(U_)*(U_ & CT_ & U_)
00130 + Csk*betav*turbulence_.muEff()*Aw2_*magSqr(U_);
00131 }
00132
00133
00134 bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
00135 {
00136 PDRDragModel::read(PDRProperties);
00137
00138 PDRDragModelCoeffs_.lookup("Csu") >> Csu.value();
00139 PDRDragModelCoeffs_.lookup("Csk") >> Csk.value();
00140
00141 return true;
00142 }
00143
00144
00145
Copyright © 2000-2009 OpenCFD Ltd