← Back to team overview

yade-users team mailing list archive

Re: [Question #272513]: Usage of O.forces.addF()

 

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

Jan Stránský proposed the following answer:
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 <
question272513@xxxxxxxxxxxxxxxxxxxxx>:

> 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     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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