yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #15321
Re: [Question #648215]: Rotational Resistance
Question #648215 on Yade changed:
https://answers.launchpad.net/yade/+question/648215
Status: Open => Answered
Jérôme Duriez proposed the following answer:
Hi,
For such a task, you first need to define for each corresponding particle "b" :
b.state.blockedDOFs = 'XYZ' (see [1])
so that you can control directly these angular velocities instead of
them being affected by resulting torques (if I understood correctly what
you want to achieve)
Then, I think you just have to include some PyRunner [2] engine in your engine list (at the end of O.engines, typically) defined as
O.engines = [..........., PyRunner(iterPeriod = 1,command = 'trickRotation()')]
with this trickRotation() Python function defined elsewhere as
def trickRotation():
for b in theListOfParticlesYouWantToPlayWith:
b.state.angVel = 0.99 * b.state.angVel # that's all you need to do to update this velocity !
Jerome
[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.State.blockedDOFs
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.PyRunner
--
You received this question notification because your team yade-users is
an answer contact for Yade.