← Back to team overview

yade-users team mailing list archive

[Question #685242]: Why the radius of sphere is negative?

 

New question #685242 on Yade:
https://answers.launchpad.net/yade/+question/685242

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)

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