Skip to content

SprayParcel::calcBreakup function can create parcel with existing origId and origProc

Summary

At line 295 in the calcBreakup function of SprayParcel.C, a new child parcel is created. Whilst child->origId() is reset using this->getNewParticleID(), there is no similar reset for child->origProc(). This could potentially result in two particles with the same origId and origProc.

Steps to reproduce

If the parent parcel has moved to a different processor since being created, this will mean the origProc of the child parcel is incorrect.

Example case

No example, this is purely a code observation.

What is the current bug behaviour?

What is the expected correct behavior?

Relevant logs and/or images

Environment information

  • OpenFOAM version :v2006 and earlier
  • Operating system :any
  • Hardware info :any
  • Compiler :any

Possible fixes

Add the following line

   child->origProc() = Pstream::myProcNo();