PatchInjection: Fixed number of injected parcels for small timesteps
Resolves bug report https://bugs.openfoam.org/view.php?id=4071
This commit is contained in:
@ -160,11 +160,7 @@ Foam::label Foam::PatchFlowRateInjection<CloudType>::nParcelsToInject
|
||||
|
||||
// Inject an additional parcel with a probability based on the
|
||||
// remainder after the floor function
|
||||
if
|
||||
(
|
||||
nParcelsToInject > 0
|
||||
&& nParcels - scalar(nParcelsToInject) > rndGen.globalScalar01()
|
||||
)
|
||||
if (nParcels - scalar(nParcelsToInject) > rndGen.globalScalar01())
|
||||
{
|
||||
++nParcelsToInject;
|
||||
}
|
||||
|
||||
@ -178,11 +178,7 @@ Foam::label Foam::PatchInjection<CloudType>::nParcelsToInject
|
||||
|
||||
// Inject an additional parcel with a probability based on the
|
||||
// remainder after the floor function
|
||||
if
|
||||
(
|
||||
nParcelsToInject > 0
|
||||
&& (nParcels - scalar(nParcelsToInject) > rndGen.globalScalar01())
|
||||
)
|
||||
if (nParcels - scalar(nParcelsToInject) > rndGen.globalScalar01())
|
||||
{
|
||||
++nParcelsToInject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user