diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudTemplate.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudTemplate.C index e6f41746a..64da4d95f 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudTemplate.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudTemplate.C @@ -1144,7 +1144,7 @@ Foam::scalar Foam::DsmcCloud::equipartitionInternalEnergy else if (iDof < 2.0 + SMALL && iDof > 2.0 - SMALL) { // Special case for iDof = 2, i.e. diatomics; - Ei = -log(rndGen_.scalar01())*kb*temperature; + Ei = -log(max(rndGen_.scalar01(), VSMALL))*kb*temperature; } else {