← Back to team overview

yade-users team mailing list archive

Re: [Question #215485]: Assigned bodies motion law

 

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

    Status: Open => Answered

Chareyre proposed the following answer:
Hi Riccardo,

I would suggest to first ignore translationEngine, it is useless in most
cases.

If you want the position to be X=f(t), then you can simply play with the body's velocity at each iteration:
body.vel = (df/dt)(t)
I.e. in your case: vel=omega*cosine(omega*time)*amplitude
Ok, it will not exactly give X=f(t). Only a first order approximation.

So, even better, you can do simply:
body.vel = (f(t+dt)-f(t))/dt

Remember to block the DOFs of the body, so it really move with your prescribed velocity.
Also note that the obvious body.pos=f(t) is not an option in general, as it would break many parts of the code (namely contact laws and collider).
Yade likes to integrate velocities, it dislikes instantaneous move from one place to another.

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