← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2163: - Take "fuzz" into account for the definition of rMean in the generated distribution.

 

------------------------------------------------------------
revno: 2163
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Mon 2010-04-19 15:35:50 +0200
message:
  - Take "fuzz" into account for the definition of rMean in the generated distribution.
modified:
  pkg/dem/DataClass/SpherePack.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/DataClass/SpherePack.cpp'
--- pkg/dem/DataClass/SpherePack.cpp	2010-01-13 16:52:27 +0000
+++ pkg/dem/DataClass/SpherePack.cpp	2010-04-19 13:35:50 +0000
@@ -82,8 +82,9 @@
 	static boost::minstd_rand randGen(TimingInfo::getNow(/* get the number even if timing is disabled globally */ true));
 	static boost::variate_generator<boost::minstd_rand&, boost::uniform_real<> > rnd(randGen, boost::uniform_real<>(0,1));
 	if (porosity>0) {//cloud porosity is assigned, ignore the given value of rMean
+		// the term (1+rRelFuzz²) comes from the mean volume for uniform distribution : Vmean = 4/3*pi*Rmean*(1+rRelFuzz²) 
 		Vector3r dimensions=mx-mn; Real volume=dimensions.X()*dimensions.Y()*dimensions.Z();
-		rMean=pow(volume*(1-porosity)/(Mathr::PI*(4/3.)*num),1/3.);}	
+		rMean=pow(volume*(1-porosity)/(Mathr::PI*(4/3.)*(1+rRelFuzz*rRelFuzz)*num),1/3.);}	
 	const int maxTry=1000;
 	Vector3r size=mx-mn;
 	if(periodic)(cellSize=size);