yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #26119
[Question #698566]: Confused by identificationSpheresOnJoint.py
New question #698566 on Yade:
https://answers.launchpad.net/yade/+question/698566
Dear all,
Because my research is about fractured rock mass, I decided to learn relevant examples[1].When I read identificationspheresonjoint.py, the following code I can't fully understand:
1.###if isinstance(O.bodies[i.id1].shape,Facet) and isinstance(O.bodies[i.id2].shape,Sphere)###
In the above code,if we judge that Id1 corresponds to sphere and Id2 corresponds to facet,is it the same result?
2.There are relevant judgment statements about the number of joints and jointNormal1,2,3 in the code.My understanding is that the number of joints to which a particle belongs is not limited. In that way,why is jointnormal only 1,2,3.
(I noticed the words 'plane' and 'surface'. Is that the difference here?)
3.###if O.bodies[i.id2].state.joint==1 and ((O.bodies[i.id2].state.jointNormal1.cross(nRef)).norm()>0.05)###
I don't understand the meaning of #(O.bodies[i.id2].state.jointNormal1.cross(nRef)).norm()>0.05#.
4.###if ((O.bodies[j.id2].state.jointNormal1.cross(nRef)).norm()<0.05) :
jointNormalRef=O.bodies[j.id2].state.jointNormal1
elif ((O.bodies[j.id2].state.jointNormal2.cross(nRef)).norm()<0.05) :
jointNormalRef=O.bodies[j.id2].state.jointNormal2
elif ((O.bodies[j.id2].state.jointNormal3.cross(nRef)).norm()<0.05) :
jointNormalRef=O.bodies[j.id2].state.jointNormal3
else : continue ###
In the above code, it seems that there must be a judgment statement < 0.05, which is my confusion.
Many thanks for your help.
Best regards.
ps:I'm not sure whether my question follows regulations . If there is anything inappropriate, please point it out and forgive me.
[1]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/jointedCohesiveFrictionalPM/identificationSpheresOnJoint.py
--
You received this question notification because your team yade-users is
an answer contact for Yade.