ENH: wallBoundedStreamline: survive neg-tet cells. Fixes #502.

This commit is contained in:
mattijs
2017-06-15 16:49:21 +01:00
parent 9c740ffc21
commit a17a04122e
4 changed files with 223 additions and 35 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -120,11 +120,12 @@ Foam::vector Foam::wallBoundedStreamLineParticle::sample
{
// Stagnant particle. Might as well stop
lifeTime_ = 0;
return vector::zero;
}
else
{
return U/magU;
}
U /= magU;
return U;
}
@ -267,16 +268,6 @@ bool Foam::wallBoundedStreamLineParticle::move
// Force removal
lifeTime_ = 0;
}
if
(
!td.keepParticle
|| td.switchProcessor
|| lifeTime_ == 0
)
{
break;
}
}