← Back to team overview

yade-users team mailing list archive

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

 

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

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

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.