← Back to team overview

yade-users team mailing list archive

[Question #688846]: How to pack sphere full box ?

 

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

Hello my friend .i am a new one of member .i want to put a sphere in to full box.Please help me. This is my code

from yade import pack, plot


# create rectangular box from facets
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=63))

# create empty sphere packing
# sphere packing is not equivalent to particles in simulation, it contains only the pure geometry

O.materials.append(FrictMat(density=1000,young=1e4,poisson=0.3,frictionAngle=radians(30),label='sphereMat'))


# sphere packing is not equivalent to particles in simulation, it contains only the pure geometry
sp=pack.SpherePack()
# generate randomly spheres with uniform radius distribution
O.materials.append(FrictMat(density=1000,young=1e4,poisson=0.3,frictionAngle=radians(30),label='sphereMat'))

sp.makeCloud((0,0,0),(1,1,1),rMean=.03,rRelFuzz=.01,num=10000,seed=10000)
# add the sphere pack to the simulation
sp.toSimulation()




O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		# handle sphere+sphere and facet+sphere collisions
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_CundallStrack()]
	),
	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
	# call the checkUnbalanced function (defined below) every 2 seconds
	
]
O.dt=.5*PWaveTimeStep()

# 
O.saveTmp()


What should i chage ?

Thank you for helping

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