← Back to team overview

yade-users team mailing list archive

[Question #294932]: passing grains

 

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

Hi All,  

Just a quick question. Why when I run below script. Some of the grains pass the ground wall?
Your prompt response would be highly appreciated. 

#!/usr/bin/python
from yade import pack,utils, qt, plot
pred = pack.inAlignedBox((0,0,0),(133,133,133))
#create material
#soil1 = CohFrictMat(young=30e9,poisson=0.3,frictionAngle=radians(30),density=2600.0,normalCohesion=1e6, shearCohesion=80e6,label='soil')
soil1 = CohFrictMat(young=2.16e6,poisson=0.3,frictionAngle=radians(22),density=2500.0, isCohesive = True,alphaKr=0.05,label='soil')
#color=(1,0,0) ----red color
#soil1 = FrictMat(young=1e6,poisson=0.4,frictionAngle=radians(30),density=2500.0,label='soil')
O.materials.append(soil1)
O.bodies.append(utils.wall(0,axis=1,sense=1))
O.bodies.append(utils.wall(133,axis=2,sense=0))
O.bodies.append(utils.wall(0,axis=2,sense=0))
#O.bodies.append(utils.wall(133,axis=0,sense=0))
#O.bodies.append(utils.wall(0,axis=0,sense=0))
O.materials.append(CohFrictMat(young=2.16e6,poisson=0.3, frictionAngle = radians(22) , label='wallmat'))
wallmat = O.materials[-1]

spheres=SpherePack()
spheres=pack.randomDensePack(pred,radius=5,rRelFuzz=0,material='soil',spheresInCell=1000,color=(1,0,0),returnSpherePack=True)
spheres.toSimulation()
#O.bodies.append(spheres)
################################

#sp=pack.SpherePack()
#psdSizes=[0.002,0.003,0.004,0.005,0.006,0.007,0.008] # (sizes or radii of the grains vary from 2mm to 9.5mm)
#psdCumm=[1,9,25,50,69,90,95,100] # the correspondent amount (percentage) of each diameter, uncomment for yade-stable
#psdCumm=[0.14,0.28,0.34,0.50,0.65,0.85,1.00] # for the code not using percentage, e.g. yade-daily
#sp.makeCloud(Vector3(0,0,0),Vector3(0.002,0.002,0.002),-1,0,5000,False, 0.3,psdSizes,psdCumm,False,seed=1) #"seed" make the "random" generation always the same 
#spheres.toSimulation()
##################################

O.engines=[
             ForceResetter(),#reset forces
             InsertionSortCollider([Bo1_Wall_Aabb(),Bo1_Sphere_Aabb()]),
             InteractionLoop(
                            [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Wall_Sphere_ScGeom()], # collision geometry
                            [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()], # collision "physics"
                            [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGeom_FrictPhys_CundallStrack()] # contact law -- apply forces
                                            ),
                      # apply gravity force to particles
                            # damping: numerical dissipation of energy
              NewtonIntegrator(damping=0.4,gravity=(0,-9.81,0)),
                            #qt.SnapshotEngine(fileBase='3d-',iterPeriod=200,label='snapshot'),
   # this engine will be called after 20000 steps, only once
                            
              PyRunner(command='checkUnbalanced()',realPeriod=100,label='checker'),
              PyRunner(command='addPlotData()',iterPeriod=100)
]

print 'Number of elements: ', len(O.bodies)
print 'Box Volume: '
print 'Zhou,repose22degree,r=5,density=2500'
O.trackEnergy=True
# set timestep to a fraction of the critical timestep
# the fraction is very small, so that the simulation is not too fast
# and the motion can be observed
O.dt=0.01*utils.PWaveTimeStep()
#O.dt=1e-6
#makeVideo(snapshot.snapshots,'3d.mpeg',fps=10,bps=10000)
# save the simulation, so that it can be reloaded later, for experimentation
#O.saveTmp()0
#checker.command='stopUnloading()'
def checkUnbalanced():
   if unbalancedForce()<5e-2:
      print('Reached target , stopping')
      O.pause()
      plot.saveDataTxt('Zhou,repose22degree,r=5,base,density=2500..txt.bz2')
      plot.saveDataTxt('Zhou,repose22degree,r=5,base,density=2500..txt')
#plot.saveDataTxt('modi.data.bz2')
      # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted

def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)
#O.save('Modifiedd.txt.bz2')
#while 1:
	#O.run(100,True)
	#if unbalancedForce()<1e-5:
		#break
plot.plots={'i':('unbalanced',None,O.energy.keys)}
plot.plot()

O.saveTmp()

#plot.saveDataTxt('2')
from yade import qt
qt.View()
#O.run()
#from yade import qt
#qt.View()
#O.run()
# this function is called when the simulation is finished
#def finish():
   # snapshot is label of qt.SnapshotEngine
   # the 'snapshots' attribute contains list of all saved files
   #makeVideo(snapshot.snapshots,'3d.mpeg',fps=10,bps=10000)
   #O.pause()


yade.qt.Controller();
# set parameters of the renderer, to show network chains rather than particles
# these settings are accessible from the Controller window, on the second tab ("Display") as well
#rr=yade.qt.Renderer()
#rr.shape=False
#rr.intrPhys=True

Regards,

Seti


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