Commit 0421563d authored by Andrew Heather's avatar Andrew Heather
Browse files

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

parent 532721b8
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -117,8 +117,7 @@ class ReactingCloud
protected:
//- Inject more parcels
template<class TrackingData>
void inject(TrackingData& td);
void inject();
public:
......
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