← Back to team overview

yade-users team mailing list archive

Re: [Question #574421]: meaning of Ig2_facet_sphere.cpp

 

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

    Status: Open => Answered

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

my comments on code are after "////Jan:" symbols.
LCS = local coordinates system of the facet
GCS = global coordinate system

> "Vector3r cl " represents the center of sphere and the the center of
facet?

According to comments in the code, it is the vector from facet.pos to sphere.pos, but expressesd with respect to Facet's local coordinate system:
Matrix3r facetAxisT=se31.orientation.toRotationMatrix(); ////Jan: matrix projecting points/vectors from LCS to GCS
Matrix3r facetAxis = facetAxisT.transpose(); // local orientation ////Jan: transposition makes the projection opposite, GCS->LCS 
Vector3r cl = facetAxis*(se32.position + shift2 - se31.position);  // "contact line" in facet-local coords
////Jan: omitting shift2,  se32.position - se31.position is a vector from facet.pos to sphere.pos, in GCS
////Jan: facetAxis*(...) makes it in LCS

also be careful with facet's "center". It is its inscribed circle
center, not center of mass as one could guess.

> The coordinate of facet's normal belongs to global coordinate system?
And the " Vector3r cl" belongs to local coordinate system?

No, facet.normal is also expressed with respect to LCS.
facetAxisT * normal
would compute the global components
Have a look at Facet.*pp files

> What's the meaning of "shrinkFactor" ?

Using this factor, you can artificially shrink the facets for contact computation.
By default, it is not used. I have never used it, so I cannot help much here..

> And what's the meaning of "circular radius in Facet.hpp"?
> Why facet has circular radius?

Did you mean "Inscribing circle radius"?

> Do you have some introduction to help me understand that?

not really, see [1]. But Dominik's answer could give you some idea. To
understand it in detail, I am afraid you would have to go through the
code yourself..

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/264191

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