← Back to team overview

yade-users team mailing list archive

Re: [Question #268691]: Apply force only once

 

Hi Laura,


> I've changed the IterPeriod and the value of O.force, and works ok.
>

I believe it works, but I would not use it this way :-)

                        b.state.vel(id_ball,(1,0,0))
> Error: b.state.vel(id_ball, (10,0,0))
> TypeError: 'Vector3' object is not callable


the syntax should be:

b.state.vel = (1,0,0)

use this line only once in the beginning of the simulation (preferably do
not use PyRunner). Otherwise it would overwrite the vertical component of
the motion. (To test it, you can use PyRunner as you have it now with
initRun=True and iterPeriod=someVeryBigNumber)

cheers
Jan

Follow ups

References