mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: better handling of cloud averageParcelMass for steady calculations
This commit is contained in:
@ -462,7 +462,16 @@ Foam::scalar Foam::InjectionModel<CloudType>::volumeToInject
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
Foam::scalar Foam::InjectionModel<CloudType>::averageParcelMass()
|
Foam::scalar Foam::InjectionModel<CloudType>::averageParcelMass()
|
||||||
{
|
{
|
||||||
label nTotal = parcelsToInject(0.0, timeEnd() - timeStart());
|
label nTotal = 0.0;
|
||||||
|
if (this->owner().solution().transient())
|
||||||
|
{
|
||||||
|
nTotal = parcelsToInject(0.0, timeEnd() - timeStart());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nTotal = parcelsToInject(0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
return massTotal_/nTotal;
|
return massTotal_/nTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user