export the position of sphere
Hello,
I wanted to get the positions of spheres when unbalanced Force < .05 and use export.text() to get the positions of spheres, but I failed.
from yade import pack, plot
from yade import export
# create rectangular box from facets
O.bodies.
# create empty sphere packing
sp = pack.SpherePack()
# generate randomly spheres with uniform radius distribution
sp.makeCloud((0, 0, 0), (1, 1, 1), rMean=.05, rRelFuzz=.5)
# add the sphere pack to the simulation
sp.toSimulation()
O.engines = [
),
]
O.dt = .5 * PWaveTimeStep()
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
def checkUnbalanced():
if unbalancedForce() < .05:
O.pause()
O.saveTmp()
I appreciate your help.
Best.
Mikexue
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- mikexue
- Solved:
- Last query:
- Last reply: