ENH: InjectedParticleDistributionInjection model - added protection for the case of zero particles; updated tutorial scripts. See #363
This commit is contained in:
parent
c3df4b9368
commit
02ba3a2d44
@ -384,6 +384,11 @@ Foam::InjectedParticleDistributionInjection<CloudType>::parcelsToInject
|
||||
nParcelsInjected_ += returnReduce(nParcelsInjected0_, sumOp<label>());
|
||||
nParcelsInjected0_ = 0;
|
||||
|
||||
if (startTime_.empty() || this->volumeTotal_ < ROOTVSMALL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
scalar targetVolume = 0;
|
||||
forAll(startTime_, injectori)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ copyLagrangianData()
|
||||
|
||||
if [ -z $latestTime ]
|
||||
then
|
||||
echo "Error: unable to find Lagrangian data in case $eulerianCase"
|
||||
echo "Error: unable to find Lagrangian data in case $dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -37,6 +37,7 @@ copyLagrangianData()
|
||||
\cp -r $dir 0
|
||||
else
|
||||
echo "Error: unable to find Lagrangian data in case $dir"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ copyLagrangianData()
|
||||
|
||||
if [ -z $latestTime ]
|
||||
then
|
||||
echo "Error: unable to find Lagrangian data in case $eulerianCase"
|
||||
echo "Error: unable to find Lagrangian data in case $dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -37,6 +37,7 @@ copyLagrangianData()
|
||||
\cp -r $dir 0
|
||||
else
|
||||
echo "Error: unable to find Lagrangian data in case $dir"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user