← Back to team overview

yade-users team mailing list archive

Re: [Question #701184]: define and change the interaction parameter during simulation

 

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

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
In a generic YADE workflow, interaction properties such as
CohFrictPhys.maxRollPl are computed by the ad-hoc Ip2* at the creation
of the interaction, from bodies material parameters such as
CohFrictMat.etaRoll.

Sometimes the Ip2 doc is explicit in this aspect, sometimes not and you
have to look in the source code.

If one wants to change contact properties during a YADE simulation, the
method is thus (maybe you had it right):

- change the corresponding Material parameters. This is the most logical
to do first, and it will apply to future i.e. yet-to-come-to-life
interactions

- because existing interactions will not see the change in Material
parameters (Ip2 will not come back to them a second time), you indeed
have to manually update them, which is easy to do in Python (and
effective):

for cont in O.interactions:
  cont.phys.something = theValueObtainedAccordingToIp2formulasAndYourNewMaterialParameters

- for deleted interactions, there is nothing to do since they are
deleted = absent from your model (and you also should not need to update
O.engines and its functors)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.