CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   k-epsilon model - k term in the U-equation (http://www.cfd-online.com/Forums/openfoam-programming-development/89149-k-epsilon-model-k-term-u-equation.html)

catapult June 6, 2011 10:09

k-epsilon model - k term in the U-equation
 
Hi,

I am having a close look at the k-epsilon model implemented for incompressible flows in Openfoam.

in the following piece of code:
tmp<fvVectorMatrix> kEpsilon::divDevReff(volVectorField& U) const
{
return
(
- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(fvc::grad(U)().T()))
);
}

The k term in the Boussinesq eqauation ( 2/3 * k * delta_ij ) does not appear.
Where can I find this term in the implementation?

Thanks for your help!
Gregory

Eren10 June 6, 2011 11:11

You can find it in the file kEpsilon.C. I made a copy of it here:

Quote:

tmp<volSymmTensorField> kEpsilon::R() const
00140 {
00141 return tmp<volSymmTensorField>
00142 (
00143 new volSymmTensorField
00144 (
00145 IOobject
00146 (
00147 "R",
00148 runTime_.timeName(),
00149 mesh_,
00150 IOobject::NO_READ,
00151 IOobject::NO_WRITE
00152 ),
00153 ((2.0/3.0)*I)*k_ - nut_*twoSymm(fvc::grad(U_)),
00154 k_.boundaryField().types()
00155 )
00156 );
00157 }

I see that the minus sign is reversed ~? maybe it is multiplied with minus somewhere else !!!!!


All times are GMT -4. The time now is 22:49.