Thread Previous • Date Previous • Date Next • Thread Next |
Hi Bruno, thanks for fixing the problem. The distribution is uniform ANYWAY (I was wrong in my previous email). To check it I have just created a routine in py to see how many particles belong to a specific radius interval, having previously divided the actual radius range in some intervals (if it is a uniform distribution we see more or less the same number of particles falling in each interval). If you are interested see the attached py script. Chiara >----Messaggio originale---- >Da: bruno.chareyre@xxxxxxxxxxx >Data: 13/01/2010 18.03 >A: <yade-users@xxxxxxxxxxxxxxxxxxx> >Ogg: Re: [Yade-users] Uniform distribution > >It is fixed. Tell me if you find problems again. > >Bruno > >Bruno Chareyre a écrit : >> I found a problem I think. Thank you for that. >> This line is in fact generating r/rmean between (1- 0.5dev) and (1 + >> 0.5 dev). I'll fix in a minute. >> >> Real r=(rnd()-.5)*rRelFuzz*rMean+rMean; >> >> It doesn't explain non uniformity though. You are using a recent >> version right (I fixed a distribution bias in r1865)? >> >> Bruno >> >>> Hi all, >>> >>> perhaps (but I could be wrong) I found an error in the generation of >>> a uniform distribution of radii used in Yade. >>> As some have already pointed out in previous emails the uniform >>> distribution is such that: >>> >>> R_min = R_mean * (1- >>> StdDev) >>> R_max = R_mean * (1+StdDev) >>> >>> In Yade we define a StdDev and a R_mean and with such values we >>> generate the distribution but if I check the results in terms of >>> R_max and R_min, I do not see a correspondence with the values I >>> should obtain as performed above. >>> Moreover I have tried to see if the distribution is uniform between >>> the values of R_max and R_min I obtain from Yade and actually between >>> them the distribution is not uniform. So, what's wrong here? >>> I need to use a uniform distribution, I have tried to look at the >>> possible available distributions in boost but what I need is that one >>> used in Yade (boost:: uniform_real<>(0,1)) that to me doesn't work >>> properly and I do not understand why. >>> Any suggestions? >>> Thanks a lot, >>> >>> Chiara >>> >>> _______________________________________________ >>> Mailing list: https: //launchpad.net/~yade-users >>> Post to : yade-users@xxxxxxxxxxxxxxxxxxx >>> Unsubscribe : https://launchpad.net/~yade-users >>> More help : https: //help.launchpad.net/ListHelp >>> >>> >> >> > > >-- >_______________ >Bruno Chareyre >Associate Professor >Grenoble INP >Lab. 3SR >BP 53 - 38041, Grenoble cedex 9 - France >Tél : 33 4 56 52 86 21 >Fax : 33 4 76 82 70 43 >________________ > > >_______________________________________________ >Mailing list: https://launchpad.net/~yade-users >Post to : yade-users@lists. launchpad.net >Unsubscribe : https://launchpad.net/~yade-users >More help : https://help.launchpad.net/ListHelp >
# run Triaxial Test ***execfile('/media/disk/Doc_PhD/Triaxial_Yade/Triax_Python/Triax_01.py') # TriaxialTest(*some parameters*).load() -> alternative way to load the Triaxial from yade import utils p=TriaxialTest() p['rotationBlocked']=True # no particles rotation p['lowerCorner']=Vector3(0,0,0) p['upperCorner']=Vector3(12,12,12) # [mm] p['numberOfGrains']=4000 p['sphereYoungModulus']=600.0 # [N/mm^2] p['sphereKsDivKn']=0.6 p['sphereFrictionDeg']=26.57 # [degrees] p['compactionFrictionDeg']=0.0 # [degrees] p['boxYoungModulus']=600.0 # [N/mm^2] p['boxKsDivKn']=0.6 p['boxFrictionDeg']=0.57 # [degrees] p['density']=2.60e-6 # [kg/mm^3] p['dampingForce']=0.0 p['dampingMomentum']=0.0 p['defaultDt']=-1 # sigma to get at the end of the expansion method p['sigmaIsoCompaction']=0.05 # [N/mm^2] # sigma for isotropic condition (before the triaxial) p['sigmaLateralConfinement']=0.05 # [N/mm^2] p['strainRate']=1.0 # [s^-1] p['maxWallVelocity']=100.0 # [s^-1] p['StabilityCriterion']=0.05 # expansion method parameters p['internalCompaction']=True # flag for expansion method p['maxMultiplier']=1.001 p['finalMaxMultiplier']=1.0001 p['wallOversizeFactor']=1.50 # PSD p['radiusStdDev']=0.33 p['radiusMean']=-1.0 # [mm] p.load() # load the simulation o=Omega() # create an instance of Omega class o.dt=.5*utils.PWaveTimeStep() # initial timestep o.save('/tmp/a.xml.bz2') # save simulation from yade import qt qt.Controller() qt.View() # *************************************************** # function that perform the calculation of the maximum/minimum radius between spheres # check also if the distribution is uniform among the range of radii # type MaxMinRadius() in the console to run this function def MaxMinRadius(): o=Omega() radii=[] # create an empty list to store each radius for b in o.bodies: if b.shape.name=='Sphere': radii.append(b.shape['radius']) # append each value to the list else: pass # simply skip to the next value r_max=max(radii) # get the maximum radius (built-in function) r_min=min(radii) # get the minimum radius (built-in function) print "Maximum radius =", r_max print "Minimum radius =", r_min ### delta=(r_max-r_min)/10 import numpy as np for i in np.arange(r_min+delta,r_max+delta,delta): cout=0 r_prev=i-delta for p in range(0,4000): if radii[p] < i and radii[p] > r_prev: cout+=1 continue print i, " ", cout # interval (upper limit) and number of spheres
Thread Previous • Date Previous • Date Next • Thread Next |