KinematicParcel: Removed continuous phase data

Interpolated continuous phase data is only needed during a track and
therefore shouldn't be stored on the parcel. The continuous velocity,
density and viscosity have been moved from the kinematic parcel to the
kinematic parcel tracking data. This reduces the memory usage of the
kinematic layer by about one third. The thermo and reacting layers still
require the same treatment.
This commit is contained in:
Will Bainbridge
2017-08-29 08:42:53 +01:00
committed by Andrew Heather
parent 30c2f8fa8d
commit 402b86371c
44 changed files with 316 additions and 196 deletions

View File

@ -48,9 +48,9 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
{
tetIndices tetIs = this->currentTetIndices();
rhoc_ = td.rhoInterp().interpolate(this->coordinates(), tetIs);
td.rhoc() = td.rhoInterp().interpolate(this->coordinates(), tetIs);
if (rhoc_ < cloud.constProps().rhoMin())
if (td.rhoc() < cloud.constProps().rhoMin())
{
if (debug)
{
@ -59,20 +59,20 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
<< " to " << cloud.constProps().rhoMin() << nl << endl;
}
rhoc_ = cloud.constProps().rhoMin();
td.rhoc() = cloud.constProps().rhoMin();
}
Uc_ = td.UInterp().interpolate(this->coordinates(), tetIs);
td.Uc() = td.UInterp().interpolate(this->coordinates(), tetIs);
muc_ = td.muInterp().interpolate(this->coordinates(), tetIs);
td.muc() = td.muInterp().interpolate(this->coordinates(), tetIs);
// Apply dispersion components to carrier phase velocity
Uc_ = cloud.dispersion().update
td.Uc() = cloud.dispersion().update
(
dt,
this->cell(),
U_,
Uc_,
td.Uc(),
UTurb_,
tTurb_
);
@ -88,7 +88,7 @@ void Foam::KinematicParcel<ParcelType>::cellValueSourceCorrection
const scalar dt
)
{
Uc_ += cloud.UTrans()[this->cell()]/massCell(this->cell());
td.Uc() += cloud.UTrans()[this->cell()]/massCell(td);
}
@ -107,7 +107,7 @@ void Foam::KinematicParcel<ParcelType>::calc
const scalar mass0 = mass();
// Reynolds number
const scalar Re = this->Re(U_, d_, rhoc_, muc_);
const scalar Re = this->Re(td);
// Sources
@ -127,7 +127,8 @@ void Foam::KinematicParcel<ParcelType>::calc
// ~~~~~~
// Calculate new particle velocity
this->U_ = calcVelocity(cloud, td, dt, Re, muc_, mass0, Su, dUTrans, Spu);
this->U_ =
calcVelocity(cloud, td, dt, Re, td.muc(), mass0, Su, dUTrans, Spu);
// Accumulate carrier phase source terms
@ -158,24 +159,25 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
scalar& Spu
) const
{
typedef typename TrackCloudType::parcelType parcelType;
typedef typename TrackCloudType::forceType forceType;
const typename TrackCloudType::parcelType& p =
static_cast<const typename TrackCloudType::parcelType&>(*this);
typename TrackCloudType::parcelType::trackingData& ttd =
static_cast<typename TrackCloudType::parcelType::trackingData&>(td);
const forceType& forces = cloud.forces();
const typename TrackCloudType::forceType& forces = cloud.forces();
// Momentum source due to particle forces
const parcelType& p = static_cast<const parcelType&>(*this);
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, mu);
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, mu);
const forceSuSp Fcp = forces.calcCoupled(p, ttd, dt, mass, Re, mu);
const forceSuSp Fncp = forces.calcNonCoupled(p, ttd, dt, mass, Re, mu);
const forceSuSp Feff = Fcp + Fncp;
const scalar massEff = forces.massEff(p, mass);
const scalar massEff = forces.massEff(p, ttd, mass);
// New particle velocity
//~~~~~~~~~~~~~~~~~~~~~~
// Update velocity - treat as 3-D
const vector abp = (Feff.Sp()*Uc_ + (Feff.Su() + Su))/massEff;
const vector abp = (Feff.Sp()*td.Uc() + (Feff.Su() + Su))/massEff;
const scalar bp = Feff.Sp()/massEff;
Spu = dt*Feff.Sp();
@ -186,7 +188,7 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
vector Unew = Ures.value();
// note: Feff.Sp() and Fc.Sp() must be the same
dUTrans += dt*(Feff.Sp()*(Ures.average() - Uc_) - Fcp.Su());
dUTrans += dt*(Feff.Sp()*(Ures.average() - td.Uc()) - Fcp.Su());
// Apply correction to velocity and dUTrans for reduced-D cases
const polyMesh& mesh = cloud.pMesh();
@ -215,10 +217,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
rho_(p.rho_),
age_(p.age_),
tTurb_(p.tTurb_),
UTurb_(p.UTurb_),
rhoc_(p.rhoc_),
Uc_(p.Uc_),
muc_(p.muc_)
UTurb_(p.UTurb_)
{}
@ -239,10 +238,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
rho_(p.rho_),
age_(p.age_),
tTurb_(p.tTurb_),
UTurb_(p.UTurb_),
rhoc_(p.rhoc_),
Uc_(p.Uc_),
muc_(p.muc_)
UTurb_(p.UTurb_)
{}
@ -259,14 +255,12 @@ bool Foam::KinematicParcel<ParcelType>::move
{
typename TrackCloudType::parcelType& p =
static_cast<typename TrackCloudType::parcelType&>(*this);
typename TrackCloudType::particleType::trackingData& ttd =
static_cast<typename TrackCloudType::particleType::trackingData&>(td);
typename TrackCloudType::parcelType::trackingData& ttd =
static_cast<typename TrackCloudType::parcelType::trackingData&>(td);
ttd.switchProcessor = false;
ttd.keepParticle = true;
const polyMesh& mesh = cloud.pMesh();
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
const cloudSolution& solution = cloud.solution();
const scalarField& cellLengthScale = cloud.cellLengthScale();
const scalar maxCo = solution.maxCo();

View File

@ -184,6 +184,18 @@ public:
autoPtr<interpolation<scalar>> muInterp_;
// Cached continuous phase properties
//- Density [kg/m3]
scalar rhoc_;
//- Velocity [m/s]
vector Uc_;
//- Viscosity [Pa.s]
scalar muc_;
//- Local gravitational or other body-force acceleration
const vector& g_;
@ -219,6 +231,24 @@ public:
// phase dynamic viscosity field
inline const interpolation<scalar>& muInterp() const;
//- Return the continuous phase density
inline scalar rhoc() const;
//- Access the continuous phase density
inline scalar& rhoc();
//- Return the continuous phase velocity
inline const vector& Uc() const;
//- Access the continuous phase velocity
inline vector& Uc();
//- Return the continuous phase viscosity
inline scalar muc() const;
//- Access the continuous phase viscosity
inline scalar& muc();
// Return const access to the gravitational acceleration vector
inline const vector& g() const;
@ -268,18 +298,6 @@ protected:
vector UTurb_;
// Cell-based quantities
//- Density [kg/m3]
scalar rhoc_;
//- Velocity [m/s]
vector Uc_;
//- Viscosity [Pa.s]
scalar muc_;
// Protected Member Functions
//- Calculate new particle velocity
@ -459,15 +477,6 @@ public:
//- Return const access to turbulent velocity fluctuation
inline const vector& UTurb() const;
//- Return const access to carrier density [kg/m3]
inline scalar rhoc() const;
//- Return const access to carrier velocity [m/s]
inline const vector& Uc() const;
//- Return const access to carrier viscosity [Pa.s]
inline scalar muc() const;
// Edit
@ -505,7 +514,7 @@ public:
// Helper functions
//- Cell owner mass
inline scalar massCell(const label celli) const;
inline scalar massCell(const trackingData& td) const;
//- Particle mass
inline scalar mass() const;
@ -532,31 +541,53 @@ public:
inline static scalar areaS(const scalar d);
//- Reynolds number
inline scalar Re
inline scalar Re(const trackingData& td) const;
//- Reynolds number for given conditions
inline static scalar Re
(
const vector& U, // particle velocity
const scalar d, // particle diameter
const scalar rhoc, // carrier density
const scalar muc // carrier dynamic viscosity
) const;
const scalar rhoc,
const vector& U,
const vector& Uc,
const scalar d,
const scalar muc
);
//- Weber number
inline scalar We
(
const vector& U, // particle velocity
const scalar d, // particle diameter
const scalar rhoc, // carrier density
const scalar sigma // particle surface tension
const trackingData& td,
const scalar sigma
) const;
//- Weber number for given conditions
inline static scalar We
(
const scalar rhoc,
const vector& U,
const vector& Uc,
const scalar d,
const scalar sigma
);
//- Eotvos number
inline scalar Eo
(
const vector& a, // acceleration
const scalar d, // particle diameter
const scalar sigma // particle surface tension
const trackingData& td,
const scalar sigma
) const;
//- Eotvos number for given conditions
inline static scalar Eo
(
const vector& g,
const scalar rho,
const scalar rhoc,
const vector& U,
const scalar d,
const scalar sigma
);
// Main calculation loop

View File

@ -89,10 +89,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
rho_(0.0),
age_(0.0),
tTurb_(0.0),
UTurb_(Zero),
rhoc_(0.0),
Uc_(Zero),
muc_(0.0)
UTurb_(Zero)
{}
@ -114,10 +111,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
rho_(0.0),
age_(0.0),
tTurb_(0.0),
UTurb_(Zero),
rhoc_(0.0),
Uc_(Zero),
muc_(0.0)
UTurb_(Zero)
{}
@ -147,10 +141,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
rho_(constProps.rho0()),
age_(0.0),
tTurb_(0.0),
UTurb_(Zero),
rhoc_(0.0),
Uc_(Zero),
muc_(0.0)
UTurb_(Zero)
{}
@ -269,28 +260,7 @@ inline const Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb() const
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::rhoc() const
{
return rhoc_;
}
template<class ParcelType>
inline const Foam::vector& Foam::KinematicParcel<ParcelType>::Uc() const
{
return Uc_;
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::muc() const
{
return muc_;
}
template<class ParcelType>
inline void Foam::KinematicParcel<ParcelType>::active(const bool state)
inline bool& Foam::KinematicParcel<ParcelType>::active()
{
active_ = state;
}
@ -362,10 +332,10 @@ inline Foam::vector& Foam::KinematicParcel<ParcelType>::UTurb()
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::massCell
(
const label celli
const trackingData& td
) const
{
return rhoc_*this->mesh().cellVolumes()[celli];
return td.rhoc()*this->mesh().cellVolumes()[this->cell()];
}
@ -428,39 +398,76 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::areaS(const scalar d)
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::Re
(
const vector& U,
const scalar d,
const scalar rhoc,
const scalar muc
const trackingData& td
) const
{
return rhoc*mag(U - Uc_)*d/(muc + ROOTVSMALL);
return Re(td.rhoc(), U_, td.Uc(), d_, td.muc());
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::Re
(
const scalar rhoc,
const vector& U,
const vector& Uc,
const scalar d,
const scalar muc
)
{
return rhoc*mag(U - Uc)*d/max(muc, ROOTVSMALL);
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::We
(
const vector& U,
const scalar d,
const scalar rhoc,
const trackingData& td,
const scalar sigma
) const
{
return rhoc*magSqr(U - Uc_)*d/(sigma + ROOTVSMALL);
return We(td.rhoc(), U_, td.Uc(), d_, sigma);
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::We
(
const scalar rhoc,
const vector& U,
const vector& Uc,
const scalar d,
const scalar sigma
)
{
return rhoc*magSqr(U - Uc)*d/max(sigma, ROOTVSMALL);
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::Eo
(
const vector& a,
const scalar d,
const trackingData& td,
const scalar sigma
) const
{
vector dir = U_/(mag(U_) + ROOTVSMALL);
return mag(a & dir)*(rho_ - rhoc_)*sqr(d)/(sigma + ROOTVSMALL);
return Eo(td.g(), rho_, td.rhoc(), U_, d_, sigma);
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::Eo
(
const vector& g,
const scalar rho,
const scalar rhoc,
const vector& U,
const scalar d,
const scalar sigma
)
{
const vector dir = U/max(mag(U), ROOTVSMALL);
return mag(g & dir)*(rho - rhoc)*sqr(d)/max(sigma, ROOTVSMALL);
}

View File

@ -41,7 +41,7 @@ Foam::string Foam::KinematicParcel<ParcelType>::propertyTypes_ =
template<class ParcelType>
const std::size_t Foam::KinematicParcel<ParcelType>::sizeofFields
(
offsetof(KinematicParcel<ParcelType>, rhoc_)
sizeof(KinematicParcel<ParcelType>)
- offsetof(KinematicParcel<ParcelType>, active_)
);
@ -66,10 +66,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
rho_(0.0),
age_(0.0),
tTurb_(0.0),
UTurb_(Zero),
rhoc_(0.0),
Uc_(Zero),
muc_(0.0)
UTurb_(Zero)
{
if (readFields)
{

View File

@ -56,6 +56,9 @@ inline Foam::KinematicParcel<ParcelType>::trackingData::trackingData
cloud.mu()
)
),
rhoc_(Zero),
Uc_(Zero),
muc_(Zero),
g_(cloud.g().value()),
part_(part)
{}
@ -93,6 +96,50 @@ Foam::KinematicParcel<ParcelType>::trackingData::g() const
}
template<class ParcelType>
inline Foam::scalar
Foam::KinematicParcel<ParcelType>::trackingData::rhoc() const
{
return rhoc_;
}
template<class ParcelType>
inline Foam::scalar& Foam::KinematicParcel<ParcelType>::trackingData::rhoc()
{
return rhoc_;
}
template<class ParcelType>
inline const Foam::vector&
Foam::KinematicParcel<ParcelType>::trackingData::Uc() const
{
return Uc_;
}
template<class ParcelType>
inline Foam::vector& Foam::KinematicParcel<ParcelType>::trackingData::Uc()
{
return Uc_;
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::trackingData::muc() const
{
return muc_;
}
template<class ParcelType>
inline Foam::scalar& Foam::KinematicParcel<ParcelType>::trackingData::muc()
{
return muc_;
}
template<class ParcelType>
inline typename Foam::KinematicParcel<ParcelType>::trackingData::trackPart
Foam::KinematicParcel<ParcelType>::trackingData::part() const

View File

@ -198,7 +198,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Calc surface values
scalar Ts, rhos, mus, Prs, kappas;
this->calcSurfaceValues(cloud, td, T0, Ts, rhos, mus, Prs, kappas);
scalar Res = this->Re(U0, d0, rhos, mus);
scalar Res = this->Re(rhos, U0, td.Uc(), d0, mus);
// Sources
@ -390,7 +390,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Correct surface values due to emitted species
this->correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
Res = this->Re(U0, this->d_, rhos, mus);
Res = this->Re(rhos, U0, td.Uc(), this->d_, mus);
// 3. Compute heat- and momentum transfers
@ -572,7 +572,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
{
// Molar average molecular weight of carrier mix
const scalar Wc =
max(SMALL, this->rhoc_*RR*this->Tc_/this->pc_);
max(SMALL, td.rhoc()*RR*this->Tc_/this->pc_);
// Note: hardcoded gaseous diffusivities for now
// TODO: add to carrier thermo
@ -649,7 +649,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
T,
this->Tc_,
this->pc_,
this->rhoc_,
td.rhoc(),
mass,
YGas,
YLiquid,

View File

@ -116,7 +116,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
if (cloud.heatTransfer().BirdCorrection())
{
// Average molecular weight of carrier mix - assumes perfect gas
const scalar Wc = this->rhoc_*RR*this->Tc_/this->pc_;
const scalar Wc = td.rhoc()*RR*this->Tc_/this->pc_;
forAll(dMassPC, i)
{
@ -250,12 +250,12 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
return;
}
const scalar massCell = this->massCell(this->cell());
const scalar massCell = this->massCell(td);
this->rhoc_ += addedMass/cloud.pMesh().cellVolumes()[this->cell()];
td.rhoc() += addedMass/cloud.pMesh().cellVolumes()[this->cell()];
const scalar massCellNew = massCell + addedMass;
this->Uc_ = (this->Uc_*massCell + cloud.UTrans()[this->cell()])/massCellNew;
td.Uc() = (td.Uc()*massCell + cloud.UTrans()[this->cell()])/massCellNew;
scalar CpEff = 0.0;
forAll(cloud.rhoTrans(), i)
@ -405,7 +405,7 @@ void Foam::ReactingParcel<ParcelType>::calc
// Calc surface values
scalar Ts, rhos, mus, Prs, kappas;
this->calcSurfaceValues(cloud, td, T0, Ts, rhos, mus, Prs, kappas);
scalar Res = this->Re(U0, d0, rhos, mus);
scalar Res = this->Re(rhos, U0, td.Uc(), d0, mus);
// Sources
@ -519,7 +519,7 @@ void Foam::ReactingParcel<ParcelType>::calc
// Correct surface values due to emitted species
correctSurfaceValues(cloud, td, Ts, Cs, rhos, mus, Prs, kappas);
Res = this->Re(U0, this->d_, rhos, mus);
Res = this->Re(rhos, U0, td.Uc(), this->d(), mus);
// 3. Compute heat- and momentum transfers

View File

@ -73,7 +73,7 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
const label celli = this->cell();
const scalar massCell = this->massCell(celli);
this->Uc_ += cloud.UTrans()[celli]/massCell;
td.Uc() += cloud.UTrans()[celli]/massCell;
// tetIndices tetIs = this->currentTetIndices();
// Tc_ = td.TInterp().interpolate(this->coordinates(), tetIs);
@ -127,7 +127,7 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
// Assuming thermo props vary linearly with T for small d(T)
const scalar TRatio = Tc_/Ts;
rhos = this->rhoc_*TRatio;
rhos = td.rhoc()*TRatio;
tetIndices tetIs = this->currentTetIndices();
mus = td.muInterp().interpolate(this->coordinates(), tetIs)/TRatio;
@ -162,7 +162,7 @@ void Foam::ThermoParcel<ParcelType>::calc
calcSurfaceValues(cloud, td, this->T_, Ts, rhos, mus, Pr, kappas);
// Reynolds number
scalar Re = this->Re(this->U_, this->d_, rhos, mus);
scalar Re = this->Re(rhos, this->U_, td.Uc(), this->d_, mus);
// Sources

View File

@ -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
@ -148,6 +148,7 @@ template<class CloudType>
Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -160,7 +161,7 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcCoupled
{
forAll(*this, i)
{
value += this->operator[](i).calcCoupled(p, dt, mass, Re, muc);
value += this->operator[](i).calcCoupled(p, td, dt, mass, Re, muc);
}
}
@ -172,6 +173,7 @@ template<class CloudType>
Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -184,7 +186,8 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcNonCoupled
{
forAll(*this, i)
{
value += this->operator[](i).calcNonCoupled(p, dt, mass, Re, muc);
value +=
this->operator[](i).calcNonCoupled(p, td, dt, mass, Re, muc);
}
}
@ -196,13 +199,14 @@ template<class CloudType>
Foam::scalar Foam::ParticleForceList<CloudType>::massEff
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const
{
scalar massEff = mass;
forAll(*this, i)
{
massEff += this->operator[](i).massAdd(p, mass);
massEff += this->operator[](i).massAdd(p, td, mass);
}
return massEff;

View File

@ -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
@ -127,6 +127,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,
@ -137,6 +138,7 @@ public:
virtual forceSuSp calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -147,6 +149,7 @@ public:
virtual scalar massEff
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,6 +81,7 @@ template<class CloudType>
Foam::forceSuSp Foam::DistortedSphereDragForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,6 +105,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,

View File

@ -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
@ -96,6 +96,7 @@ template<class CloudType>
Foam::forceSuSp Foam::ErgunWenYuDragForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -105,6 +105,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,

View File

@ -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
@ -89,6 +89,7 @@ template<class CloudType>
Foam::forceSuSp Foam::NonSphereDragForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -145,6 +145,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,

View File

@ -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
@ -96,6 +96,7 @@ template<class CloudType>
Foam::forceSuSp Foam::PlessisMasliyahDragForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -105,6 +105,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,

View File

@ -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
@ -78,6 +78,7 @@ template<class CloudType>
Foam::forceSuSp Foam::SphereDragForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -97,6 +97,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,

View File

@ -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
@ -93,6 +93,7 @@ template<class CloudType>
Foam::forceSuSp Foam::WenYuDragForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -105,6 +105,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,

View File

@ -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
@ -61,6 +61,7 @@ template<class CloudType>
Foam::forceSuSp Foam::GravityForce<CloudType>::calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -69,7 +70,7 @@ Foam::forceSuSp Foam::GravityForce<CloudType>::calcNonCoupled
{
forceSuSp value(Zero, 0.0);
value.Su() = mass*g_*(1.0 - p.rhoc()/p.rho());
value.Su() = mass*g_*(1.0 - td.rhoc()/p.rho());
return value;
}

View File

@ -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
@ -110,6 +110,7 @@ public:
virtual forceSuSp calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -32,6 +32,7 @@ template<class CloudType>
Foam::scalar Foam::LiftForce<CloudType>::LiftForce::Cl
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const vector& curlUc,
const scalar Re,
const scalar muc
@ -128,6 +129,7 @@ template<class CloudType>
Foam::forceSuSp Foam::LiftForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -139,9 +141,9 @@ Foam::forceSuSp Foam::LiftForce<CloudType>::calcCoupled
vector curlUc =
curlUcInterp().interpolate(p.coordinates(), p.currentTetIndices());
scalar Cl = this->Cl(p, curlUc, Re, muc);
scalar Cl = this->Cl(p, td, curlUc, Re, muc);
value.Su() = mass/p.rho()*p.rhoc()*Cl*((p.Uc() - p.U())^curlUc);
value.Su() = mass/p.rho()*td.rhoc()*Cl*((td.Uc() - p.U())^curlUc);
return value;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,6 +74,7 @@ protected:
virtual scalar Cl
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const vector& curlUc,
const scalar Re,
const scalar muc
@ -127,6 +128,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,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,12 +34,13 @@ template<class CloudType>
Foam::scalar Foam::SaffmanMeiLiftForce<CloudType>::SaffmanMeiLiftForce::Cl
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const vector& curlUc,
const scalar Re,
const scalar muc
) const
{
scalar Rew = p.rhoc()*mag(curlUc)*sqr(p.d())/(muc + ROOTVSMALL);
scalar Rew = td.rhoc()*mag(curlUc)*sqr(p.d())/(muc + ROOTVSMALL);
scalar beta = 0.5*(Rew/(Re + ROOTVSMALL));
scalar alpha = 0.3314*sqrt(beta);
scalar f = (1.0 - alpha)*exp(-0.1*Re) + alpha;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,6 +62,7 @@ protected:
virtual scalar Cl
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const vector& curlUc,
const scalar Re,
const scalar muc

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,6 +31,7 @@ template<class CloudType>
Foam::scalar Foam::TomiyamaLiftForce<CloudType>::TomiyamaLiftForce::Cl
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const vector& curlUc,
const scalar Re,
const scalar muc
@ -38,9 +39,9 @@ Foam::scalar Foam::TomiyamaLiftForce<CloudType>::TomiyamaLiftForce::Cl
{
const vector& g = this->owner().g().value();
scalar Eo = p.Eo(g, p.d(), sigma_);
scalar Eo = p.Eo(td, sigma_);
scalar dH = p.d()*cbrt(1.0 + 0.163*pow(Eo, 0.757));
scalar Eod = p.Eo(g, dH, sigma_);
scalar Eod = p.Eo(g, p.rho(), td.rhoc(), p.U(), dH, sigma_);
scalar f = 0.00105*pow3(Eod) - 0.0159*sqr(Eod) - 0.0204*Eod + 0.474;
if (Eod <= 4)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,6 +68,7 @@ protected:
virtual scalar Cl
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const vector& curlUc,
const scalar Re,
const scalar muc

View File

@ -181,6 +181,7 @@ template<class CloudType>
Foam::forceSuSp Foam::NonInertialFrameForce<CloudType>::calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -143,6 +143,7 @@ public:
virtual forceSuSp calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -97,6 +97,7 @@ template<class CloudType>
Foam::forceSuSp Foam::ParamagneticForce<CloudType>::calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -123,6 +123,7 @@ public:
virtual forceSuSp calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -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
@ -79,6 +79,7 @@ template<class CloudType>
Foam::forceSuSp Foam::ParticleForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType&,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -97,6 +98,7 @@ template<class CloudType>
Foam::forceSuSp Foam::ParticleForce<CloudType>::calcNonCoupled
(
const typename CloudType::parcelType&,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -115,6 +117,7 @@ template<class CloudType>
Foam::scalar Foam::ParticleForce<CloudType>::massAdd
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const
{

View File

@ -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
@ -158,6 +158,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,
@ -168,6 +169,7 @@ public:
virtual forceSuSp calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -178,6 +180,7 @@ public:
virtual scalar massAdd
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const;
};

View File

@ -119,6 +119,7 @@ template<class CloudType>
Foam::forceSuSp Foam::PressureGradientForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -130,7 +131,7 @@ Foam::forceSuSp Foam::PressureGradientForce<CloudType>::calcCoupled
vector DUcDt =
DUcDtInterp().interpolate(p.coordinates(), p.currentTetIndices());
value.Su() = mass*p.rhoc()/p.rho()*DUcDt;
value.Su() = mass*td.rhoc()/p.rho()*DUcDt;
return value;
}
@ -140,6 +141,7 @@ template<class CloudType>
Foam::scalar Foam::PressureGradientForce<CloudType>::massAdd
(
const typename CloudType::parcelType&,
const typename CloudType::parcelType::trackingData& td,
const scalar
) const
{

View File

@ -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
@ -119,6 +119,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,
@ -129,6 +130,7 @@ public:
virtual scalar massAdd
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const;
};

View File

@ -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
@ -80,6 +80,7 @@ template<class CloudType>
Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -96,7 +97,7 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
// Coriolis and centrifugal acceleration terms
value.Su() =
mass*(1.0 - p.rhoc()/p.rho())
mass*(1.0 - td.rhoc()/p.rho())
*(2.0*(p.U() ^ omega) + (omega ^ (r ^ omega)));
return value;

View File

@ -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
@ -107,6 +107,7 @@ public:
virtual forceSuSp calcNonCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -72,6 +72,7 @@ template<class CloudType>
Foam::forceSuSp Foam::VirtualMassForce<CloudType>::calcCoupled
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar mass,
const scalar Re,
@ -79,7 +80,7 @@ Foam::forceSuSp Foam::VirtualMassForce<CloudType>::calcCoupled
) const
{
forceSuSp value =
PressureGradientForce<CloudType>::calcCoupled(p, dt, mass, Re, muc);
PressureGradientForce<CloudType>::calcCoupled(p, td, dt, mass, Re, muc);
value.Su() *= Cvm_;
@ -91,10 +92,11 @@ template<class CloudType>
Foam::scalar Foam::VirtualMassForce<CloudType>::massAdd
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const
{
return mass*p.rhoc()/p.rho()*Cvm_;
return mass*td.rhoc()/p.rho()*Cvm_;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,6 +105,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,
@ -115,6 +116,7 @@ public:
virtual scalar massAdd
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar mass
) const;
};

View File

@ -164,11 +164,11 @@ Foam::vector Foam::PackingModels::Explicit<CloudType>::velocityCorrection
vector dU = Zero;
//// existing forces
//const scalar Re = p.Re(p.U(), p.d(), p.rhoc(), p.muc());
//const scalar Re = p.Re(td);
//const typename CloudType::forceType& forces = this->owner().forces();
//const forceSuSp F =
// forces.calcCoupled(p, deltaT, p.mass(), Re, p.muc())
// + forces.calcNonCoupled(p, deltaT, p.mass(), Re, p.muc());
// forces.calcCoupled(p, td, deltaT, p.mass(), Re, td.muc())
// + forces.calcNonCoupled(p, td, deltaT, p.mass(), Re, td.muc());
// correction velocity
if ((uRelative & alphaGrad) > 0)

View File

@ -164,7 +164,7 @@ void Foam::SprayParcel<ParcelType>::calcAtomization
const auto& liquids = composition.liquids();
// Average molecular weight of carrier mix - assumes perfect gas
scalar Wc = this->rhoc_*RR*this->Tc()/this->pc();
scalar Wc = td.rhoc()*RR*this->Tc()/this->pc();
scalar R = RR/Wc;
scalar Tav = atomization.Taverage(this->T(), this->Tc());
@ -229,32 +229,27 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
return;
}
typedef typename TrackCloudType::parcelType parcelType;
typedef typename TrackCloudType::forceType forceType;
const parcelType& p = static_cast<const parcelType&>(*this);
const forceType& forces = cloud.forces();
if (breakup.solveOscillationEq())
{
solveTABEq(cloud, td, dt);
}
// Average molecular weight of carrier mix - assumes perfect gas
scalar Wc = this->rhoc()*RR*this->Tc()/this->pc();
scalar Wc = td.rhoc()*RR*this->Tc()/this->pc();
scalar R = RR/Wc;
scalar Tav = cloud.atomization().Taverage(this->T(), this->Tc());
// Calculate average gas density based on average temperature
scalar rhoAv = this->pc()/(R*Tav);
scalar muAv = this->muc();
vector Urel = this->U() - this->Uc();
scalar muAv = td.muc();
vector Urel = this->U() - td.Uc();
scalar Urmag = mag(Urel);
scalar Re = this->Re(this->U(), this->d(), rhoAv, muAv);
scalar Re = this->Re(rhoAv, this->U(), td.Uc(), this->d(), muAv);
const scalar mass = p.mass();
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, muAv);
const forceSuSp Fncp = forces.calcNonCoupled(p, dt, mass, Re, muAv);
const typename TrackCloudType::forceType& forces = cloud.forces();
const forceSuSp Fcp = forces.calcCoupled(p, ttd, dt, mass, Re, muAv);
const forceSuSp Fncp = forces.calcNonCoupled(p, ttd, dt, mass, Re, muAv);
this->tMom() = mass/(Fcp.Sp() + Fncp.Sp() + ROOTVSMALL);
const vector g = cloud.g().value();
@ -301,9 +296,9 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
child->nParticle() = parcelMassChild/massChild;
const forceSuSp Fcp =
forces.calcCoupled(*child, dt, massChild, Re, muAv);
forces.calcCoupled(*child, ttd, dt, massChild, Re, muAv);
const forceSuSp Fncp =
forces.calcNonCoupled(*child, dt, massChild, Re, muAv);
forces.calcNonCoupled(*child, ttd, dt, massChild, Re, muAv);
child->age() = 0.0;
child->liquidCore() = 0.0;
@ -392,8 +387,8 @@ void Foam::SprayParcel<ParcelType>::solveTABEq
if (omega2 > 0)
{
scalar omega = sqrt(omega2);
scalar rhoc = this->rhoc();
scalar We = this->We(this->U(), r, rhoc, sigma_)/TABtwoWeCrit;
scalar We =
this->We(td.rhoc(), this->U(), td.Uc(), r, sigma_)/TABtwoWeCrit;
// Initial values for y and yDot
scalar y0 = this->y() - We;