New question #708213 on Yade:
https://answers.launchpad.net/yade/+question/708213
Hello, I m new in yade. I am trying to fill a box of size 0.1m*0.1m*0.1m with
9500 spheres of mean radius 2 mm and standard deviation of 0.1mm. This
condition should be achieved after gravity deposition so that the packing
should be stable. I used randomdense packing but it gives approx 16000 spheres.
Can anyone help me how to achieve specific no. of spheres in random dense
packing.
Below is my script for the same.
#modules import
from yade import pack
#define box of size 0.1*0.1*0.1
O.bodies.append(geom.facetBox((0.05, 0.05, 0.05), (.05, .05, .05), wallMask=31))
#define packing
pred1=pack.inParallelepiped((0,0,0),(0.1,0,0),(0,0.1,0),(0,0,0.12)) #z axis
value is increased so that after gravity deposition, final height could be 0.1m
O.bodies.append(pack.randomDensePack(pred1, spheresInCell= 4000, radius=2e-3,
rRelFuzz=0.1, seed=1)
#define engines
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.8,label='newton'),
PyRunner(command='unbalance()', realPeriod=1, label='force'),
]
O.dt=0.3*PWaveTimeStep()
density=2.65e3
mass=sum(b.state.mass for b in O.bodies)
vs=mass/density #fine volume of solids by mass/ density of soil solids
def unbalance():
print('unbalanced Force', unbalancedForce())
poro=utils.porosity()
vol=round(vs/(1-poro),5) #finding current volume by
porosity formula, n= v-vs/v
print('volume:', vol)
if vol<=0.001: #stop the simulation when final
volume of 0.001m3 is reached
O.pause()
Thank you
--
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 : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp