From bd4fcd16dbeff6116f26c6c88a613f0f3c5eebed Mon Sep 17 00:00:00 2001
From: Will Bainbridge <http://cfd.direct>
Date: Thu, 27 Jul 2017 15:10:30 +0100
Subject: [PATCH] fvOptions: limitVelocity: Fixed the correction factor

Resolves bug report https://bugs.openfoam.org/view.php?id=2634
---
 src/fvOptions/corrections/limitVelocity/limitVelocity.C | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/fvOptions/corrections/limitVelocity/limitVelocity.C b/src/fvOptions/corrections/limitVelocity/limitVelocity.C
index d096c381aa..24eca1387d 100644
--- a/src/fvOptions/corrections/limitVelocity/limitVelocity.C
+++ b/src/fvOptions/corrections/limitVelocity/limitVelocity.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2016-2017 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -94,7 +94,7 @@ void Foam::fv::limitVelocity::correct(volVectorField& U)
 
         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)
                     {
-                        Up[facei] *= maxSqrU/magSqrUi;
+                        Up[facei] *= sqrt(maxSqrU/magSqrUi);
                     }
                 }
             }
-- 
GitLab