← Back to team overview

yade-users team mailing list archive

Re: [Question #175606]: How does "particleSD_2d" work ...???

 

Question #175606 on Yade changed:
https://answers.launchpad.net/yade/+question/175606

Chareyre proposed the following answer:
The error message says the parameter list is not correct, you have to
define them carefully.
Use the command line documentation to find out what is missing:

Yade [3]: sp.particleSD_2d?
Docstring:
  particleSD_2d( (SpherePack)arg1, (Vector2)minCorner,
(Vector2)maxCorner, (float)rMean, (bool)periodic=False, (str)name,
(int)numSph [, (object)radii=[] [, (object)passing=[] [,
(bool)passingIsNotPercentageButCount=False [, (int)seed=0]]]]) -> int :

Then after adding the missing parameters it works without error (if they
have default values, you are not obliged to define them explicitely):
sp.particleSD_2d(minCorner=(0,0),maxCorner=(1,1),rMean=0.8,name='no',numSph=10,radii=[.02,0.04,0.045,.05,.06,.08,.12],passing=[0.,10,30,30,30,70,100])

I must say this function is weird. It requires the definition of "name"
that is not used in the code, it keeps generating 0 spheres despite my
attempts with different parameters. Also be careful, it takes passing in
% (from 0 to 100, instead of 0 to1) unlike other functions. I'm affraid
it was some experimental code that has never been really finished.

I just commited a small change in the makeCloud function, so that it now
allows degenerated boxes with null thickness, like in:
sp.makeCloud(minCorner=(0,0,0),maxCorner=(1,1,0),rRelFuzz=.2,num=500,periodic=False)

It results in spheres aligned on a plane. I recommend using this
function (and I think I will remove particleSD_2d from the code to avoid
troubles).
You need to update your code and recompile.

Bruno

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.