Commit e2d7cd9a authored by andy's avatar andy
Browse files

ENH: better handling of cloud averageParcelMass for steady calculations

parent e915b5ce
......@@ -462,7 +462,16 @@ Foam::scalar Foam::InjectionModel<CloudType>::volumeToInject
template<class CloudType>
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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment