mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
pre-calculate sqrt(3.0)
merged from PUBLIC
This commit is contained in:
@ -66,7 +66,8 @@ IBVoidFraction::IBVoidFraction
|
||||
propsDict_(dict.subDict(typeName + "Props")),
|
||||
alphaMin_(readScalar(propsDict_.lookup("alphaMin"))),
|
||||
alphaLimited_(0),
|
||||
scaleUpVol_(readScalar(propsDict_.lookup("scaleUpVol")))
|
||||
scaleUpVol_(readScalar(propsDict_.lookup("scaleUpVol"))),
|
||||
sqrtThree_(sqrt(3.0))
|
||||
{
|
||||
Info << "\n\n W A R N I N G - do not use in combination with differentialRegion model!\n\n" << endl;
|
||||
maxCellsPerParticle_ = readLabel(propsDict_.lookup("maxCellsPerParticle"));
|
||||
@ -128,7 +129,7 @@ void IBVoidFraction::setvoidFraction(double** const& mask,double**& voidfraction
|
||||
}
|
||||
|
||||
scalar centreDist = mag(cellCentrePosition - minPeriodicParticlePos);
|
||||
scalar corona = 0.5 * sqrt(3.0) * pow(particleCloud_.mesh().V()[particleCenterCellID], 1./3.);
|
||||
scalar corona = 0.5 * sqrtThree_ * pow(particleCloud_.mesh().V()[particleCenterCellID], 1./3.);
|
||||
vector coronaPoint = cellCentrePosition;
|
||||
if(centreDist > 0.0)
|
||||
coronaPoint += (cellCentrePosition - minPeriodicParticlePos) * (corona / centreDist);
|
||||
@ -318,7 +319,7 @@ void IBVoidFraction::buildLabelHashSet
|
||||
scalar centreDist = mag(cellCentrePosition-position);
|
||||
|
||||
scalar fc = pointInParticle(index, position, cellCentrePosition);
|
||||
scalar corona = 0.5 * sqrt(3.0) * pow(particleCloud_.mesh().V()[neighbor], 1./3.);
|
||||
scalar corona = 0.5 * sqrtThree_ * pow(particleCloud_.mesh().V()[neighbor], 1./3.);
|
||||
vector coronaPoint = cellCentrePosition;
|
||||
if (centreDist > 0.0)
|
||||
coronaPoint += (cellCentrePosition - position) * (corona / centreDist);
|
||||
|
||||
@ -68,6 +68,8 @@ private:
|
||||
|
||||
const scalar scaleUpVol_; //NP scaling radius, keeping volume of particle
|
||||
|
||||
const scalar sqrtThree_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
Reference in New Issue
Block a user