fvOptions: limitVelocity: Fixed the correction factor

Resolves bug report https://bugs.openfoam.org/view.php?id=2634
This commit is contained in:
Will Bainbridge
2017-07-27 15:19:12 +01:00
parent c66fba323c
commit 3ece3e9e81

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) 2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,7 +94,7 @@ void Foam::fv::limitVelocity::correct(volVectorField& U)
if (magSqrUi > maxSqrU) if (magSqrUi > maxSqrU)
{ {
Uif[celli] *= maxSqrU/magSqrUi; Uif[celli] *= sqrt(maxSqrU/magSqrUi);
} }
} }
@ -115,7 +115,7 @@ void Foam::fv::limitVelocity::correct(volVectorField& U)
if (magSqrUi > maxSqrU) if (magSqrUi > maxSqrU)
{ {
Up[facei] *= maxSqrU/magSqrUi; Up[facei] *= sqrt(maxSqrU/magSqrUi);
} }
} }
} }