mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Neater handling of non-patch face crossing. Not applying a small
tracking increase to patch interactions.
This commit is contained in:
@ -286,6 +286,9 @@ void Foam::Particle<ParticleType>::trackToFaceConcave
|
|||||||
{
|
{
|
||||||
if (!cloud_.internalFace(facei_))
|
if (!cloud_.internalFace(facei_))
|
||||||
{
|
{
|
||||||
|
// For a patch face, allow a small value of lambda to
|
||||||
|
// ensure patch interactions occur.
|
||||||
|
|
||||||
label patchi = patch(facei_);
|
label patchi = patch(facei_);
|
||||||
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
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
|
// The particle is not far enough away from the face
|
||||||
// to decide if it is valid crossing. Let it move a
|
// to decide if it is valid crossing. Let it move a
|
||||||
@ -332,7 +337,15 @@ void Foam::Particle<ParticleType>::trackToFaceConcave
|
|||||||
facei_ = -1;
|
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;
|
correctLambda += Cloud<ParticleType>::minValidTrackFraction;
|
||||||
|
}
|
||||||
|
|
||||||
trackFraction = correctLambda;
|
trackFraction = correctLambda;
|
||||||
position_ += trackFraction*(endPosition - position_);
|
position_ += trackFraction*(endPosition - position_);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user