← Back to team overview

yade-users team mailing list archive

Re: [Question #403736]: about O.force.addMove

 

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

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hello,

In this case, the doc [1] is thankfully easier to understand than code source. According to [1], addMove(id,m) allows to displace the body "id" of the vector "m" quantity.
It seems you have an example in examples/test/force-move.py [2]

If you like looking into the source code (which is a good thing), this
behavior is because the _move attribute of ForceContainer will in the
end (through getMove() function of ForceContainer) be used by
NewtonIntegrator engine to displace bodies [3].

This being said, I do not recommend to use such functions to displace bodies unless you have a very clear picture of YADE code. Using addMove, it seems you would break contact law algorithms (these rely on bodies velocities, which do not seem to be updated by addMove).
Better follow [4] if you want to control bodies movements.

Jerome

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.addMove
[2] https://github.com/yade/trunk/blob/e4e757f2e98a620e3177b7a36a1d10f69f6a6a28/examples/test/force-move.py
[3] https://github.com/yade/trunk/blob/e4e757f2e98a620e3177b7a36a1d10f69f6a6a28/pkg/dem/NewtonIntegrator.cpp#L210
[4] https://yade-dem.org/doc/user.html#imposing-motion-and-forces

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