Question #702773 on Yade changed: https://answers.launchpad.net/yade/+question/702773
Status: Open => Answered Jan Stránský proposed the following answer: Hello, > my code is please provide the code as a MWE [1], W = working, complete. In this case, if you just run the code, you get "NameError: name 'sp' is not defined". Thanks at least for N_particles value. In this case it is easy to guess that there should be "sp = yade.pack.SpherePack()" before, but one source of problem could be some improper usage of "sp" before your code. Complete code is always better. note the warning you get about not all 10000 spheres added. So probably you get "statistically not sufficient" amount of particles. If I enlarge your cloud area, I get almost perfect average 0.008: ### N_particles = 10000 sp = yade.pack.SpherePack() sp.makeCloud(Vector3(-10,-10,0.02),Vector3(10,10,0.02),rMean=0.008,rRelFuzz=0.33,num=N_particles) rs = [r for (c,r) in sp] rAvg = sum(rs)/len(rs) print(rAvg) ### Cheers Jan [1] https://www.yade-dem.org/wiki/Howtoask -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ 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