yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #27471
Re: [Question #701222]: Calculate the radius of the overlaped area between two adjacent particles.
Question #701222 on Yade changed:
https://answers.launchpad.net/yade/+question/701222
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
please try to make your code a MWE [1].
M = minimal
two (or just a few) spheres are sufficient to target your problem. Moreover, with fixed spheres, you may already know the expected result.
Knowing sphere centers and radii, it can be computed with simple math
###
for i in O.interactions:
b1 = O.bodies[i.id1]
center1 = b1.state.pos
radius1 = b.shape.radius
# same for id2
radius = getRadiusFrom(center1,radius1,center2,radius2) # some simple math
###
Or you can try to use a builtin method. You are using MindlinPhys. Searching MindlinPhys for something about radius gives [2], is it what you are looking for?
###
for i in O.interactions:
contactRadius = i.phys.radius
###
Cheers
Jan
[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.MindlinPhys.radius
--
You received this question notification because your team yade-users is
an answer contact for Yade.