Question #700199 on Yade changed: https://answers.launchpad.net/yade/+question/700199
Jan Stránský proposed the following answer: Hello, Alternative approach, based on each particle. See also [2]: ### (not tested) def computeSurfaceOfOneSphere(body): radius = b.shape.radius surface = 4*pi*pow(radius,2) interactions = O.intrs() # [1], interactions of the particle contactPoints = [i.geom.contactPoint for i in interactions] center = b.state.pos capHeights = [radius - (cp-center).norm() for cp in contactPoints] # [2] caps = [2*pi*radius*h for h in capHeights] # [2] surfaceActual = surface - sum(caps) return surfaceActual surfaces = [computeSurfaceOfOneSphere(b) for b in O.bodies] surfaceTotal = sum(surfaces) ### Cheers Jan [1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Body.intrs [2] https://en.wikipedia.org/wiki/Spherical_cap -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp