View Issue Details

IDProjectCategoryView StatusLast Update
0001059OpenFOAM[All Projects] Bugpublic2013-11-26 14:57
Reporteruser461Assigned Touser2 
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version9.10
Product Version 
Fixed in Version 
Summary0001059: Code hanging due to particle at wall giving lambda < 0
DescriptionMy code was hanging due to a particle at the wall which was traveling away from the face. In the function hitWallFaces in particleTemplates.C lambda got a negative value on line 803. My understanding is that a negative value of lambda means that a particle is traveling away from a face and thus is not hitting the wall. I changed line 903 to:

if (lambda > 0.0 && lambda < lambdaMin)

and the code does not hang anymore.
TagsNo tags attached.



2013-11-16 22:04 (617,589 bytes)


2013-11-16 22:08



I made some modifications to the lagrangian code and things run well now, so I figured I might as well share my modifications. I ended up writing an extra counter, which resets particles to the center of a grid cell whenever the number of iterations is larger than 100. As long as the counter is smaller than 100, the normal correction is used. Also, I modified the calculation at the wall. My particles were getting stuck because they were larger than grid cells at the wall. Last but not least I think I found a bug in particleTemplates.C where I replaced triI with tI in the trackToFace subroutine. You can do a diff to see the details.

I also uploaded these modifications here:


2013-11-26 14:57


Thanks for the report - I've pushed a fix for the incorrect indexing under commit cce236a. However, we'll defer adding your proposed fix for resetting the particle positions since we would rather correct the tracking algorithm in this case.

Issue History

Date Modified Username Field Change
2013-10-26 02:00 user461 New Issue
2013-11-16 22:04 user461 File Added:
2013-11-16 22:08 user461 Note Added: 0002637
2013-11-26 14:57 user2 Note Added: 0002659
2013-11-26 14:57 user2 Status new => resolved
2013-11-26 14:57 user2 Fixed in Version => 2.2.x
2013-11-26 14:57 user2 Resolution open => fixed
2013-11-26 14:57 user2 Assigned To => user2