ENH: lagrangian - updated injection model
This commit is contained in:
parent
5d0c0287ca
commit
e949770310
@ -586,27 +586,25 @@ 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))
|
||||
{
|
||||
massAdded += mParcel0;
|
||||
delete pPtr;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pPtr->nParticle() >= 1.0)
|
||||
if (pPtr->move(td, dt))
|
||||
{
|
||||
td.cloud().addParticle(pPtr);
|
||||
massAdded += mParcel0;
|
||||
parcelsAdded++;
|
||||
}
|
||||
else
|
||||
{
|
||||
delayedVolume += pPtr->nParticle()*pPtr->volume();
|
||||
delete pPtr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
delayedVolume += pPtr->nParticle()*pPtr->volume();
|
||||
delete pPtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user