New question #253097 on Yade:
https://answers.launchpad.net/yade/+question/253097

Hi, I am trying to make several clumps move on the x-axis at a constant 
velocity. I have written a function that will be used by PyRunner to repeatedly 
spawn these clumps every so many iterations. My function currently works if I 
just append the packing as spheres but when I change them into clumps they 
remain static on the x-axis. However, the clumps do move if I use 
NewtonIntegrator and apply an acceleration on the x-axis.

Here is my function:


def moreSpheres(i=1):   
    y_shift = 0
    for n in xrange(0,i):
        geoFile = 'ice_blocks/ice_block_'+str(random.randint(1,1000))+'.geo'
        y_shift+= random.uniform(10, 15)
        x_shift = random.uniform(0, 20)
        packing = yade.ymport.gengeoFile(fileName=geoFile, 
shift=Vector3(-99+x_shift, -99+y_shift, 2), scale=1.0, 
orientation=Quaternion((1, 0, 0), 0),color=sphereColor, material=ice, 
wire=False)
        for b in packing:
            b.state.blockedDOFs='xYZ'
            b.state.vel = Vector3(50,0,0)
       #O.bodies.appendClumped(packing)
        O.bodies.append(packing)


Thank you,
Colin Power

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to