BUG: InjectionModelList: avoid an FPE instance while using spray cloud (fixes #3413)

This commit is contained in:
Alexey Matveichev
2025-09-08 11:12:54 +01:00
committed by Kutalmis Bercin
parent aee63e7418
commit 52f2c42e54
2 changed files with 3 additions and 1 deletions

View File

@ -163,7 +163,7 @@ Foam::scalar Foam::InjectionModelList<CloudType>::averageParcelMass()
massTotal += mt;
}
return mass/massTotal;
return mass/stabilise(massTotal, SMALL);
}

View File

@ -79,6 +79,8 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection
// - will be reset during each injection
this->volumeTotal_ = 0.0;
this->massTotal_ = 0.0;
volumeToInject(time.value(), time.value() + duration_);
}