Sphere size Distribution
Hi all,
can you please help me to find out what is wrong with below script. Thanks so much
That is very simple script try to model pack of spheres with specific size distribution,
#!/usr/bin/python
from yade import pack,utils, qt, plot
#pred = pack.inAlignedB
#create material
soil1 = CohFrictMat(
#color=(1,0,0) ----red color
#soil1 = FrictMat(
O.materials.
O.bodies.
O.materials.
wallmat = O.materials[-1]
spheres=
#spheres=
#spheres.
#O.bodies.
#######
sp=pack.
psdSizes=
psdCumm=
sp.makeCloud(
#sp.makeCloud(
spheres.
#O.bodies.
#######
O.engines=[
# this engine will be called after 20000 steps, only once
]
print 'Number of elements: ', len(O.bodies)
print 'Box Volume: '
print 'Reposemix,
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=1*
#makeVideo(
# save the simulation, so that it can be reloaded later, for experimentation
#O.saveTmp()0
#checker.
def checkUnbalanced():
if unbalancedForce
print(
O.pause()
plot.
plot.
#plot.saveDataT
# plot.saveGnuplo
# 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.
#O.save(
#while 1:
#O.run(100,True)
#if unbalancedForce
#break
plot.plots=
plot.plot()
O.saveTmp()
#plot.saveDataT
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(
#O.pause()
yade.qt.
# 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.
#rr.shape=False
#rr.intrPhys=True
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: