yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #09151
Re: [Question #245254]: Update interaction and material parameters during the simlulation process
Question #245254 on Yade changed:
https://answers.launchpad.net/yade/+question/245254
Jan Stránský posted a new comment:
Hi Henry,
there are more possible approaches. It depends on purpose and what you
expect.
1) The approach you already mentioned (for loop oved all interactions), but
you have to change parameters which are defined on the specific IPhys
(CohFrictPhys [1] in your case, but you tried to change parameters that do
not exist). In some IPhys, as Klaus mentioned, not all parameters are
modifyable.
2) change material of all particles, but then you have to delete and
recreate all interactions, e.g.:
pairs = [(i.id1,i.id2) for i in O.interactions]
for b in O.bodies: b.mat = newMat
O.interactions.clear()
for id1,id2 in pairs: utils.createInteraction(id1,id2)
this will preserve also cohesive bonds, but delete all internal variables
of the bonds
cheers
Jan
[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CohFrictPhys
2014-03-11 7:51 GMT+01:00 Henry <question245254@xxxxxxxxxxxxxxxxxxxxx>:
> Question #245254 on Yade changed:
> https://answers.launchpad.net/yade/+question/245254
>
> Status: Answered => Solved
>
> Henry confirmed that the question is solved:
> Thanks a lot.
>
> --
> 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.