yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #13839
Re: [Question #406621]: How to apply a constant force value
Question #406621 on Yade changed:
https://answers.launchpad.net/yade/+question/406621
Status: Open => Answered
Jan Stránský proposed the following answer:
Hi Felipe,
I had found some issues
next time please be more specific, this information gives no help.. Does
the body disappear? Yuo prescribe force and it does not move?....
apply a force value on the surface that is moving at constant velocity
Either you apply force and the result is positions/velocity, or you
prescribe velocity and the result is force. It is not possible to prescribe
both force and velocity...
1 – A surface which was created by O.bodies.append([leftBox,
> lowBox,rightBox,upBox,behindBox,inFrontBox])
to prescribe force you have two options:
#############################################
O.forces.addF(upBox.id) # [1] for just one iteration
O.forces.setPermF(upBox.id,someForceVector) # [2] sets permanent force
# probably you will also have to set mass and dynamic flag to the body:
upBox.dynamic = True # [4]
upBox.state.mass = someMassValue
upBox.state.inertia = someVector # you can check what is the value of mass
and inertia, it might be 0 or NaN causing the bodies "disappear"
# upBox.state.blockedDOFs = ??? # to block some DOFs like rotations etc.
#############################################
to prescribe velocity:
#############################################
upBox.state.blockedDOFs = 'xyzXYZ' # [3]
upBox.state.vel = someVelocityVector
#############################################
2- A geometry which was imported by rod1 = O.bodies.append(ymport.stl(
> mesh1+'.stl',wire=True,material='caixasup'))
the same approach as above, just you will have to identify the bodies you
want to adjust:
#############################################
upBox = O.bodies[someID]
#############################################
cheers
Jan
[1]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.addF
[2]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.setPermF
[3]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.State.blockedDOFs
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Body.dynamic
--
You received this question notification because your team yade-users is
an answer contact for Yade.