yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #09148
Re: [Question #245254]: Update interaction and material parameters during the simlulation process
Question #245254 on Yade changed:
https://answers.launchpad.net/yade/+question/245254
Klaus Thoeni proposed the following answer:
Hi,
as already mentioned before a change of matrerial properties is
affecting new interactions only. Therefore, you will see no change for
existing interactions assuming all interactions in your script are
created in the first 1000 steps.
A solution could be to loop over all interactions and change the
interaction properties. But this would just be a hack (and very slow)
because you have to re-implement some of the equations of the Ip2
functor in python and I am not sure if there is write access to all
interaction parameters you need. But you can try something like:
for i in O.interactions:
mat1=O.bodies[i.id1].mat.id
mat2=O.bodies[i.id2].mat.id
if ((mat1==0) or (mat2==0)):
# change interaction physics here, have a look at doc for parameters and the code for the equation how they are calculated
i.phys.kn=...
i.phys.frictionAngle=...
# etc
Not sure if there is a clean solution for your problem.
HTH
Klaus
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.