Bugfix: Use Sf normal rather than n in moving immersed boundary: they are not parallel due to Marooney maneouvre

This commit is contained in:
Hrvoje Jasak 2019-03-28 15:49:14 +00:00
parent 8207c9cd62
commit 63bd3ed52b

View file

@ -189,7 +189,10 @@ void Foam::movingImmersedBoundaryVelocityFvPatchVectorField::updateCoeffs()
scalarField phip = scalarField phip =
p.patchField<surfaceScalarField, scalar>(fvc::meshPhi(U)); p.patchField<surfaceScalarField, scalar>(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(); const scalarField& magSf = p.magSf();
scalarField Un = phip/(magSf + VSMALL); scalarField Un = phip/(magSf + VSMALL);