ThermoParcel, ReactingParcel: Removed continuous phase data
This commit is contained in:
@ -209,7 +209,7 @@ void Foam::KinematicCloud<CloudType>::evolveCloud
|
||||
// before it is required.
|
||||
cloud.motion(cloud, td);
|
||||
|
||||
stochasticCollision().update(solution_.trackTime());
|
||||
stochasticCollision().update(td, solution_.trackTime());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -221,7 +221,6 @@ void Foam::ReactingCloud<CloudType>::setParcelThermoProperties
|
||||
{
|
||||
CloudType::setParcelThermoProperties(parcel, lagrangianDt);
|
||||
|
||||
parcel.pc() = this->thermo().thermo().p()[parcel.cell()];
|
||||
parcel.Y() = composition().YMixture0();
|
||||
}
|
||||
|
||||
|
||||
@ -41,8 +41,7 @@ template<class TrackCloudType>
|
||||
void Foam::KinematicParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
@ -64,8 +63,18 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
|
||||
td.Uc() = td.UInterp().interpolate(this->coordinates(), tetIs);
|
||||
|
||||
td.muc() = td.muInterp().interpolate(this->coordinates(), tetIs);
|
||||
}
|
||||
|
||||
// Apply dispersion components to carrier phase velocity
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackCloudType>
|
||||
void Foam::KinematicParcel<ParcelType>::calcDispersion
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
td.Uc() = cloud.dispersion().update
|
||||
(
|
||||
dt,
|
||||
@ -305,7 +314,9 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
if (dt > ROOTVSMALL)
|
||||
{
|
||||
// Update cell based properties
|
||||
p.setCellValues(cloud, ttd, dt);
|
||||
p.setCellValues(cloud, ttd);
|
||||
|
||||
p.calcDispersion(cloud, ttd, dt);
|
||||
|
||||
if (cloud.solution().cellValueSourceCorrection())
|
||||
{
|
||||
|
||||
@ -573,7 +573,12 @@ public:
|
||||
|
||||
//- Set cell values
|
||||
template<class TrackCloudType>
|
||||
void setCellValues
|
||||
void setCellValues(TrackCloudType& cloud, trackingData& td);
|
||||
|
||||
//- Apply dispersion to the carrier phase velocity and update
|
||||
// parcel turbulence parameters
|
||||
template<class TrackCloudType>
|
||||
void calcDispersion
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
|
||||
@ -137,11 +137,10 @@ template<class TrackCloudType>
|
||||
void Foam::ReactingMultiphaseParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
ParcelType::setCellValues(cloud, td);
|
||||
}
|
||||
|
||||
|
||||
@ -182,7 +181,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
const scalar T0 = this->T_;
|
||||
const scalar mass0 = this->mass();
|
||||
|
||||
const scalar pc = this->pc_;
|
||||
const scalar pc = td.pc();
|
||||
|
||||
const scalarField& YMix = this->Y_;
|
||||
const label idG = composition.idGas();
|
||||
@ -568,8 +567,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
if (cloud.heatTransfer().BirdCorrection())
|
||||
{
|
||||
// Molar average molecular weight of carrier mix
|
||||
const scalar Wc =
|
||||
max(SMALL, td.rhoc()*RR*this->Tc_/this->pc_);
|
||||
const scalar Wc = max(SMALL, td.rhoc()*RR*td.Tc()/td.pc());
|
||||
|
||||
// Note: hardcoded gaseous diffusivities for now
|
||||
// TODO: add to carrier thermo
|
||||
@ -578,7 +576,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
forAll(dMassDV, i)
|
||||
{
|
||||
const label id = composition.localToCarrierId(GAS, i);
|
||||
const scalar Cp = composition.carrier().Cp(id, this->pc_, Ts);
|
||||
const scalar Cp = composition.carrier().Cp(id, td.pc(), Ts);
|
||||
const scalar W = composition.carrier().W(id);
|
||||
const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
@ -586,7 +584,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
|
||||
const scalar Dab =
|
||||
3.6059e-3*(pow(1.8*Ts, 1.75))
|
||||
*sqrt(1.0/W + 1.0/Wc)
|
||||
/(this->pc_*beta);
|
||||
/(td.pc()*beta);
|
||||
|
||||
N += Ni;
|
||||
NCpW += Ni*Cp*W;
|
||||
@ -644,8 +642,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
|
||||
this->cell(),
|
||||
d,
|
||||
T,
|
||||
this->Tc_,
|
||||
this->pc_,
|
||||
td.Tc(),
|
||||
td.pc(),
|
||||
td.rhoc(),
|
||||
mass,
|
||||
YGas,
|
||||
|
||||
@ -413,12 +413,7 @@ public:
|
||||
|
||||
//- Set cell values
|
||||
template<class TrackCloudType>
|
||||
void setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
void setCellValues(TrackCloudType& cloud, trackingData& td);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
template<class TrackCloudType>
|
||||
|
||||
@ -76,7 +76,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar TMax = phaseChange.TMax(pc_, X);
|
||||
const scalar TMax = phaseChange.TMax(td.pc(), X);
|
||||
const scalar Tdash = min(T, TMax);
|
||||
const scalar Tsdash = min(Ts, TMax);
|
||||
|
||||
@ -93,8 +93,8 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
nus,
|
||||
Tdash,
|
||||
Tsdash,
|
||||
pc_,
|
||||
this->Tc_,
|
||||
td.pc(),
|
||||
td.Tc(),
|
||||
X,
|
||||
dMassPC
|
||||
);
|
||||
@ -111,7 +111,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
{
|
||||
const label cid = composition.localToCarrierId(idPhase, i);
|
||||
|
||||
const scalar dh = phaseChange.dh(cid, i, pc_, Tdash);
|
||||
const scalar dh = phaseChange.dh(cid, i, td.pc(), Tdash);
|
||||
Sh -= dMassPC[i]*dh/dt;
|
||||
}
|
||||
|
||||
@ -120,18 +120,18 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
if (cloud.heatTransfer().BirdCorrection())
|
||||
{
|
||||
// Average molecular weight of carrier mix - assumes perfect gas
|
||||
const scalar Wc = td.rhoc()*RR*this->Tc_/this->pc_;
|
||||
const scalar Wc = td.rhoc()*RR*td.Tc()/td.pc();
|
||||
|
||||
forAll(dMassPC, i)
|
||||
{
|
||||
const label cid = composition.localToCarrierId(idPhase, i);
|
||||
|
||||
const scalar Cp = composition.carrier().Cp(cid, pc_, Tsdash);
|
||||
const scalar Cp = composition.carrier().Cp(cid, td.pc(), Tsdash);
|
||||
const scalar W = composition.carrier().W(cid);
|
||||
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
|
||||
|
||||
const scalar Dab =
|
||||
composition.liquids().properties()[i].D(pc_, Tsdash, Wc);
|
||||
composition.liquids().properties()[i].D(td.pc(), Tsdash, Wc);
|
||||
|
||||
// Molar flux of species coming from the particle (kmol/m^2/s)
|
||||
N += Ni;
|
||||
@ -179,8 +179,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
:
|
||||
ParcelType(p),
|
||||
mass0_(p.mass0_),
|
||||
Y_(p.Y_),
|
||||
pc_(p.pc_)
|
||||
Y_(p.Y_)
|
||||
{}
|
||||
|
||||
|
||||
@ -193,8 +192,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
:
|
||||
ParcelType(p, mesh),
|
||||
mass0_(p.mass0_),
|
||||
Y_(p.Y_),
|
||||
pc_(p.pc_)
|
||||
Y_(p.Y_)
|
||||
{}
|
||||
|
||||
|
||||
@ -205,19 +203,18 @@ template<class TrackCloudType>
|
||||
void Foam::ReactingParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
ParcelType::setCellValues(cloud, td);
|
||||
|
||||
pc_ = td.pInterp().interpolate
|
||||
td.pc() = td.pInterp().interpolate
|
||||
(
|
||||
this->coordinates(),
|
||||
this->currentTetIndices()
|
||||
);
|
||||
|
||||
if (pc_ < cloud.constProps().pMin())
|
||||
if (td.pc() < cloud.constProps().pMin())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -226,7 +223,7 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
||||
<< " to " << cloud.constProps().pMin() << nl << endl;
|
||||
}
|
||||
|
||||
pc_ = cloud.constProps().pMin();
|
||||
td.pc() = cloud.constProps().pMin();
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,20 +262,15 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
forAll(cloud.rhoTrans(), i)
|
||||
{
|
||||
scalar Y = cloud.rhoTrans(i)[this->cell()]/addedMass;
|
||||
CpEff += Y*cloud.composition().carrier().Cp
|
||||
(
|
||||
i,
|
||||
this->pc_,
|
||||
this->Tc_
|
||||
);
|
||||
CpEff += Y*cloud.composition().carrier().Cp(i, td.pc(), td.Tc());
|
||||
}
|
||||
|
||||
const scalar Cpc = td.CpInterp().psi()[this->cell()];
|
||||
this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew;
|
||||
td.Cpc() = (massCell*Cpc + addedMass*CpEff)/massCellNew;
|
||||
|
||||
this->Tc_ += cloud.hsTrans()[this->cell()]/(this->Cpc_*massCellNew);
|
||||
td.Tc() += cloud.hsTrans()[this->cell()]/(td.Cpc()*massCellNew);
|
||||
|
||||
if (this->Tc_ < cloud.constProps().TMin())
|
||||
if (td.Tc() < cloud.constProps().TMin())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -287,7 +279,7 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||
}
|
||||
|
||||
this->Tc_ = cloud.constProps().TMin();
|
||||
td.Tc() = cloud.constProps().TMin();
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,10 +316,10 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
Xinf /= sum(Xinf);
|
||||
|
||||
// Molar fraction of far field species at particle surface
|
||||
const scalar Xsff = 1.0 - min(sum(Cs)*RR*this->T_/pc_, 1.0);
|
||||
const scalar Xsff = 1.0 - min(sum(Cs)*RR*this->T_/td.pc(), 1.0);
|
||||
|
||||
// Surface carrier total molar concentration
|
||||
const scalar CsTot = pc_/(RR*this->T_);
|
||||
const scalar CsTot = td.pc()/(RR*this->T_);
|
||||
|
||||
// Surface carrier composition (molar fraction)
|
||||
scalarField Xs(Xinf.size());
|
||||
@ -361,9 +353,9 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
const scalar cbrtW = cbrt(W);
|
||||
|
||||
rhos += Xs[i]*W;
|
||||
mus += Ys[i]*sqrtW*thermo.carrier().mu(i, pc_, T);
|
||||
kappas += Ys[i]*cbrtW*thermo.carrier().kappa(i, pc_, T);
|
||||
Cps += Xs[i]*thermo.carrier().Cp(i, pc_, T);
|
||||
mus += Ys[i]*sqrtW*thermo.carrier().mu(i, td.pc(), T);
|
||||
kappas += Ys[i]*cbrtW*thermo.carrier().kappa(i, td.pc(), T);
|
||||
Cps += Xs[i]*thermo.carrier().Cp(i, td.pc(), T);
|
||||
|
||||
sumYiSqrtW += Ys[i]*sqrtW;
|
||||
sumYiCbrtW += Ys[i]*cbrtW;
|
||||
@ -371,7 +363,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
||||
|
||||
Cps = max(Cps, ROOTVSMALL);
|
||||
|
||||
rhos *= pc_/(RR*T);
|
||||
rhos *= td.pc()/(RR*T);
|
||||
rhos = max(rhos, ROOTVSMALL);
|
||||
|
||||
mus /= sumYiSqrtW;
|
||||
@ -484,7 +476,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
scalarField dMass(dMassPC);
|
||||
scalar mass1 = updateMassFraction(mass0, dMass, Y_);
|
||||
|
||||
this->Cp_ = composition.Cp(0, Y_, pc_, T0);
|
||||
this->Cp_ = composition.Cp(0, Y_, td.pc(), T0);
|
||||
|
||||
// Update particle density or diameter
|
||||
if (cloud.constProps().constantVolume())
|
||||
@ -510,7 +502,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
{
|
||||
scalar dmi = dm*Y_[i];
|
||||
label gid = composition.localToCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc_, T0);
|
||||
scalar hs = composition.carrier().Hs(gid, td.pc(), T0);
|
||||
|
||||
cloud.rhoTrans(gid)[this->cell()] += dmi;
|
||||
cloud.hsTrans()[this->cell()] += dmi*hs;
|
||||
@ -550,7 +542,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
Sph
|
||||
);
|
||||
|
||||
this->Cp_ = composition.Cp(0, Y_, pc_, T0);
|
||||
this->Cp_ = composition.Cp(0, Y_, td.pc(), T0);
|
||||
|
||||
|
||||
// Motion
|
||||
@ -571,7 +563,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
{
|
||||
scalar dm = np0*dMass[i];
|
||||
label gid = composition.localToCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, pc_, T0);
|
||||
scalar hs = composition.carrier().Hs(gid, td.pc(), T0);
|
||||
|
||||
cloud.rhoTrans(gid)[this->cell()] += dm;
|
||||
cloud.UTrans()[this->cell()] += dm*U0;
|
||||
|
||||
@ -127,6 +127,12 @@ public:
|
||||
autoPtr<interpolation<scalar>> pInterp_;
|
||||
|
||||
|
||||
// Cached continuous phase properties
|
||||
|
||||
//- Pressure [Pa]
|
||||
scalar pc_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef typename ParcelType::trackingData::trackPart trackPart;
|
||||
@ -147,6 +153,12 @@ public:
|
||||
//- Return const access to the interpolator for continuous phase
|
||||
// pressure field
|
||||
inline const interpolation<scalar>& pInterp() const;
|
||||
|
||||
//- Return the continuous phase pressure
|
||||
inline scalar pc() const;
|
||||
|
||||
//- Access the continuous phase pressure
|
||||
inline scalar& pc();
|
||||
};
|
||||
|
||||
|
||||
@ -163,12 +175,6 @@ protected:
|
||||
scalarField Y_;
|
||||
|
||||
|
||||
// Cell-based quantities
|
||||
|
||||
//- Pressure [Pa]
|
||||
scalar pc_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Calculate Phase change
|
||||
@ -328,12 +334,6 @@ public:
|
||||
//- Return const access to mass fractions of mixture []
|
||||
inline const scalarField& Y() const;
|
||||
|
||||
//- Return the owner cell pressure [Pa]
|
||||
inline scalar pc() const;
|
||||
|
||||
//- Return reference to the owner cell pressure [Pa]
|
||||
inline scalar& pc();
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
@ -348,12 +348,7 @@ public:
|
||||
|
||||
//- Set cell values
|
||||
template<class TrackCloudType>
|
||||
void setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
void setCellValues(TrackCloudType& cloud, trackingData& td);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
template<class TrackCloudType>
|
||||
|
||||
@ -71,8 +71,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
:
|
||||
ParcelType(mesh, coordinates, celli, tetFacei, tetPti),
|
||||
mass0_(0.0),
|
||||
Y_(0),
|
||||
pc_(0.0)
|
||||
Y_(0)
|
||||
{}
|
||||
|
||||
|
||||
@ -86,8 +85,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
:
|
||||
ParcelType(mesh, position, celli),
|
||||
mass0_(0.0),
|
||||
Y_(0),
|
||||
pc_(0.0)
|
||||
Y_(0)
|
||||
{}
|
||||
|
||||
|
||||
@ -129,8 +127,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
constProps
|
||||
),
|
||||
mass0_(0.0),
|
||||
Y_(Y0),
|
||||
pc_(0.0)
|
||||
Y_(Y0)
|
||||
{
|
||||
// Set initial parcel mass
|
||||
mass0_ = this->mass();
|
||||
@ -171,20 +168,6 @@ inline const Foam::scalarField& Foam::ReactingParcel<ParcelType>::Y() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ReactingParcel<ParcelType>::pc()
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ReactingParcel<ParcelType>::mass0()
|
||||
{
|
||||
|
||||
@ -51,8 +51,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
||||
:
|
||||
ParcelType(mesh, is, readFields),
|
||||
mass0_(0.0),
|
||||
Y_(0),
|
||||
pc_(0.0)
|
||||
Y_(0)
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
|
||||
@ -39,7 +39,8 @@ inline Foam::ReactingParcel<ParcelType>::trackingData::trackingData
|
||||
cloud.solution().interpolationSchemes(),
|
||||
cloud.p()
|
||||
)
|
||||
)
|
||||
),
|
||||
pc_(Zero)
|
||||
{}
|
||||
|
||||
|
||||
@ -51,4 +52,18 @@ Foam::ReactingParcel<ParcelType>::trackingData::pInterp() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ReactingParcel<ParcelType>::trackingData::pc() const
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ReactingParcel<ParcelType>::trackingData::pc()
|
||||
{
|
||||
return pc_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -35,19 +35,18 @@ template<class TrackCloudType>
|
||||
void Foam::ThermoParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
ParcelType::setCellValues(cloud, td);
|
||||
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
|
||||
Cpc_ = td.CpInterp().interpolate(this->coordinates(), tetIs);
|
||||
td.Cpc() = td.CpInterp().interpolate(this->coordinates(), tetIs);
|
||||
|
||||
Tc_ = td.TInterp().interpolate(this->coordinates(), tetIs);
|
||||
td.Tc() = td.TInterp().interpolate(this->coordinates(), tetIs);
|
||||
|
||||
if (Tc_ < cloud.constProps().TMin())
|
||||
if (td.Tc() < cloud.constProps().TMin())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -56,7 +55,7 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
||||
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||
}
|
||||
|
||||
Tc_ = cloud.constProps().TMin();
|
||||
td.Tc() = cloud.constProps().TMin();
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,9 +72,9 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
|
||||
td.Uc() += cloud.UTrans()[this->cell()]/this->massCell(td);
|
||||
|
||||
const scalar CpMean = td.CpInterp().psi()[this->cell()];
|
||||
Tc_ += cloud.hsTrans()[this->cell()]/(CpMean*this->massCell(td));
|
||||
td.Tc() += cloud.hsTrans()[this->cell()]/(CpMean*this->massCell(td));
|
||||
|
||||
if (Tc_ < cloud.constProps().TMin())
|
||||
if (td.Tc() < cloud.constProps().TMin())
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
@ -84,7 +83,7 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
|
||||
<< " to " << cloud.constProps().TMin() << nl << endl;
|
||||
}
|
||||
|
||||
Tc_ = cloud.constProps().TMin();
|
||||
td.Tc() = cloud.constProps().TMin();
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
||||
) const
|
||||
{
|
||||
// Surface temperature using two thirds rule
|
||||
Ts = (2.0*T + Tc_)/3.0;
|
||||
Ts = (2.0*T + td.Tc())/3.0;
|
||||
|
||||
if (Ts < cloud.constProps().TMin())
|
||||
{
|
||||
@ -119,7 +118,7 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
||||
}
|
||||
|
||||
// Assuming thermo props vary linearly with T for small d(T)
|
||||
const scalar TRatio = Tc_/Ts;
|
||||
const scalar TRatio = td.Tc()/Ts;
|
||||
|
||||
rhos = td.rhoc()*TRatio;
|
||||
|
||||
@ -127,7 +126,7 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
||||
mus = td.muInterp().interpolate(this->coordinates(), tetIs)/TRatio;
|
||||
kappas = td.kappaInterp().interpolate(this->coordinates(), tetIs)/TRatio;
|
||||
|
||||
Pr = Cpc_*mus/kappas;
|
||||
Pr = td.Cpc()*mus/kappas;
|
||||
Pr = max(ROOTVSMALL, Pr);
|
||||
}
|
||||
|
||||
@ -281,7 +280,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
htc = max(htc, ROOTVSMALL);
|
||||
const scalar As = this->areaS(d);
|
||||
|
||||
scalar ap = Tc_ + Sh/(As*htc);
|
||||
scalar ap = td.Tc() + Sh/(As*htc);
|
||||
const scalar bp = 6.0*htc/max(rho*d*Cp_, ROOTVSMALL);
|
||||
|
||||
if (cloud.radiation())
|
||||
@ -314,7 +313,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
|
||||
Sph = dt*htc*As;
|
||||
|
||||
dhsTrans += Sph*(Tres.average() - Tc_);
|
||||
dhsTrans += Sph*(Tres.average() - td.Tc());
|
||||
|
||||
return Tnew;
|
||||
}
|
||||
@ -330,9 +329,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
:
|
||||
ParcelType(p),
|
||||
T_(p.T_),
|
||||
Cp_(p.Cp_),
|
||||
Tc_(p.Tc_),
|
||||
Cpc_(p.Cpc_)
|
||||
Cp_(p.Cp_)
|
||||
{}
|
||||
|
||||
|
||||
@ -345,9 +342,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
:
|
||||
ParcelType(p, mesh),
|
||||
T_(p.T_),
|
||||
Cp_(p.Cp_),
|
||||
Tc_(p.Tc_),
|
||||
Cpc_(p.Cpc_)
|
||||
Cp_(p.Cp_)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -178,6 +178,15 @@ public:
|
||||
autoPtr<interpolation<scalar>> GInterp_;
|
||||
|
||||
|
||||
// Cached continuous phase properties
|
||||
|
||||
//- Temperature [K]
|
||||
scalar Tc_;
|
||||
|
||||
//- Specific heat capacity [J/(kg.K)]
|
||||
scalar Cpc_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef typename ParcelType::trackingData::trackPart trackPart;
|
||||
@ -216,6 +225,18 @@ public:
|
||||
//- Return const access to the interpolator for continuous
|
||||
// radiation field
|
||||
inline const interpolation<scalar>& GInterp() const;
|
||||
|
||||
//- Return the continuous phase temperature
|
||||
inline scalar Tc() const;
|
||||
|
||||
//- Access the continuous phase temperature
|
||||
inline scalar& Tc();
|
||||
|
||||
//- Return the continuous phase specific heat capacity
|
||||
inline scalar Cpc() const;
|
||||
|
||||
//- Access the continuous phase specific heat capacity
|
||||
inline scalar& Cpc();
|
||||
};
|
||||
|
||||
|
||||
@ -232,15 +253,6 @@ protected:
|
||||
scalar Cp_;
|
||||
|
||||
|
||||
// Cell-based quantities
|
||||
|
||||
//- Temperature [K]
|
||||
scalar Tc_;
|
||||
|
||||
//- Specific heat capacity [J/(kg.K)]
|
||||
scalar Cpc_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Calculate new particle temperature
|
||||
@ -379,12 +391,6 @@ public:
|
||||
//- Return the parcel sensible enthalpy
|
||||
inline scalar hs() const;
|
||||
|
||||
//- Return const access to carrier temperature
|
||||
inline scalar Tc() const;
|
||||
|
||||
//- Return const access to carrier specific heat capacity
|
||||
inline scalar Cpc() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
@ -399,12 +405,7 @@ public:
|
||||
|
||||
//- Set cell values
|
||||
template<class TrackCloudType>
|
||||
void setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
void setCellValues(TrackCloudType& cloud, trackingData& td);
|
||||
|
||||
//- Correct cell values using latest transfer information
|
||||
template<class TrackCloudType>
|
||||
|
||||
@ -82,9 +82,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
:
|
||||
ParcelType(mesh, coordinates, celli, tetFacei, tetPti),
|
||||
T_(0.0),
|
||||
Cp_(0.0),
|
||||
Tc_(0.0),
|
||||
Cpc_(0.0)
|
||||
Cp_(0.0)
|
||||
{}
|
||||
|
||||
|
||||
@ -98,9 +96,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
:
|
||||
ParcelType(mesh, position, celli),
|
||||
T_(0.0),
|
||||
Cp_(0.0),
|
||||
Tc_(0.0),
|
||||
Cpc_(0.0)
|
||||
Cp_(0.0)
|
||||
{}
|
||||
|
||||
|
||||
@ -141,9 +137,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
constProps
|
||||
),
|
||||
T_(constProps.T0()),
|
||||
Cp_(constProps.Cp0()),
|
||||
Tc_(0.0),
|
||||
Cpc_(0.0)
|
||||
Cp_(constProps.Cp0())
|
||||
{}
|
||||
|
||||
|
||||
@ -228,20 +222,6 @@ inline Foam::scalar Foam::ThermoParcel<ParcelType>::hs() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::Tc() const
|
||||
{
|
||||
return Tc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::Cpc() const
|
||||
{
|
||||
return Cpc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::string Foam::ThermoParcel<ParcelType>::propertyList_ =
|
||||
template<class ParcelType>
|
||||
const std::size_t Foam::ThermoParcel<ParcelType>::sizeofFields_
|
||||
(
|
||||
offsetof(ThermoParcel<ParcelType>, Tc_)
|
||||
sizeof(ThermoParcel<ParcelType>)
|
||||
- offsetof(ThermoParcel<ParcelType>, T_)
|
||||
);
|
||||
|
||||
@ -52,9 +52,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
||||
:
|
||||
ParcelType(mesh, is, readFields),
|
||||
T_(0.0),
|
||||
Cp_(0.0),
|
||||
Tc_(0.0),
|
||||
Cpc_(0.0)
|
||||
Cp_(0.0)
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
|
||||
@ -58,7 +58,9 @@ inline Foam::ThermoParcel<ParcelType>::trackingData::trackingData
|
||||
kappa_
|
||||
)
|
||||
),
|
||||
GInterp_(nullptr)
|
||||
GInterp_(nullptr),
|
||||
Tc_(Zero),
|
||||
Cpc_(Zero)
|
||||
{
|
||||
if (cloud.radiation())
|
||||
{
|
||||
@ -130,4 +132,32 @@ Foam::ThermoParcel<ParcelType>::trackingData::GInterp() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::trackingData::Tc() const
|
||||
{
|
||||
return Tc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ThermoParcel<ParcelType>::trackingData::Tc()
|
||||
{
|
||||
return Tc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::ThermoParcel<ParcelType>::trackingData::Cpc() const
|
||||
{
|
||||
return Cpc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::ThermoParcel<ParcelType>::trackingData::Cpc()
|
||||
{
|
||||
return Cpc_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -28,7 +28,11 @@ License
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::NoStochasticCollision<CloudType>::collide(const scalar)
|
||||
void Foam::NoStochasticCollision<CloudType>::collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData&,
|
||||
const scalar
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,7 +52,11 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Update the model
|
||||
virtual void collide(const scalar dt);
|
||||
virtual void collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,11 +69,15 @@ Foam::StochasticCollisionModel<CloudType>::~StochasticCollisionModel()
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::StochasticCollisionModel<CloudType>::update(const scalar dt)
|
||||
void Foam::StochasticCollisionModel<CloudType>::update
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
if (this->active())
|
||||
{
|
||||
this->collide(dt);
|
||||
this->collide(td, dt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,7 +58,11 @@ class StochasticCollisionModel
|
||||
protected:
|
||||
|
||||
//- Main collision routine
|
||||
virtual void collide(const scalar dt) = 0;
|
||||
virtual void collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
) = 0;
|
||||
|
||||
|
||||
public:
|
||||
@ -115,7 +119,11 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Update the model
|
||||
void update(const scalar dt);
|
||||
void update
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,7 +29,11 @@ License
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::SuppressionCollision<CloudType>::collide(const scalar dt)
|
||||
void Foam::SuppressionCollision<CloudType>::collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
const kinematicCloud& sc =
|
||||
this->owner().mesh().template
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -62,7 +62,11 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Update the model
|
||||
virtual void collide(const scalar dt);
|
||||
virtual void collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -162,12 +162,13 @@ void Foam::SprayCloud<CloudType>::setParcelThermoProperties
|
||||
|
||||
const scalarField& Y(parcel.Y());
|
||||
scalarField X(liqMix.X(Y));
|
||||
const scalar pc = this->p()[parcel.cell()];
|
||||
|
||||
// override rho and Cp from constantProperties
|
||||
parcel.Cp() = liqMix.Cp(parcel.pc(), parcel.T(), X);
|
||||
parcel.rho() = liqMix.rho(parcel.pc(), parcel.T(), X);
|
||||
parcel.sigma() = liqMix.sigma(parcel.pc(), parcel.T(), X);
|
||||
parcel.mu() = liqMix.mu(parcel.pc(), parcel.T(), X);
|
||||
parcel.Cp() = liqMix.Cp(pc, parcel.T(), X);
|
||||
parcel.rho() = liqMix.rho(pc, parcel.T(), X);
|
||||
parcel.sigma() = liqMix.sigma(pc, parcel.T(), X);
|
||||
parcel.mu() = liqMix.mu(pc, parcel.T(), X);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,11 +34,10 @@ template<class TrackCloudType>
|
||||
void Foam::SprayParcel<ParcelType>::setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
trackingData& td
|
||||
)
|
||||
{
|
||||
ParcelType::setCellValues(cloud, td, dt);
|
||||
ParcelType::setCellValues(cloud, td);
|
||||
}
|
||||
|
||||
|
||||
@ -81,7 +80,7 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
// Check if we have critical or boiling conditions
|
||||
scalar TMax = composition.liquids().Tc(X0);
|
||||
const scalar T0 = this->T();
|
||||
const scalar pc0 = this->pc_;
|
||||
const scalar pc0 = td.pc();
|
||||
if (composition.liquids().pv(pc0, T0, X0) >= pc0*0.999)
|
||||
{
|
||||
// Set TMax to boiling temperature
|
||||
@ -112,14 +111,14 @@ void Foam::SprayParcel<ParcelType>::calc
|
||||
scalar T1 = this->T();
|
||||
scalarField X1(composition.liquids().X(this->Y()));
|
||||
|
||||
this->Cp() = composition.liquids().Cp(this->pc_, T1, X1);
|
||||
this->Cp() = composition.liquids().Cp(td.pc(), T1, X1);
|
||||
|
||||
sigma_ = composition.liquids().sigma(this->pc_, T1, X1);
|
||||
sigma_ = composition.liquids().sigma(td.pc(), T1, X1);
|
||||
|
||||
scalar rho1 = composition.liquids().rho(this->pc_, T1, X1);
|
||||
scalar rho1 = composition.liquids().rho(td.pc(), T1, X1);
|
||||
this->rho() = rho1;
|
||||
|
||||
mu_ = composition.liquids().mu(this->pc_, T1, X1);
|
||||
mu_ = composition.liquids().mu(td.pc(), T1, X1);
|
||||
|
||||
scalar d1 = this->d()*cbrt(rho0/rho1);
|
||||
this->d() = d1;
|
||||
@ -162,12 +161,12 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
|
||||
cloud.atomization();
|
||||
|
||||
// Average molecular weight of carrier mix - assumes perfect gas
|
||||
scalar Wc = td.rhoc()*RR*this->Tc()/this->pc();
|
||||
scalar Wc = td.rhoc()*RR*td.Tc()/td.pc();
|
||||
scalar R = RR/Wc;
|
||||
scalar Tav = atomization.Taverage(this->T(), this->Tc());
|
||||
scalar Tav = atomization.Taverage(this->T(), td.Tc());
|
||||
|
||||
// Calculate average gas density based on average temperature
|
||||
scalar rhoAv = this->pc()/(R*Tav);
|
||||
scalar rhoAv = td.pc()/(R*Tav);
|
||||
|
||||
scalar soi = cloud.injectors().timeStart();
|
||||
scalar currentTime = cloud.db().time().value();
|
||||
@ -233,12 +232,12 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
||||
}
|
||||
|
||||
// Average molecular weight of carrier mix - assumes perfect gas
|
||||
scalar Wc = td.rhoc()*RR*this->Tc()/this->pc();
|
||||
scalar Wc = td.rhoc()*RR*td.Tc()/td.pc();
|
||||
scalar R = RR/Wc;
|
||||
scalar Tav = cloud.atomization().Taverage(this->T(), this->Tc());
|
||||
scalar Tav = cloud.atomization().Taverage(this->T(), td.Tc());
|
||||
|
||||
// Calculate average gas density based on average temperature
|
||||
scalar rhoAv = this->pc()/(R*Tav);
|
||||
scalar rhoAv = td.pc()/(R*Tav);
|
||||
scalar muAv = td.muc();
|
||||
vector Urel = this->U() - td.Uc();
|
||||
scalar Urmag = mag(Urel);
|
||||
@ -307,7 +306,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
|
||||
child->injector() = this->injector();
|
||||
child->tMom() = massChild/(Fcp.Sp() + Fncp.Sp());
|
||||
child->user() = 0.0;
|
||||
child->setCellValues(cloud, td, dt);
|
||||
child->calcDispersion(cloud, td, dt);
|
||||
|
||||
cloud.addParticle(child);
|
||||
}
|
||||
@ -331,7 +330,7 @@ Foam::scalar Foam::SprayParcel<ParcelType>::chi
|
||||
|
||||
scalar chi = 0.0;
|
||||
scalar T0 = this->T();
|
||||
scalar p0 = this->pc();
|
||||
scalar p0 = td.pc();
|
||||
scalar pAmb = cloud.pAmbient();
|
||||
|
||||
scalar pv = composition.liquids().pv(p0, T0, X);
|
||||
|
||||
@ -383,12 +383,7 @@ public:
|
||||
|
||||
//- Set cell values
|
||||
template<class TrackCloudType>
|
||||
void setCellValues
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
void setCellValues(TrackCloudType& cloud, trackingData& td);
|
||||
|
||||
//- Correct parcel properties according to atomization model
|
||||
template<class TrackCloudType>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -33,7 +33,11 @@ using namespace Foam::constant::mathematical;
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::ORourkeCollision<CloudType>::collide(const scalar dt)
|
||||
void Foam::ORourkeCollision<CloudType>::collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
// Create the occupancy list for the cells
|
||||
labelList occupancy(this->owner().mesh().nCells(), 0);
|
||||
@ -77,20 +81,22 @@ void Foam::ORourkeCollision<CloudType>::collide(const scalar dt)
|
||||
if (m1 > ROOTVSMALL)
|
||||
{
|
||||
const scalarField X(liquids_.X(p1.Y()));
|
||||
p1.rho() = liquids_.rho(p1.pc(), p1.T(), X);
|
||||
p1.Cp() = liquids_.Cp(p1.pc(), p1.T(), X);
|
||||
p1.sigma() = liquids_.sigma(p1.pc(), p1.T(), X);
|
||||
p1.mu() = liquids_.mu(p1.pc(), p1.T(), X);
|
||||
p1.setCellValues(this->owner(), td);
|
||||
p1.rho() = liquids_.rho(td.pc(), p1.T(), X);
|
||||
p1.Cp() = liquids_.Cp(td.pc(), p1.T(), X);
|
||||
p1.sigma() = liquids_.sigma(td.pc(), p1.T(), X);
|
||||
p1.mu() = liquids_.mu(td.pc(), p1.T(), X);
|
||||
p1.d() = cbrt(6.0*m1/(p1.nParticle()*p1.rho()*pi));
|
||||
}
|
||||
|
||||
if (m2 > ROOTVSMALL)
|
||||
{
|
||||
const scalarField X(liquids_.X(p2.Y()));
|
||||
p2.rho() = liquids_.rho(p2.pc(), p2.T(), X);
|
||||
p2.Cp() = liquids_.Cp(p2.pc(), p2.T(), X);
|
||||
p2.sigma() = liquids_.sigma(p2.pc(), p2.T(), X);
|
||||
p2.mu() = liquids_.mu(p2.pc(), p2.T(), X);
|
||||
p2.setCellValues(this->owner(), td);
|
||||
p2.rho() = liquids_.rho(td.pc(), p2.T(), X);
|
||||
p2.Cp() = liquids_.Cp(td.pc(), p2.T(), X);
|
||||
p2.sigma() = liquids_.sigma(td.pc(), p2.T(), X);
|
||||
p2.mu() = liquids_.mu(td.pc(), p2.T(), X);
|
||||
p2.d() = cbrt(6.0*m2/(p2.nParticle()*p2.rho()*pi));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,7 +65,11 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Main collision routine
|
||||
virtual void collide(const scalar dt);
|
||||
virtual void collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Collide parcels and return true if mass has changed
|
||||
virtual bool collideParcels
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -28,9 +28,13 @@ License
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::TrajectoryCollision<CloudType>::collide(const scalar dt)
|
||||
void Foam::TrajectoryCollision<CloudType>::collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
ORourkeCollision<CloudType>::collide(dt);
|
||||
ORourkeCollision<CloudType>::collide(td, dt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,7 +65,11 @@ protected:
|
||||
// Protected Member Functions
|
||||
|
||||
//- Main collision routine
|
||||
virtual void collide(const scalar dt);
|
||||
virtual void collide
|
||||
(
|
||||
typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Collide parcels and return true if mass has changed
|
||||
virtual bool collideParcels
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -160,6 +160,7 @@ template<class CloudType>
|
||||
Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const scalar mass,
|
||||
const scalar Re,
|
||||
@ -169,7 +170,7 @@ Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled
|
||||
forceSuSp value(Zero, 0.0);
|
||||
|
||||
const scalar dp = p.d();
|
||||
const scalar Tc = p.Tc();
|
||||
const scalar Tc = td.Tc();
|
||||
|
||||
const scalar alpha = 2.0*lambda_/dp;
|
||||
const scalar cc = 1.0 + alpha*(1.257 + 0.4*exp(-1.1/alpha));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -142,6 +142,7 @@ public:
|
||||
virtual forceSuSp calcCoupled
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const typename CloudType::parcelType::trackingData& td,
|
||||
const scalar dt,
|
||||
const scalar mass,
|
||||
const scalar Re,
|
||||
|
||||
Reference in New Issue
Block a user