Neater handling of non-patch face crossing. Not applying a small

tracking increase to patch interactions.
This commit is contained in:
graham
2009-10-11 00:02:36 +01:00
parent bf68452326
commit 0cbddca2c8

View File

@ -286,6 +286,9 @@ void Foam::Particle<ParticleType>::trackToFaceConcave
{
if (!cloud_.internalFace(facei_))
{
// For a patch face, allow a small value of lambda to
// ensure patch interactions occur.
label patchi = patch(facei_);
const polyPatch& patch = mesh.boundaryMesh()[patchi];
@ -312,7 +315,9 @@ void Foam::Particle<ParticleType>::trackToFaceConcave
}
}
}
else if (correctLambda < Cloud<ParticleType>::minValidTrackFraction)
else
{
if (correctLambda < Cloud<ParticleType>::minValidTrackFraction)
{
// The particle is not far enough away from the face
// to decide if it is valid crossing. Let it move a
@ -332,7 +337,15 @@ void Foam::Particle<ParticleType>::trackToFaceConcave
facei_ = -1;
}
// If the face hit was not on a wall, add a small
// amount to the track to move it off the face, If it
// was not an ambiguous face crossing, this makes sure
// the face is not ambiguous next tracking step. If
// it was ambiguous, this should resolve it.
correctLambda += Cloud<ParticleType>::minValidTrackFraction;
}
trackFraction = correctLambda;
position_ += trackFraction*(endPosition - position_);
}