Commit 013515df authored by andy's avatar andy
Browse files

ENH: parcel injection - updated validation check

parent 66eac7a2
......@@ -585,16 +585,23 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
pPtr->rho()
);
if ((pPtr->nParticle() >= 1.0) && (pPtr->move(td, dt)))
if (!pPtr->move(td, dt))
{
td.cloud().addParticle(pPtr);
massAdded += pPtr->nParticle()*pPtr->mass();
parcelsAdded++;
delete pPtr;
}
else
{
delayedVolume += pPtr->nParticle()*pPtr->volume();
delete pPtr;
if (pPtr->nParticle() >= 1.0)
{
td.cloud().addParticle(pPtr);
massAdded += pPtr->nParticle()*pPtr->mass();
parcelsAdded++;
}
else
{
delayedVolume += pPtr->nParticle()*pPtr->volume();
delete pPtr;
}
}
}
}
......
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