GenSGSStress.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 "GenSGSStress.H"
00028
00029
00030
00031 namespace Foam
00032 {
00033 namespace compressible
00034 {
00035 namespace LESModels
00036 {
00037
00038
00039
00040 GenSGSStress::GenSGSStress
00041 (
00042 const volScalarField& rho,
00043 const volVectorField& U,
00044 const surfaceScalarField& phi,
00045 const basicThermo& thermoPhysicalModel
00046 )
00047 :
00048 LESModel
00049 (
00050 word("GenSGSStress"),
00051 rho,
00052 U,
00053 phi,
00054 thermoPhysicalModel
00055 ),
00056
00057 ce_
00058 (
00059 dimensioned<scalar>::lookupOrAddToDict
00060 (
00061 "ce",
00062 coeffDict_,
00063 1.048
00064 )
00065 ),
00066
00067 Prt_
00068 (
00069 dimensioned<scalar>::lookupOrAddToDict
00070 (
00071 "Prt",
00072 coeffDict_,
00073 1.0
00074 )
00075 ),
00076
00077 B_
00078 (
00079 IOobject
00080 (
00081 "B",
00082 runTime_.timeName(),
00083 mesh_,
00084 IOobject::MUST_READ,
00085 IOobject::AUTO_WRITE
00086 ),
00087 mesh_
00088 ),
00089
00090 muSgs_
00091 (
00092 IOobject
00093 (
00094 "muSgs",
00095 runTime_.timeName(),
00096 mesh_,
00097 IOobject::MUST_READ,
00098 IOobject::AUTO_WRITE
00099 ),
00100 mesh_
00101 ),
00102
00103 alphaSgs_
00104 (
00105 IOobject
00106 (
00107 "alphaSgs",
00108 runTime_.timeName(),
00109 mesh_,
00110 IOobject::MUST_READ,
00111 IOobject::AUTO_WRITE
00112 ),
00113 mesh_
00114 )
00115 {}
00116
00117
00118
00119
00120 tmp<volSymmTensorField> GenSGSStress::devRhoBeff() const
00121 {
00122 return tmp<volSymmTensorField>
00123 (
00124 new volSymmTensorField
00125 (
00126 IOobject
00127 (
00128 "devRhoReff",
00129 runTime_.timeName(),
00130 mesh_,
00131 IOobject::NO_READ,
00132 IOobject::NO_WRITE
00133 ),
00134 rho()*B_ - mu()*dev(twoSymm(fvc::grad(U())))
00135 )
00136 );
00137 }
00138
00139
00140 tmp<fvVectorMatrix> GenSGSStress::divDevRhoBeff(volVectorField& U) const
00141 {
00142 return
00143 (
00144 fvc::div(rho()*B_ + 0.05*muSgs_*fvc::grad(U))
00145 + fvc::laplacian(0.95*muSgs_, U, "laplacian(muEff,U)")
00146 - fvm::laplacian(muEff(), U)
00147 - fvc::div(mu()*dev2(fvc::grad(U)().T()))
00148 );
00149 }
00150
00151
00152 void GenSGSStress::correct(const tmp<volTensorField>& gradU)
00153 {
00154 LESModel::correct(gradU);
00155 }
00156
00157
00158 bool GenSGSStress::read()
00159 {
00160 if (LESModel::read())
00161 {
00162 ce_.readIfPresent(coeffDict());
00163
00164 return true;
00165 }
00166 else
00167 {
00168 return false;
00169 }
00170 }
00171
00172
00173
00174
00175 }
00176 }
00177 }
00178
00179
Copyright © 2000-2009 OpenCFD Ltd