Commit e9497703 authored by andy's avatar andy
Browse files

ENH: lagrangian - updated injection model

parent 5d0c0287
......@@ -586,20 +586,19 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
pPtr->rho()
);
const scalar mParcel0 = pPtr->nParticle()*pPtr->mass();
if (pPtr->nParticle() >= 1.0)
{
parcelsAdded++;
massAdded += pPtr->nParticle()*pPtr->mass();
if (!pPtr->move(td, dt))
if (pPtr->move(td, dt))
{
massAdded += mParcel0;
delete pPtr;
td.cloud().addParticle(pPtr);
}
else
{
if (pPtr->nParticle() >= 1.0)
{
td.cloud().addParticle(pPtr);
massAdded += mParcel0;
parcelsAdded++;
delete pPtr;
}
}
else
{
......@@ -609,7 +608,6 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
}
}
}
}
delayedVolume_ = delayedVolume;
}
......
Markdown is supported
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