ENH: Spalart-Allmaras - update nut_ from nuTilda_*fv1 when turbulence inactive

This commit is contained in:
andy
2012-03-19 10:06:39 +00:00
parent 6413e2fdfe
commit 0848c82521

View File

@ -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
@ -367,6 +367,10 @@ void SpalartAllmaras::correct()
if (!turbulence_) if (!turbulence_)
{ {
// Re-calculate viscosity
nut_ = nuTilda_*fv1(this->chi());
nut_.correctBoundaryConditions();
return; return;
} }
@ -401,6 +405,7 @@ void SpalartAllmaras::correct()
bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0));
nuTilda_.correctBoundaryConditions(); nuTilda_.correctBoundaryConditions();
// Re-calculate viscosity
nut_.internalField() = fv1*nuTilda_.internalField(); nut_.internalField() = fv1*nuTilda_.internalField();
nut_.correctBoundaryConditions(); nut_.correctBoundaryConditions();
} }