Bugfix: Avoid zero in log function in dsmcInitialise Authors: Robert Keser & Vanja Skuric
This commit is contained in:
parent
8607f3d224
commit
d69eccdc69
1 changed files with 1 additions and 1 deletions
|
@ -1144,7 +1144,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::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
|
||||
{
|
||||
|
|
Reference in a new issue