← Back to team overview

yade-users team mailing list archive

Re: [Question #253097]: Imposing constant velocity on clumps on single axis

 

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

Colin Power posted a new comment:
Just to add completeness to this question, this is what I changed in the
function to get the desired result:

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)
        clump = O.bodies.appendClumped(packing)
        clumpID = clump[0]
        O.bodies[clumpID].state.vel= Vector3(50,0,0)

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