How to remove particles from a packing?
A cuboid with X-axis direction of 0.1, Y-axis direction of 10 and z-axis direction of 10 is filled with particles, and the radius of the particles is 0.05. It is stable under the action of self weight. How to dig out a circle in the stable structure? This circle is required to be on the Y-Z plane?
The code is as follows:
from yade import pack,plot
O.bodies.
sp = pack.SpherePack()
sp.makeCloud((0.05, 0, 0), (0.05, 10, 10), rMean=0.05, rRelFuzz=0)
sp.toSimulation()
O.engines = [
# handle sphere+sphere and facet+sphere collisions
),
# call the checkUnbalanced function (defined below) every 2 seconds
# call the addPlotData function every 200 steps
]
O.dt = 2 * PWaveTimeStep()
# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy[
O.trackEnergy = True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
if unbalancedForce() < .05:
O.pause()
plot.
# 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.addData(
# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots = {'i': ('unbalanced', None, O.energy.keys)}
# show the plot on the screen, and update while the simulation runs
plot.plot()
O.saveTmp()
# to see it
from yade import qt
qt.Controller()
qt.View()
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: