Bugfix: live factor rejection by cells ; not by faces

This commit is contained in:
Hrvoje Jasak 2019-04-05 15:33:15 +01:00
parent 9bdc8ce728
commit 2bd012729b
2 changed files with 20 additions and 29 deletions

View file

@ -801,7 +801,22 @@ Foam::ImmersedCell<Distance>::ImmersedCell
isBadCut_ = true;
}
if (isBadCut_)
// If the cut is not bad, adjust the cell for thin cell cut
if (!isBadCut_)
{
if (mag(wetCut) < immersedPoly::liveFactor_())
{
// Cell is dry; reset
isAllDry_ = true;
}
if (mag(dryCut) < immersedPoly::liveFactor_())
{
// Cell is wet; reset
isAllWet_ = true;
}
}
else
{
Info<< "Bad cell cut: volume = (" << wetCut << " " << dryCut
<< ") = " << wetCut + dryCut << nl

View file

@ -272,19 +272,8 @@ void Foam::ImmersedFace<Distance>::createSubfaces
{
drySubface_.setSize(nDry);
// Check area: if it is very small, reset the face
if
(
drySubface_.mag(facePointsAndIntersections_)
< immersedPoly::liveFactor_()*
localFace.mag(facePointsAndIntersections_)
)
{
// The face is practically wet
isAllWet_ = true;
drySubface_.clear();
}
// Since cell cut is adjusted, face cut cannot be.
// HJ, 5/Apr/2019
}
if (nWet < 3)
@ -299,21 +288,8 @@ void Foam::ImmersedFace<Distance>::createSubfaces
{
wetSubface_.setSize(nWet);
// Check area: if it is very small, reset the face
// Note: must use relative tolerance, ie divide with original face
// area magnitude. HJ, 30/Aug/2018
if
(
wetSubface_.mag(facePointsAndIntersections_)
< immersedPoly::liveFactor_()*
localFace.mag(facePointsAndIntersections_)
)
{
// The face is practically dry
isAllDry_ = true;
wetSubface_.clear();
}
// Since cell cut is adjusted, face cut cannot be.
// HJ, 5/Apr/2019
}
}
}