ENH. Removing cbrt - very expensive - this will need to be switchable

or in a different model.
This commit is contained in:
graham
2010-05-24 18:12:12 +01:00
parent fed2e54dfa
commit d7cade2b6b
4 changed files with 11 additions and 7 deletions

View File

@ -82,7 +82,7 @@ class WallCollisionRecord
// //- Recording whether or not this record has been accessed
bool accessed_;
//- The position of wall impact relative to the cell centre
//- The position of wall impact relative to the particle centre
vector pRel_;
//- Collision data, stored as if the storing particle was the

View File

@ -31,7 +31,6 @@ License
namespace Foam
{
defineTemplateTypeNameAndDebug(Cloud<basicKinematicParcel>, 0);
defineParcelTypeNameAndDebug(KinematicCloud<basicKinematicParcel>, 0);

View File

@ -45,7 +45,8 @@ void Foam::PairSpringSliderDashpot<CloudType>::findMinMaxProperties
// Finding minimum diameter to avoid excessive arithmetic
scalar dEff = p.d()*cbrt(p.nParticle()*volumeFactor_);
scalar dEff = p.d();
// scalar dEff = p.d()*cbrt(p.nParticle()*volumeFactor_);
RMin = min(dEff, RMin);
@ -158,9 +159,11 @@ void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair
{
vector r_AB = (pA.position() - pB.position());
scalar dAEff = pA.d()*cbrt(pA.nParticle()*volumeFactor_);
//scalar dAEff = pA.d()*cbrt(pA.nParticle()*volumeFactor_);
scalar dAEff = pA.d();
scalar dBEff = pB.d()*cbrt(pB.nParticle()*volumeFactor_);
// scalar dBEff = pB.d()*cbrt(pB.nParticle()*volumeFactor_);
scalar dBEff = pB.d();
scalar normalOverlapMag = 0.5*(dAEff + dBEff) - mag(r_AB);

View File

@ -45,7 +45,8 @@ void Foam::WallSpringSliderDashpot<CloudType>::findMinMaxProperties
// Finding minimum diameter to avoid excessive arithmetic
scalar dEff = p.d()*cbrt(p.nParticle()*volumeFactor_);
scalar dEff = p.d();
// scalar dEff = p.d()*cbrt(p.nParticle()*volumeFactor_);
rMin = min(dEff, rMin);
@ -181,7 +182,8 @@ Foam::scalar Foam::WallSpringSliderDashpot<CloudType>::pREff
const typename CloudType::parcelType& p
) const
{
return p.d()/2*cbrt(p.nParticle()*volumeFactor_);
// return p.d()/2*cbrt(p.nParticle()*volumeFactor_);
return p.d()/2;
}
template<class CloudType>