mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
passing by reference instead of pointer
This commit is contained in:
@ -151,18 +151,18 @@ Foam::KinematicCloud<ParcelType>::~KinematicCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->rho() = constProps_.rho0();
|
||||
parcel.rho() = constProps_.rho0();
|
||||
}
|
||||
|
||||
scalar carrierDt = this->db().time().deltaT().value();
|
||||
pPtr->stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
||||
parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -148,34 +148,34 @@ Foam::ReactingCloud<ParcelType>::~ReactingCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
ThermoCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
pPtr,
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->Y() = composition().YMixture0();
|
||||
parcel.Y() = composition().YMixture0();
|
||||
}
|
||||
else
|
||||
{
|
||||
checkSuppliedComposition
|
||||
(
|
||||
pPtr->Y(),
|
||||
parcel.Y(),
|
||||
composition().YMixture0(),
|
||||
"YMixture"
|
||||
);
|
||||
}
|
||||
|
||||
// derived information - store initial mass
|
||||
pPtr->mass0() = pPtr->mass();
|
||||
parcel.mass0() = parcel.mass();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -224,7 +224,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -76,14 +76,14 @@ Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
ReactingCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
pPtr,
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
@ -94,27 +94,27 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->YGas() = this->composition().Y0(idGas);
|
||||
pPtr->YLiquid() = this->composition().Y0(idLiquid);
|
||||
pPtr->YSolid() = this->composition().Y0(idSolid);
|
||||
parcel.YGas() = this->composition().Y0(idGas);
|
||||
parcel.YLiquid() = this->composition().Y0(idLiquid);
|
||||
parcel.YSolid() = this->composition().Y0(idSolid);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->checkSuppliedComposition
|
||||
(
|
||||
pPtr->YGas(),
|
||||
parcel.YGas(),
|
||||
this->composition().Y0(idGas),
|
||||
"YGas"
|
||||
);
|
||||
this->checkSuppliedComposition
|
||||
(
|
||||
pPtr->YLiquid(),
|
||||
parcel.YLiquid(),
|
||||
this->composition().Y0(idLiquid),
|
||||
"YLiquid"
|
||||
);
|
||||
this->checkSuppliedComposition
|
||||
(
|
||||
pPtr->YSolid(),
|
||||
parcel.YSolid(),
|
||||
this->composition().Y0(idSolid),
|
||||
"YSolid"
|
||||
);
|
||||
|
||||
@ -178,7 +178,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -113,22 +113,22 @@ Foam::ThermoCloud<ParcelType>::~ThermoCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
KinematicCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
pPtr,
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->T() = constProps_.T0();
|
||||
pPtr->cp() = constProps_.cp0();
|
||||
parcel.T() = constProps_.T0();
|
||||
parcel.cp() = constProps_.cp0();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -220,7 +220,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -401,7 +401,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
setProperties(parcelI, newParcels, timeInj, *pPtr);
|
||||
|
||||
// Check new parcel properties
|
||||
td.cloud().checkParcelProperties(pPtr, dt, fullyDescribed());
|
||||
td.cloud().checkParcelProperties(*pPtr, dt, fullyDescribed());
|
||||
|
||||
// Apply correction to velocity for 2-D cases
|
||||
meshTools::constrainDirection
|
||||
|
||||
Reference in New Issue
Block a user