← Back to team overview

yade-users team mailing list archive

Re: [Question #685872]: How to change material properties during simulation

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> Are the three methods the same?

No.
(1) and (3) are same. It changes frictionAngle of specific material, but this change has no effect on existing contacts (!!)

(2) changes:
  - i.phys.tangensOfFrictionAngle of all contacts
  - mat.frictionAngle of all* materials (!!) [1]
      * materials of all dynamic bodies

> BTW, if I'd like to change the material properties of particular sphere,
> 
> In [1]: O.materials.append(FrictMat(label=sphere2))
> Out [1]: 1
> In [2]: O.boides[10].mat=O.material[1]
> 
> Is this valid for the continuous simulation?

yes, it is valid*, but as for (1) and (3), it has no effect for existing contacts (!!)
* assuming good syntax and attribute names, like O.materials instead of O.material

(Not only) for future reference: the exclamation marks are at places,
where the (side)effect(s) might be counter-intuitive.

cheers
Jan

[1] https://gitlab.com/yade-
dev/trunk/blob/master/pkg/dem/Shop_02.cpp#L814

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