diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index 58526a048a..cd18d9064d 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -249,9 +249,16 @@ void Foam::FreeStream::inflow() { scalar& faceAccumulator = pFA[i][f]; - // Number of particles to insert + // Number of whole particles to insert label nI = max(label(faceAccumulator), 0); + // Add another particle with a probability proportional to the + // remainder of taking the integer part of faceAccumulator + if ((faceAccumulator - nI) > rndGen.scalar01()) + { + nI++; + } + faceAccumulator -= nI; label typeId = moleculeTypeIds_[i];