← Back to team overview

yade-users team mailing list archive

Re: [Question #657637]: Applying confinement (rigid boundary) to a cylindrical sample

 

Question #657637 on Yade changed:
https://answers.launchpad.net/yade/+question/657637

Swapnil posted a new comment:
Thanks Jan. I tried running the script. It does not appear to be working
the way it should. Instead, I see a few spheres and a different
interaction behavior. Can you try running the script to figure out what
is being done wrong here :)


from yade import pack,plot
pred=pack.inCylinder((0,0,0),(0,0,0.25),0.10)
sp=pack.randomDensePack(pred,radius=0.01,spheresInCell=300)
O.bodies.append(sp)
facets = geom.facetCylinder((0,0,0.125),0.1,0.25,wallMask=2|4)
O.bodies.append(facets)
yade.qt.Controller()
idSteel=O.materials.append(FrictMat(young=210e9,poisson=.25,frictionAngle=.8,label="steel"))
hammer=sphere((0,0,0.30),0.04,material=idSteel)
hammerID=O.bodies.append(hammer)
hammer.state.blockedDOFs='z'
calm()
hammer.state.vel=Vector3(0,0,-0.5)
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(),PyRunner(iterPeriod=100,command="addPlotData()"),PyRunner(iterPeriod=100,command="addForces()")]
preStress= -2e4
for f in facets:
  f.state.blockedDOFs = 'XYZz'
def addForces():
  for f in facets:
    n = f.shape.normal
    a = f.shape.area
    O.forces.addF(f.id,preStress*a*n,permanent=True)
def addPlotData():
  Dz=hammer.state.displ()[2]
  Fz=O.forces.f(hammerID)[2]
  plot.addData(i=O.iter,Fz=Fz,Dz=Dz)
plot.plots={'Dz':('Fz')}
plot.plot()
O.dt=0.5*PWaveTimeStep()
O.saveTmp()
O.run()

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