more tidying up: NOTE - inject() functionality should be moved to the injection sub-model

This commit is contained in:
andy
2008-12-19 13:44:48 +00:00
parent 532721b804
commit 0421563db0
4 changed files with 12 additions and 22 deletions

View File

@ -265,7 +265,7 @@ void Foam::KinematicCloud<ParcelType>::evolve()
g_.value()
);
inject(td);
inject();
if (coupled_)
{
@ -277,15 +277,11 @@ void Foam::KinematicCloud<ParcelType>::evolve()
template<class ParcelType>
template<class TrackingData>
void Foam::KinematicCloud<ParcelType>::inject
(
TrackingData& td
)
void Foam::KinematicCloud<ParcelType>::inject()
{
scalar time = this->db().time().value();
scalar pRho = td.constProps().rho0();
scalar pRho = constProps_.rho0();
this->injection().prepareForNextTimeStep(time0_, time);
@ -367,14 +363,14 @@ void Foam::KinematicCloud<ParcelType>::inject
// construct the parcel that is to be injected
ParcelType* pPtr = new ParcelType
(
td.cloud(),
*this,
parcelTypeId_,
pPosition,
pCell,
pDiameter,
pU,
pNumberOfParticles,
td.constProps()
constProps_
);
scalar dt = time - timeInj;

View File

@ -234,8 +234,7 @@ protected:
);
//- Inject more parcels
template<class TrackingData>
void inject(TrackingData& td);
void inject();
//- Inject parcel if it is valid - delete otherwise
void injectParcel(ParcelType* p);

View File

@ -174,7 +174,7 @@ void Foam::ReactingCloud<ParcelType>::evolve()
this->g().value()
);
inject(td);
inject();
if (this->coupled())
{
@ -186,15 +186,11 @@ void Foam::ReactingCloud<ParcelType>::evolve()
template<class ParcelType>
template<class TrackingData>
void Foam::ReactingCloud<ParcelType>::inject
(
TrackingData& td
)
void Foam::ReactingCloud<ParcelType>::inject()
{
scalar time = this->db().time().value();
scalar pRho = td.constProps().rho0();
scalar pRho = this->constProps().rho0();
this->injection().prepareForNextTimeStep(this->time0(), time);
@ -276,7 +272,7 @@ void Foam::ReactingCloud<ParcelType>::inject
// construct the parcel that is to be injected
ParcelType* pPtr = new ParcelType
(
td.cloud(),
*this,
this->parcelTypeId(),
pPosition,
pCell,
@ -287,7 +283,7 @@ void Foam::ReactingCloud<ParcelType>::inject
composition().YLiquid0(),
composition().YSolid0(),
composition().YMixture0(),
td.constProps()
this->constProps()
);
scalar dt = time - timeInj;

View File

@ -117,8 +117,7 @@ class ReactingCloud
protected:
//- Inject more parcels
template<class TrackingData>
void inject(TrackingData& td);
void inject();
public: