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

View File

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

View File

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

View File

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