← Back to team overview

yade-users team mailing list archive

Re: [Question #697744]: Increase particle radiues

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
The first error says that it expects a number, but you provide a
numpy.ndarray

> r= odeint(model,P[3],t,args=(P[0],P[1],P[2],P[3],P[4],))
> b.state.radius = r[1]

maybe here, r[1] might be something different than you want.

Concerning radii of cylinders, the condition "if isinstance(b.shape, Sphere)" is true also for cylinder, since Cylinder is inherited from Sphere [1].
Use
b.shape.__class__ == Sphere
instead to detect just spheres (and not derived classes too).

Cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#shape

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.