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 incompressible
00034 {
00035 namespace LESModels
00036 {
00037
00038
00039
00040 GenEddyVisc::GenEddyVisc
00041 (
00042 const volVectorField& U,
00043 const surfaceScalarField& phi,
00044 transportModel& transport
00045 )
00046 :
00047 LESModel(word("GenEddyVisc"), U, phi, transport),
00048
00049 ce_
00050 (
00051 dimensioned<scalar>::lookupOrAddToDict
00052 (
00053 "ce",
00054 coeffDict_,
00055 1.048
00056 )
00057 ),
00058
00059 nuSgs_
00060 (
00061 IOobject
00062 (
00063 "nuSgs",
00064 runTime_.timeName(),
00065 mesh_,
00066 IOobject::MUST_READ,
00067 IOobject::AUTO_WRITE
00068 ),
00069 mesh_
00070 )
00071 {
00072
00073 }
00074
00075
00076
00077
00078 tmp<volSymmTensorField> GenEddyVisc::B() const
00079 {
00080 return ((2.0/3.0)*I)*k() - nuSgs_*twoSymm(fvc::grad(U()));
00081 }
00082
00083
00084 tmp<volSymmTensorField> GenEddyVisc::devBeff() const
00085 {
00086 return -nuEff()*dev(twoSymm(fvc::grad(U())));
00087 }
00088
00089
00090 tmp<fvVectorMatrix> GenEddyVisc::divDevBeff(volVectorField& U) const
00091 {
00092 return
00093 (
00094 - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T()))
00095 );
00096 }
00097
00098
00099 void GenEddyVisc::correct(const tmp<volTensorField>& gradU)
00100 {
00101 LESModel::correct(gradU);
00102 }
00103
00104
00105 bool GenEddyVisc::read()
00106 {
00107 if (LESModel::read())
00108 {
00109 ce_.readIfPresent(coeffDict());
00110
00111 return true;
00112 }
00113 else
00114 {
00115 return false;
00116 }
00117 }
00118
00119
00120
00121
00122 }
00123 }
00124 }
00125
00126
Copyright © 2000-2009 OpenCFD Ltd