← Back to team overview

yade-users team mailing list archive

[Question #270488]: Clumping

 

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

Hi all,

Now, I am trying to study what is the effect of clumping on repose angle( the angle of accumulated spheres after falling done because of gravity) . for this purpose I need to do parametric study which shows the effect of clumping ratio on repose angle ( e.g. 25%, 50%,..... clumping of total spheres)

I have done very simple modification on my basic script, I know how clump all ( 100%) of the spheres.
however my  questions  are: 

1- How should I modify the script in order to change of clumping ratio.
2- When I run the script , I face with this error " name 'checkUnbalanced' is not defined"

Thanks for your advices in advance.
Seti

here is the script: 

# create a few clump configurations by hand
from yade import pack
c1=pack.SpherePack([((0,0,0),.5),((.5,0,0),.5),((0,.5,0),.5)])
#c2=pack.SpherePack([((0,0,0),.5),((.7,0,0),.3),((.9,0,0),.2)])

#create material
soil1 = CohFrictMat(young=1e10,poisson=0.2,frictionAngle=radians(15),density=2500.0,normalCohesion=1e6, shearCohesion=80e6,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)

sp=pack.SpherePack()
print 'Generated # of clumps:',sp.makeClumpCloud((0,0,0),(20,20,200),[c1],periodic=True)

sp.toSimulation()
O.bodies.append(utils.wall(0,axis=2,sense=1))
O.materials.append(CohFrictMat(young=1e9,poisson=0.1, frictionAngle = radians(15) , label='wallmat'))
wallmat = O.materials[-1]
#O.bodies.append(utils.wall(position=0,axis=2))

O.engines=[
 #SubdomainBalancer(),
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Wall_Sphere_ScGeom()],
  [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
  [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 NewtonIntegrator(damping=.4,gravity=(0,0,-9.8)),
 PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.7*utils.PWaveTimeStep()
O.saveTmp()
O.step()

def checkUnbalanced():
   if unbalancedForce()<1e-5:
      print('Reached target , stopping')
      O.pause()
#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('Clump.txt.bz2')

 

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.