← Back to team overview

yade-users team mailing list archive

Re: [Question #631788]: Flow of sphere clump.

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> it did not work.
> Injection does not work.

please always provide a reason why it does not work (there is this and
that error, there is no error but it does something else than I
want...). "it does not work" alone is almost useless information..

Your injection implementations are nice excercise to guess what Python
would do :-) 2x NameError and 1x IndentationError?

Try:
#####################
def inject():
   for k in arange(0,4):
      ss2=O.bodies.appendClumped([utils.sphere((r*i,0,k*4*r),r, material="cana") for i in range(1,9)])
      cid,bids = ss2
      v = (9.1924,9.1924,0)
      O.bodies[cid].state.vel = v
#####################

cheers
Jan

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