← Back to team overview

yade-users team mailing list archive

Re: [Question #703292]: How to set the weight of particles?

 

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

Jan Stránský proposed the following answer:
> Can the O.forces.setPermF(0,(1,0,0)) mentioned specify the range of
applied force? For example, I need to apply force within the interval of
(2,3).

what does "range of applied force" mean? force varying in time?
setPermF sets one specific value, no range.
But you can change the value whenever you want (even every time step) to whatever value you want.

> Also, how to understand "The only way is to place PyRunner in a
simulated loop.",

It is talking about O.forces.addF (not setPermF).
If you use O.forces.addF after NewtonIntegrator but before ForceResetter (so basically outside O.engines), the force added by addF is reset by ForceResetter.
The only (sensible) way to make it actually applied is to put addF in PyRunner between ForceResetter and NewtonIntegrator.

> I need to set a permanent force, set a function PerpetualPower(), and
add PyRunner (command='PerpetualPower()', realPeriod=2) to the engines,
is this feasible?

I see nothing making it not feasible.

Cheers
Jan

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