← Back to team overview

yade-users team mailing list archive

Re: [Question #163736]: Body' state change

 

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

Daniela gave more information on the question:
Hi,
I have tried to solve my problem about moving bodies using to steps. At first I give the values of the new position and orientation (mantaining velocity and angular velocity zero) and then the values of the velocity and angular velocity (this one, using a RotationEngine), something like this:

def changeValues(): 
    for i in idArray:
        O.bodies[int(i)].state.pos += Vector3(0.1,0,0)               
        O.bodies[int(i)].state.vel = Vector3(0.,0,0)               
        O.bodies[int(i)].state.angVel = Vector3(0,0,0)                       
    checker.command='changeValues2()'  
    checker.iterPeriod=1    

def changeValues2(): 
    for i in idArray:        
        O.bodies[int(i)].state.vel = Vector3(10,0,0)               
    rotEng.angularVelocity=100   
    rotEng.rotationAxis=[0,1,0]
    rotEng.zeroPoint += (0.01,0,0)    
    checker.command='changeValues()'          
    checker.iterPeriod=1

I have tested it and it seems to work ok. Can you confirm if this is really compatible with the Yade algorithms? 
Thansk in advance, Daniela.

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