how to yield color nephogram of velocity in yade
hello
i was simulating the collapse of particle collummn, and i want to know how to yield color nephogram of velocity in yade. i have tried to use function scalarOnColorSc
below is my code:
from yade import polyhedra_
import random
m = FrictMat(
n = PolyhedraMat(
O.materials.
#the boundary of particle deposit
v1=((0,
v2=((0,
v3=((0,
v4=((0,
v5=((3,
b1 = polyhedra_
b2 = polyhedra_
b3 = polyhedra_
b4 = polyhedra_
wall = polyhedra_
b1.shape.wire=True
b2.shape.wire=True
b3.shape.wire=True
b4.shape.wire=True
O.bodies.
#sphere particles mixed with polyhedra
sp=pack.
sp.makeCloud(
for center,radius in sp:
if radius >= 0.2:
t = polyhedra_
t.state.pos = center # sets polyhedron position according to sphere position
else:
t = sphere(
#simulation
O.engines = [
ForceResett
InsertionSo
Interaction
),
# GravityEngine(
NewtonInteg
PyRunner(
PyRunner(
]
O.dt=10e-4
O.trackEnergy=True
def changecolor():
for b in O.bodies:
if b.id>4:
def checkUnbalanced():
print unbalancedForce()
if unbalancedForce
for b in O.bodies:
O.pause()
O.saveTmp()
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: