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