mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressible Smagorinsky SGS model: corrected calculation of k in k()
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,7 +113,13 @@ public:
|
|||||||
// calculated from the given velocity gradient
|
// calculated from the given velocity gradient
|
||||||
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
|
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
|
||||||
{
|
{
|
||||||
return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
|
volSymmTensorField D(symm(gradU));
|
||||||
|
|
||||||
|
volScalarField a(ce_/delta());
|
||||||
|
volScalarField b((2.0/3.0)*tr(D));
|
||||||
|
volScalarField c(2*ck_*delta()*(dev(D) && D));
|
||||||
|
|
||||||
|
return sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a));
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return SGS kinetic energy
|
//- Return SGS kinetic energy
|
||||||
|
|||||||
Reference in New Issue
Block a user