← Back to team overview

yade-users team mailing list archive

Re: [Question #701061]: how to control the wall level when the program is running

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

thanks for following the instructions and focusing on one topic per question :-)
The point is that this problem is "fundamental" and it would be pity if it was lost among other unrelated topics..

> How do I control it to stay level the whole time when the program is running?
> id_box3 = O.bodies.append(box(...,fixed=False,...))# top wall

if you do not fix the body (fixed=False), it is free to move and rotate.
You can restrict a free body with state.blockedDOFs [1,2] (as already proposed in [3]).
For example, to block rotations along x and y, you do
###
topWall = O.bodies[id_box3]
topWall.state.blockedDOFs = "XY"
###
This way, the wall can still rotate along z axis and move along all three axes.

Depending on your needs, you can do e.g.
topWall.state.blockedDOFs = "xyXYZ"
which blocks rotation along all three axes (blocking rotation entirely) and blocking translation in x and y directions.
Therefore, only motion in z direction is "free" (determined by external forces and interactions).

> The version of ubuntu is 21.10

usually the Yade version is more important than Ubuntu version

Cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.State.blockedDOFs
[2] https://yade-dem.org/doc/user.html#motion-constraints
[3] https://answers.launchpad.net/yade/+question/700924

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.