mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Some improvements based on helpful comments.
This commit is contained in:
@ -223,11 +223,7 @@ inline bool cfdemCloud::getParticleDensities() const
|
|||||||
|
|
||||||
inline double ** cfdemCloud::particleDensity() const
|
inline double ** cfdemCloud::particleDensity() const
|
||||||
{
|
{
|
||||||
if(!getParticleDensities_) return NULL;
|
return particleDensities_;
|
||||||
else
|
|
||||||
{
|
|
||||||
return particleDensities_;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double cfdemCloud::particleDensity(label index) const
|
inline double cfdemCloud::particleDensity(label index) const
|
||||||
@ -260,11 +256,7 @@ inline bool cfdemCloud::getParticleTypes() const
|
|||||||
|
|
||||||
inline int ** cfdemCloud::particleTypes() const
|
inline int ** cfdemCloud::particleTypes() const
|
||||||
{
|
{
|
||||||
if(!getParticleTypes_) return NULL;
|
return particleTypes_;
|
||||||
else
|
|
||||||
{
|
|
||||||
return particleTypes_;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline label cfdemCloud::particleType(label index) const
|
inline label cfdemCloud::particleType(label index) const
|
||||||
|
|||||||
@ -12,6 +12,7 @@ License
|
|||||||
along with this code. If not, see <http://www.gnu.org/licenses/>.
|
along with this code. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
|
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
|
||||||
|
Contributing author: Paul Kieckhefen, TU Hamburg, Germany
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -214,7 +215,7 @@ void BeetstraDrag::setForce() const
|
|||||||
// in case a fines phase is present, void fraction needs to be adapted
|
// in case a fines phase is present, void fraction needs to be adapted
|
||||||
adaptVoidfraction(voidfraction, cellI);
|
adaptVoidfraction(voidfraction, cellI);
|
||||||
|
|
||||||
if (multiTypes_)
|
if (multiTypes_)
|
||||||
{
|
{
|
||||||
partType = particleCloud_.particleType(index);
|
partType = particleCloud_.particleType(index);
|
||||||
cg = typeCG_[partType - 1];
|
cg = typeCG_[partType - 1];
|
||||||
@ -241,14 +242,14 @@ void BeetstraDrag::setForce() const
|
|||||||
*3*M_PI*nuf*rho*voidfraction
|
*3*M_PI*nuf*rho*voidfraction
|
||||||
*effDiameter(ds_scaled, cellI, index)
|
*effDiameter(ds_scaled, cellI, index)
|
||||||
*scaleDia3*scaleDrag_;
|
*scaleDia3*scaleDrag_;
|
||||||
|
|
||||||
// calculate filtering corrections
|
// calculate filtering corrections
|
||||||
if (useGC_)
|
if (useGC_)
|
||||||
{
|
{
|
||||||
GCcorr = 1.-h(localPhiP)
|
GCcorr = 1.-h(localPhiP)
|
||||||
/( a(localPhiP)
|
/( a(localPhiP)
|
||||||
*Lc2_
|
*Lc2_
|
||||||
/Foam::pow(U_.mesh().V()[cellI],.33333333)
|
/std::cbrt(U_.mesh().V()[cellI])
|
||||||
+ 1.
|
+ 1.
|
||||||
);
|
);
|
||||||
if (usePC_)
|
if (usePC_)
|
||||||
@ -311,8 +312,8 @@ void BeetstraDrag::setForce() const
|
|||||||
double BeetstraDrag::F(double voidfraction, double Rep) const
|
double BeetstraDrag::F(double voidfraction, double Rep) const
|
||||||
{
|
{
|
||||||
double localPhiP = max(SMALL,min(1.-SMALL,1.-voidfraction));
|
double localPhiP = max(SMALL,min(1.-SMALL,1.-voidfraction));
|
||||||
return 10.0*localPhiP/(voidfraction*voidfraction)
|
return 10.0*localPhiP/(voidfraction*voidfraction)
|
||||||
+ voidfraction*voidfraction*(1.0+1.5*Foam::sqrt(localPhiP))
|
+ voidfraction*voidfraction*(1.0+1.5*Foam::sqrt(localPhiP))
|
||||||
+ 0.413*Rep/(24*voidfraction*voidfraction)
|
+ 0.413*Rep/(24*voidfraction*voidfraction)
|
||||||
*(1.0/voidfraction
|
*(1.0/voidfraction
|
||||||
+3*voidfraction*localPhiP
|
+3*voidfraction*localPhiP
|
||||||
@ -362,7 +363,9 @@ double BeetstraDrag::a(double phiP) const
|
|||||||
{
|
{
|
||||||
a0m = 1.79;
|
a0m = 1.79;
|
||||||
}
|
}
|
||||||
return a0m + a1m*(phiP-phipam) + a2m*pow(phiP-phipam,2.) + a3m*pow(phiP-phipam,3.);
|
const double phiP_minus_phipam = phiP-phipam;
|
||||||
|
return a0m + a1m*phiP_minus_phipam + a2m*phiP_minus_phipam*phiP_minus_phipam
|
||||||
|
+ a3m*phiP_minus_phipam*phiP_minus_phipam*phiP_minus_phipam;
|
||||||
}
|
}
|
||||||
|
|
||||||
double BeetstraDrag::h(double phiP) const
|
double BeetstraDrag::h(double phiP) const
|
||||||
@ -405,7 +408,9 @@ double BeetstraDrag::h(double phiP) const
|
|||||||
{
|
{
|
||||||
h0m = 0.680; h1m = -2.340; h2m = -225.200; phiphm = 0.55;
|
h0m = 0.680; h1m = -2.340; h2m = -225.200; phiphm = 0.55;
|
||||||
}
|
}
|
||||||
return h0m + h1m*(phiP-phiphm) + h2m*pow(phiP-phiphm,2) + h3m*pow(phiP-phiphm,3);
|
const double phiP_minus_phiphm = phiP-phiphm;
|
||||||
|
return h0m + h1m*phiP_minus_phiphm + h2m*phiP_minus_phiphm*phiP_minus_phiphm
|
||||||
|
+ h3m*phiP_minus_phiphm*phiP_minus_phiphm*phiP_minus_phiphm;
|
||||||
}
|
}
|
||||||
|
|
||||||
double BeetstraDrag::terminalVelocity(double voidfraction, double dp, double nuf, double rhof, double rhop, double g) const
|
double BeetstraDrag::terminalVelocity(double voidfraction, double dp, double nuf, double rhof, double rhop, double g) const
|
||||||
|
|||||||
@ -49,15 +49,12 @@ BeetstraDragPoly::BeetstraDragPoly
|
|||||||
:
|
:
|
||||||
BeetstraDrag(dict,sm),
|
BeetstraDrag(dict,sm),
|
||||||
fines_(propsDict_.lookupOrDefault<bool>("fines",false)),
|
fines_(propsDict_.lookupOrDefault<bool>("fines",false)),
|
||||||
dFine_(propsDict_.lookupOrDefault<scalar>("dFine",1.0))
|
dFine_(1.0)
|
||||||
{
|
{
|
||||||
// if fines are present, take mixture dSauter, otherwise normal dSauter
|
// if fines are present, take mixture dSauter, otherwise normal dSauter
|
||||||
if (fines_)
|
if (fines_)
|
||||||
{
|
{
|
||||||
if (!propsDict_.found("dFine"))
|
dFine_ = readScalar(propsDict_.lookup("dFine"));
|
||||||
{
|
|
||||||
FatalError << "forceModel BeetstraDragPoly: Define fines diameter." << abort(FatalError);
|
|
||||||
}
|
|
||||||
volScalarField& alphaP(const_cast<volScalarField&>(sm.mesh().lookupObject<volScalarField> ("alphaP")));
|
volScalarField& alphaP(const_cast<volScalarField&>(sm.mesh().lookupObject<volScalarField> ("alphaP")));
|
||||||
alphaP_.set(&alphaP);
|
alphaP_.set(&alphaP);
|
||||||
volScalarField& alphaSt(const_cast<volScalarField&>(sm.mesh().lookupObject<volScalarField> ("alphaSt")));
|
volScalarField& alphaSt(const_cast<volScalarField&>(sm.mesh().lookupObject<volScalarField> ("alphaSt")));
|
||||||
|
|||||||
Reference in New Issue
Block a user