how to add velocity to a facetBox

Asked by Tao on 2011-01-06

Hi all,
I try to move facetBox in my program to simulate the compacting process of retaining wall and some errors occur during my simulation. I just cannot add velocity to facetBox even though its dynamic property is "True"!!
Here is the code I used to create a facetBox and set its velocity:

O.bodies.append(utils.facetBox(center=(a,0,h),extents=(0,b,h),orientation=Quaternion((-1,0,0),0),wallMask=1,wire=True,dynamic=True,material='steel',color=(0,1,1)))
O.bodies[0].state.vel=(0,0,1)
O.bodies[1].state.vel=(0,0,1)

I know if I create a facetBox, it contents two small triangle facets just as I set the velocity to facet 0 and 1. However, this kind of resort would lead to a error: "segmentation fault". Thus, I do not know how to fix it. Does anyone know how to set velocity to a facetBox, or is there other means to create walls which can be moved during simulation?

PS: if I change the dynamic property of facetBox as "True" during the simulation, the simulation will automatically stop. I do not know why.

Thanks!

Tao

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Anton Gladky
Solved:
2011-01-07
Last query:
2011-01-07
Last reply:
2011-01-06
Best Anton Gladky (gladky-anton) said : #1

Hi,

For facets moving you should use TranslationEngine. In "engines"
section you should add something like:
TranslationEngine(translationAxis=[0,0,1],velocity=1.0,ids=[0,1])

Facets can not by "dynamic", because they do not have mass.

What yade version do you use? Could you not, please, file a bug on
"stopping simulation"?

Thanks
Anton

On Thu, Jan 6, 2011 at 4:49 PM, Tao
<email address hidden> wrote:
> New question #140414 on Yade:
> https://answers.launchpad.net/yade/+question/140414
>
> Hi all,
> I try to move facetBox in my program to simulate the compacting process of retaining wall and some errors occur during my simulation. I just cannot add velocity to facetBox even though its dynamic property is "True"!!
> Here is the code I used to create a facetBox and set its velocity:
>
> O.bodies.append(utils.facetBox(center=(a,0,h),extents=(0,b,h),orientation=Quaternion((-1,0,0),0),wallMask=1,wire=True,dynamic=True,material='steel',color=(0,1,1)))
> O.bodies[0].state.vel=(0,0,1)
> O.bodies[1].state.vel=(0,0,1)
>
> I know if I create a facetBox, it contents two small triangle facets just as I set the velocity to facet 0 and 1. However, this kind of resort would lead to a error: "segmentation fault". Thus, I do not know how to fix it.  Does anyone know how to set velocity to a  facetBox, or is there other means to create walls which can be moved during simulation?
>
> PS: if I change the dynamic property of facetBox as "True" during the simulation, the simulation will automatically stop. I do not know why.
>
> Thanks!
>
> Tao
>
> --
> 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 address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

Hi Tao,

Try the same thing with dynamic=false like below. If dynamic=true,
velocity is computed automaticaly, else you can
assign it (in recent version, it will be fixed=False).

Bruno

O.bodies.append(utils.facetBox(center=(a,0,h),extents=(0,b,h),orientation=Quaternion((-1,0,0),0),wallMask=1,wire=True,dynamic=False,material='steel',color=(0,1,1)))
O.bodies[0].state.vel=(0,0,1)
O.bodies[1].state.vel=(0,0,1)

Oh wait... What version are you using? My first reply will not work for
older versions, translation engine should work in all cases.

Tao (aaronztao) said : #4

Hi Anton,
Thank you very much. I tried your suggestion and it worked quite well.