Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from yade import pack, export, plot
- from yade import utils, ymport
- import math,numpy
- #from yade import plot
- r_cyl=75
- h_cyl=250
- psdSizes,psdCumm=[2.36,4.75,6.3,9.5,12.5,19,25],[.365,.512,.596,.77,.864,.974,1] #given psd
- area=3.1416*(r_cyl^2) #plate area
- freq=0.5 #SGC compaction freq is 30rpm
- maxLoad=(6e5)*area #600 kPa is applied vertical load on the specimen
- maxLoadlower=maxLoad-100
- maxLoadupper=maxLoad+100
- cyl1=O.bodies.append(geom.facetCylinder((0,0,0),r_cyl,h_cyl,wallMask=6))
- lift_size=30
- pred=pack.inCylinder(centerBottom=(0,0,-(h_cyl/2)+1),centerTop=(0,0,lift_size),radius=r_cyl-3)
- idAggregate=O.materials.append(FrictMat(density=2600,young=30e9,poisson=.4,frictionAngle=1.0472,label="aggregate")) #frictionangle in rad
- sp=pack.SpherePack()
- sp.makeCloud((-r_cyl,-r_cyl,-(h_cyl/2)),(r_cyl,r_cyl,h_cyl/2),psdSizes=psdSizes,psdCumm=psdCumm,num=14000, distributeMass=True)
- #sp.makeCloud((-r_cyl,-r_cyl,-(h_cyl/2)),(r_cyl,r_cyl,h_cyl/2),rMean=3,rRelFuzz=.5,num=5000)#enforce positive mass
- for c,r in sp:
- if pred(c,r):
- O.bodies.append(sphere(c,r,material=idAggregate))
- print (len(O.bodies)-1) #no of spheres generated
- O.engines=[
- ForceResetter(),
- # sphere, facet, wall
- InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
- InteractionLoop(
- # the loading plate is a wall, we need to handle sphere+sphere, sphere+facet, sphere+wall
- [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
- #[Ip2_FrictMat_FrictMat_FrictPhys()],
- #[Law2_ScGeom_FrictPhys_CundallStrack()]
- [Ip2_FrictMat_FrictMat_MindlinPhys(en=0.4,es=0.9)],
- [Law2_ScGeom_MindlinPhys_Mindlin()]
- ),
- NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
- PyRunner(command='addPlotData()',iterPeriod=10)
- ]
- O.dt=0.005*PWaveTimeStep()
- def addPlotData():
- plot.addData(unbalanced=unbalancedForce(),i=O.iter)
- plot.plots={'i':('unbalanced',)}
- plot.plot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement