Why the radius of sphere is negative?

Asked by Chu

Hello,
I generate a pack and the minimum radius of sphere is negative.Is this correct?
Thanks for any suggestion.

##################################
from yade import pack

num_spheres=10000
young=1e6
compFricDegree = 35
mn,mx=Vector3(0,0,0),Vector3(1,1,1)

O.materials.append(FrictMat(young=young,poisson=0.42,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.42,frictionAngle=0,density=0,label='walls'))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

sp=pack.SpherePack()
sp.makeCloud(mn,mx,-1,1.75,num_spheres,False, 0.95,seed=1)
sp.toSimulation(material='spheres')

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()],label="iloop"
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 newton
]

rmin=0
rmax=0
for b in O.bodies:
    if isinstance(b.shape,Sphere):
        if rmax < b.shape.radius:
            rmax = b.shape.radius
            continue
        if rmin > b.shape.radius:
            rmin = b.shape.radius
print (rmax,rmin)

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Chu
Solved:
Last query:
Last reply:
Revision history for this message
Chu (chu-1) said :
#1

I use Yade 20191010-2428~bf906f7~bionic1.And I got rmax= 0.018281047025157107 and rmin= -0.004982567469439841.

Revision history for this message
Chu (chu-1) said :
#2

I guess I know.The rRelFuzz should be less than 1.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

I confirm your self-answer. :)