← 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

Jan Stránský proposed the following answer:
Hi Riccardo,

before someone else will give better answer, here is a quick solution based
on your idea of PyRunner:


def setTransEngineVelocity():
  transEngine.velocity = 0.01 * O.iter

O.engines = [
  ...
  TranslationEngine( ids = [yourParticleID], translationAxis = (1,0,0),
velocity = 0, label= "transEngine" ),
  PyRunner( iterperiod = 1, command = "setTransEngineVelocity()" ),
  ...
]


First you define function setTransEngineVelocity() where you set, in
dependence on simulation time, some velocity to transEngine. With this
0.01*O.iter you would get constant acceleration, but you can define any
time function you want. It is also possible to change the translationAxis
parameter, so basicly you are able to prescribe arbitrary movement. Then
you have to call this function in PyRunner, iterperiod=1 means, that it
will be called in each time step. In case of further questions don't
hesitate to ask.

good luck

Jan


2012/11/28 Riccardo carta <question215485@xxxxxxxxxxxxxxxxxxxxx>

> New question #215485 on Yade:
> https://answers.launchpad.net/yade/+question/215485
>
> Hi everyone
> I'm new yade user and my problem is:
> I realized a body by importing a .mesh file into the model, now I want
> this body to translate with an assigned velocity profile(a function of
> time).
>
> It is possible to define a velocity profile to be used into the
> TranslationEngine()? If yes how should I do?
>
> I have been thinking(maybe I saw it in some examples) about defining a
> function to update the position of the facets the body is made of  through
> a PyRunner engine but I need some help. Is this a possible way to solve my
> problem?
>
> Thanks
>
> Riccardo
>
> --
> 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     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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