From 63bd3ed52b83ce4af9dc97ec8c9039a1951b5468 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 28 Mar 2019 15:49:14 +0000 Subject: [PATCH] Bugfix: Use Sf normal rather than n in moving immersed boundary: they are not parallel due to Marooney maneouvre --- .../movingImmersedBoundaryVelocityFvPatchVectorField.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchFields/derived/movingImmersedBoundaryVelocity/movingImmersedBoundaryVelocityFvPatchVectorField.C b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchFields/derived/movingImmersedBoundaryVelocity/movingImmersedBoundaryVelocityFvPatchVectorField.C index c79ac392d..6248707db 100644 --- a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchFields/derived/movingImmersedBoundaryVelocity/movingImmersedBoundaryVelocityFvPatchVectorField.C +++ b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchFields/derived/movingImmersedBoundaryVelocity/movingImmersedBoundaryVelocityFvPatchVectorField.C @@ -189,7 +189,10 @@ void Foam::movingImmersedBoundaryVelocityFvPatchVectorField::updateCoeffs() scalarField phip = p.patchField(fvc::meshPhi(U)); - vectorField n = p.nf(); + // Warning: cannot use patch normal but the real face normal + // THEY MAY NOT BE THE SAME! HJ, 28/Mar/2019 + vectorField n = p.Sf()/(p.magSf()); + const scalarField& magSf = p.magSf(); scalarField Un = phip/(magSf + VSMALL);