← Back to team overview

yade-users team mailing list archive

Re: [Question #696759]: How can polyhedron use CpmMat 、Ip2_CpmMat_CpmMat_CpmPhys()and Law2_ScGeom_CpmPhys_Cpm() ?

 

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

    Status: Open => Answered

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

> script: ...

Please try to make the codes MWE [3], W = working. Here:
NameError: name 'young' is not defined
NameError: name 'polyhedra_utils' is not defined

> 1)How can I modify the source code so that polyhedron can use CpmMat
correctly?

see above, just modify your script

> 2)How can I modify the source code so that polyhedron can use Ip2_CpmMat_CpmMat_CpmPhys()and Law2_ScGeom_CpmPhys_Cpm()?
> For law2, I found a place that may need to be modified[2]. ...

the modification seems ok, IMO it is the easiest approach.
It should work for "bouncing" = interactions without significant sliding/rotation.
It would behave strangely for "long sliding" or "largely rotating" interactions. The equivalent radii, area and refLength are set at the interaction creation time and kept constant for the interaction lifetime. If the situation changes significantly (sliding, rotating,...), this easy "hack" should be replaced by a more robust approach.

Just curious, are the two if branches (poly-poly and poly-sphere)
different from each other and/or different from the sphere-sphere
contact?

Cheers
Jan

[3] https://www.yade-dem.org/wiki/Howtoask

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