yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #09972
Re: [Question #251510]: Loop - array -->Find out the strength needed to move each particle
Question #251510 on Yade changed:
https://answers.launchpad.net/yade/+question/251510
Jan Stránský proposed the following answer:
Hi Laura,
sorry for the late answer..
you have to make order in your variables :-) some functions take as an
argument body ID (like O.forces,addF), and sometimes you need body itself
(like to access b.state). If you are not sure, you can use just the IDs
(numbers), anw if you need body itself, you can always do O.bodies[someID].
If you stil have problems, let us know
cheers
Jan
2014-07-11 11:32 GMT+02:00 rayolau <question251510@xxxxxxxxxxxxxxxxxxxxx>:
> Question #251510 on Yade changed:
> https://answers.launchpad.net/yade/+question/251510
>
> rayolau posted a new comment:
>
> I tried what you said, and I still got to keep an array containing the
> needed to move each of the particles applied force. Thanks for the
> interest, I'll keep trying. If you need to explain better what I'm doing to
> help, ask what you need!
>
> Thank you for the answers =)
> Laura
>
> ---------------------------------------------------------------------------
> NameError Traceback (most recent call last)
> /usr/bin/yadedaily in <module>()
>
> /usr/bin/yadedaily in identificacion()
> 221 xforce=0
> 222 for xx in range(0,len(array1)):
> --> 223 id_clump=clump.id
> 224 clump.id=O.bodies[array1[xx][0]]
> 225 xforce=xforce+0.001
>
> NameError: global name 'clump' is not defined
>
> --
> You received this question notification because you are a member of
> yade-users, which 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 you are a member of
yade-users, which is an answer contact for Yade.