View Issue Details

IDProjectCategoryView StatusLast Update
0001310OpenFOAM[All Projects] Bugpublic2015-03-07 15:29
ReportercraigWhiteAssigned Tohenry 
Status resolvedResolutionunable to reproduce 
PlatformLinuxOSUbuntuOS Version12.04
Product Version 
Fixed in Version 
Summary0001310: Lagrangian Particle Tracking Hangs
DescriptionDSMC solver sometimes hangs during the lagrangian particle tracking. The issue is only really seen when using large numbers of particles and happens at random intervals - I have changed the seeding for the random number generator so I wouldn't expect it to hang at the same place every time. I'm not sure what function exactly causes the issue. There is no error output, the process continues to run, but the simulation cannot proceed.

Sometimes it happens soon after a write interval, and then this write interval cannot be reconstructed as there is a particle with a position that does not match any cell - it is actually quite a relatively large distance outside of the mesh when comparing the particle position to the mesh bounding box.
Steps To ReproduceLots of particles (30 million), run in parallel, include wall surfaces and freestream boundaries.
Additional InformationAlthough I using 2.1.x, I have tried adding the fixes from previous reports of what seem to be the same problem:

My issue still remains.
TagsNo tags attached.



2014-06-28 22:38

updater   ~0003143

Last edited: 2014-06-28 22:42

View 2 revisions

If you could provide an example case where this can be reproduced, or at least instructions on how to configure one of OpenFOAM's tutorial cases to reproduce the same issue, it would make it a lot easier/faster to diagnose this.

In addition, knowing how many cores to use and the decomposition method used for the parallel run, would also help.


2014-09-21 18:21


solidParticle.C (6,910 bytes)


2014-09-21 18:22


We experience the same problem with LPT within waveFoam. For this integration we copied the files from src/lagrangian/solidParticle. Because we wanted to use the particles as tracer for the fluid (rather than physical particles) we modified solidParticle.C amongst other bits. Everything worked fine, except the model would randomly hang.

In debugged this, I believe that the error is in the last part of the function solidParticle.move, where it detects if you've reached a processor boundary, but doesn't address the case when the particle has left the computational domain completely.

I therefore THINK (I would stress I'm still trying to figure out how everything ties together) that the lines:

        if (onBoundary() && td.keepParticle)
            if (isA<processorPolyPatch>(pbMesh[patch(face())]))
                td.switchProcessor = true;

should really be

        if (onBoundary() && td.keepParticle)
            if (isA<processorPolyPatch>(pbMesh[patch(face())]))
                td.switchProcessor = true;
                // Particle has reached the edge of the domain, so it must vanish

If tracking this down, we also monitored the line
        dt *= trackToFace(position() + dt*U_, td);

What still worries me is that often dt<=0 at the end of this. Which doesn't all together seems wise. So we've added

if(dt<=0) dt=SMALL


The final change we've made, given that I know a lot of people are using LPT simply to trace the movement of the underlying fluid, we have added the option for a particle size of 0, however we left in gravitational accelerations (originally to get around the above bug), but also because we don't want to track particles within the air - so this approach gradually cause particles that leave our water surface to drop back again. At least that the hope.

I'd be interested in feedback on all these alterations. In particular are they appropriate.

Thanks Will


2014-09-25 15:03


Not sure if this is a bug or a limitation. But LGT doesn't seem to work with a Dynamic Mesh. I assume the particles find that the mesh to which they are associated has changed and are somewhat confused by this.


2015-03-07 15:23

manager   ~0003999

Most but not all the cloud types supported dynamic mesh changes. I added this support to DSMC is OpenFOAM-dev:

commit 218875bf401389262da828a896f7e7633df1480d
Author: Henry <Henry>
Date: Fri Feb 20 17:24:14 2015 +0000

    DSMC: Rationalization and addition of mapping support

Could you check and let me know if this resolves the problem.


2015-03-07 15:28

manager   ~0004000

The issue with dynamic mesh is separate to the original report so if you have some feedback on it please open a separate as I will close this orphaned report.

Note that your proposal to remove particles when they hit boundaries may not be appropriate depending on application, for example if you want to accumulate the particles on walls.

Issue History

Date Modified Username Field Change
2014-06-02 11:23 craigWhite New Issue
2014-06-28 22:38 wyldckat Note Added: 0003143
2014-06-28 22:42 wyldckat Note Edited: 0003143 View Revisions
2014-09-21 18:21 user924 File Added: solidParticle.C
2014-09-21 18:22 user924 Note Added: 0003236
2014-09-25 15:03 user924 Note Added: 0003237
2015-03-07 15:23 henry Note Added: 0003999
2015-03-07 15:28 henry Note Added: 0004000
2015-03-07 15:28 henry Status new => resolved
2015-03-07 15:28 henry Resolution open => unable to reproduce
2015-03-07 15:28 henry Assigned To => henry