Initial velocity for particles in pack

Asked by Son Tung Dang on 2020-06-08

Hi.
I tried to generate a pack of particles by using:

"pred=pack.inCylinder((0,-0.2,0),(0,0.2,0),0.0486)
spheres=pack.randomDensePack(pred,spheresInCell=1000,radius=.006,rRelFuzz=.015,color=(0,0,1),material='Par')
O.bodies.append(spheres)"

Now I would like to add initial velocities for particles inside this pack. How can I do that?
FYI, I'm using both Yadedaily and Yade 2018.02b. My OS is Ubuntu 18.04. The python version is 2.7.
Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
2020-06-08
Last query:
2020-06-08
Last reply:
2020-06-08
Best Jan Stránský (honzik) said : #1

Hello,

for b in O.bodies:
   b.state.vel = desiredVelocityVector

cheers
Jan

Son Tung Dang (sontd1090) said : #2

Thanks Jan Stránský, that solved my question.

Son Tung Dang (sontd1090) said : #3

It worked. Thanks a lot!