silulation can not quit
hello
i was going to do creat a boundary consist of many walls, the particles deposited by gravity within the boundary, and then i want to remove one of the wall to destabilize the accumulation and let the particles flow along a chute. But i put the code which remove the wall in the checkUnbalance function and make the simulation can not quit, i do not know where to put the code to let the simulation quit. Below is my code:
from yade import polyhedra_
import random
m = PolyhedraMat()
m.density = 2600 # kg/m^3
m.young = 1E6 # Pa
m.poisson = 20000 / 1E6
m.frictionAngle = 0.6 # rad
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
# generate randomly spheres with uniform radius distribution
polyhedra_
O.engines = [
ForceResett
InsertionSo
Interaction
),
# GravityEngine(
NewtonInteg
PyRunner(
]
O.dt=1e-2
# 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
O.pause()
O.
O.run()
#
# 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.
# 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=
# show the plot on the screen, and update while the simulation runs
plot.plot()
O.saveTmp()
i would appreciate it if you can help me
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask lip for more information if necessary.