mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: streamLineParticle : improved
This commit is contained in:
@ -45,6 +45,7 @@ Foam::scalar Foam::streamLineParticle::calcSubCycleDeltaT
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
streamLineParticle testParticle(*this);
|
streamLineParticle testParticle(*this);
|
||||||
|
|
||||||
bool oldKeepParticle = td.keepParticle;
|
bool oldKeepParticle = td.keepParticle;
|
||||||
bool oldSwitchProcessor = td.switchProcessor;
|
bool oldSwitchProcessor = td.switchProcessor;
|
||||||
scalar fraction = testParticle.trackToFace(position()+dt*U, td);
|
scalar fraction = testParticle.trackToFace(position()+dt*U, td);
|
||||||
@ -196,9 +197,7 @@ bool Foam::streamLineParticle::move
|
|||||||
// Cross cell in steps:
|
// Cross cell in steps:
|
||||||
// - at subiter 0 calculate dt to cross cell in nSubCycle steps
|
// - at subiter 0 calculate dt to cross cell in nSubCycle steps
|
||||||
// - at the last subiter do all of the remaining track
|
// - at the last subiter do all of the remaining track
|
||||||
// - do a few more subiters than nSubCycle since velocity might
|
for (label subIter = 0; subIter < td.nSubCycle_; subIter++)
|
||||||
// be decreasing
|
|
||||||
for (label subIter = 0; subIter < 2*td.nSubCycle_; subIter++)
|
|
||||||
{
|
{
|
||||||
--lifeTime_;
|
--lifeTime_;
|
||||||
|
|
||||||
@ -236,7 +235,13 @@ bool Foam::streamLineParticle::move
|
|||||||
lifeTime_ = 0;
|
lifeTime_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!td.keepParticle || td.switchProcessor || lifeTime_ == 0)
|
if
|
||||||
|
(
|
||||||
|
face() != -1
|
||||||
|
|| !td.keepParticle
|
||||||
|
|| td.switchProcessor
|
||||||
|
|| lifeTime_ == 0
|
||||||
|
)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user