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>
|
template<class ParcelType>
|
||||||
void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!fullyDescribed)
|
if (!fullyDescribed)
|
||||||
{
|
{
|
||||||
pPtr->rho() = constProps_.rho0();
|
parcel.rho() = constProps_.rho0();
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar carrierDt = this->db().time().deltaT().value();
|
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
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
|
|||||||
@ -148,34 +148,34 @@ Foam::ReactingCloud<ParcelType>::~ReactingCloud()
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ThermoCloud<ParcelType>::checkParcelProperties
|
ThermoCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
pPtr,
|
parcel,
|
||||||
lagrangianDt,
|
lagrangianDt,
|
||||||
fullyDescribed
|
fullyDescribed
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!fullyDescribed)
|
if (!fullyDescribed)
|
||||||
{
|
{
|
||||||
pPtr->Y() = composition().YMixture0();
|
parcel.Y() = composition().YMixture0();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
checkSuppliedComposition
|
checkSuppliedComposition
|
||||||
(
|
(
|
||||||
pPtr->Y(),
|
parcel.Y(),
|
||||||
composition().YMixture0(),
|
composition().YMixture0(),
|
||||||
"YMixture"
|
"YMixture"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// derived information - store initial mass
|
// derived information - store initial mass
|
||||||
pPtr->mass0() = pPtr->mass();
|
parcel.mass0() = parcel.mass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -224,7 +224,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
|
|||||||
@ -76,14 +76,14 @@ Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud()
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ReactingCloud<ParcelType>::checkParcelProperties
|
ReactingCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
pPtr,
|
parcel,
|
||||||
lagrangianDt,
|
lagrangianDt,
|
||||||
fullyDescribed
|
fullyDescribed
|
||||||
);
|
);
|
||||||
@ -94,27 +94,27 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
|||||||
|
|
||||||
if (!fullyDescribed)
|
if (!fullyDescribed)
|
||||||
{
|
{
|
||||||
pPtr->YGas() = this->composition().Y0(idGas);
|
parcel.YGas() = this->composition().Y0(idGas);
|
||||||
pPtr->YLiquid() = this->composition().Y0(idLiquid);
|
parcel.YLiquid() = this->composition().Y0(idLiquid);
|
||||||
pPtr->YSolid() = this->composition().Y0(idSolid);
|
parcel.YSolid() = this->composition().Y0(idSolid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->checkSuppliedComposition
|
this->checkSuppliedComposition
|
||||||
(
|
(
|
||||||
pPtr->YGas(),
|
parcel.YGas(),
|
||||||
this->composition().Y0(idGas),
|
this->composition().Y0(idGas),
|
||||||
"YGas"
|
"YGas"
|
||||||
);
|
);
|
||||||
this->checkSuppliedComposition
|
this->checkSuppliedComposition
|
||||||
(
|
(
|
||||||
pPtr->YLiquid(),
|
parcel.YLiquid(),
|
||||||
this->composition().Y0(idLiquid),
|
this->composition().Y0(idLiquid),
|
||||||
"YLiquid"
|
"YLiquid"
|
||||||
);
|
);
|
||||||
this->checkSuppliedComposition
|
this->checkSuppliedComposition
|
||||||
(
|
(
|
||||||
pPtr->YSolid(),
|
parcel.YSolid(),
|
||||||
this->composition().Y0(idSolid),
|
this->composition().Y0(idSolid),
|
||||||
"YSolid"
|
"YSolid"
|
||||||
);
|
);
|
||||||
|
|||||||
@ -178,7 +178,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
|
|||||||
@ -113,22 +113,22 @@ Foam::ThermoCloud<ParcelType>::~ThermoCloud()
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
KinematicCloud<ParcelType>::checkParcelProperties
|
KinematicCloud<ParcelType>::checkParcelProperties
|
||||||
(
|
(
|
||||||
pPtr,
|
parcel,
|
||||||
lagrangianDt,
|
lagrangianDt,
|
||||||
fullyDescribed
|
fullyDescribed
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!fullyDescribed)
|
if (!fullyDescribed)
|
||||||
{
|
{
|
||||||
pPtr->T() = constProps_.T0();
|
parcel.T() = constProps_.T0();
|
||||||
pPtr->cp() = constProps_.cp0();
|
parcel.cp() = constProps_.cp0();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,7 @@ public:
|
|||||||
//- Check parcel properties
|
//- Check parcel properties
|
||||||
void checkParcelProperties
|
void checkParcelProperties
|
||||||
(
|
(
|
||||||
ParcelType* pPtr,
|
ParcelType& parcel,
|
||||||
const scalar lagrangianDt,
|
const scalar lagrangianDt,
|
||||||
const bool fullyDescribed
|
const bool fullyDescribed
|
||||||
);
|
);
|
||||||
|
|||||||
@ -401,7 +401,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
|||||||
setProperties(parcelI, newParcels, timeInj, *pPtr);
|
setProperties(parcelI, newParcels, timeInj, *pPtr);
|
||||||
|
|
||||||
// Check new parcel properties
|
// Check new parcel properties
|
||||||
td.cloud().checkParcelProperties(pPtr, dt, fullyDescribed());
|
td.cloud().checkParcelProperties(*pPtr, dt, fullyDescribed());
|
||||||
|
|
||||||
// Apply correction to velocity for 2-D cases
|
// Apply correction to velocity for 2-D cases
|
||||||
meshTools::constrainDirection
|
meshTools::constrainDirection
|
||||||
|
|||||||
Reference in New Issue
Block a user