Usage of O.forces.addF()

Asked by ipemath

For my study of energy propagation on a granular bed, I need to apply an impulse. From the manual I found O.forces.addF() is the ideal choice of command as it will add the force for 1 time step. But surprisingly, I am not getting any reaction after applying the force. Hence I tried it on the simple bouncing ball problem with one moving sphere falling over another fixed sphere. Here I tried to initiate the movable sphere using the addF() command in the first iteration. But to my surprise, the sphere doesnt move. Why is this behaviour, why force doesnt get applied using addF. Please help

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

It seems you got that the force is applied only for 1 time step (which is because you do not use the "permanent" attribute of addF function, see the doc [*]).
Then, basically, I think that this one-step time loading can not have noticeable effects.

As an "impulse" simulation, you could consider assigning an initial non-zero velocity to some(s) dynamic sphere(s)

[*] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.addF

Revision history for this message
ipemath (ipemathew1984) said :
#2

Thank you Duriez. Then in what all situations do we use the addF() option. Can you please elaborate.

Revision history for this message
Jérôme Duriez (jduriez) said :
#3

In which situations, do we use addF() ?
In my personal case, I never use it... (But obviously, noone uses 100% of YADE commands). You may "grep" throughout YADE script examples to have an idea.

Revision history for this message
Jan Stránský (honzik) said :
#4

Hello,

addF can be used e.g. if you prescribe force on particle in some
non-trivial way:

##################### (not tested, just to give you an idea)
def applyForce():
  b = O.bodies[0]
  f = (sin(O.time)*pow(b.state.pos[0],2), 0, 0)
  O.forces.addF(0,f)

O.engines = [
  ...
  PyRunner(iterPeriod=1,command="applyForce()")
  ...
]
##########################

Concerning force applied for one time step (just a bit different
formulation, but meaning the same as 1st Jerome's answer): In the equation
of motion, acceleration is computed from applied force (a=f/m). If you let
the acceleration be active only one time step, the effect is negligible. If
you print velocity or position of your particle, you would see that it
actually moves, but very little.

cheers
Jan

2015-10-16 21:32 GMT+02:00 Jérôme Duriez <
<email address hidden>>:

> Question #272513 on Yade changed:
> https://answers.launchpad.net/yade/+question/272513
>
> Status: Open => Answered
>
> Jérôme Duriez proposed the following answer:
> In which situations, do we use addF() ?
> In my personal case, I never use it... (But obviously, noone uses 100% of
> YADE commands). You may "grep" throughout YADE script examples to have an
> idea.
>
> --
> You received this question notification because your team yade-users 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
>

Can you help with this problem?

Provide an answer of your own, or ask ipemath for more information if necessary.

To post a message you must log in.