From 90abd781006a93468ba091c669167aa333b1233b Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Fri, 29 Oct 2010 16:10:03 +0100
Subject: [PATCH] ENH: streamLineParticle: increase subiters

---
 .../functionObjects/field/streamLine/streamLineParticle.C | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C
index 1fe0b2c2f86..33583dc5bf9 100644
--- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C
+++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C
@@ -192,8 +192,12 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
         // set the lagrangian time-step
         scalar dt = min(dtMax, tEnd);
 
-        // Cross cell in steps
-        for (label subIter = 0; subIter < td.nSubCycle_; subIter++)
+        // Cross cell in steps:
+        // - at subiter 0 calculate dt to cross cell in nSubCycle steps
+        // - at the last subiter do all of the remaining track
+        // - do a few more subiters than nSubCycle since velocity might
+        //   be decreasing
+        for (label subIter = 0; subIter < 2*td.nSubCycle_; subIter++)
         {
             --lifeTime_;
 
-- 
GitLab