can we set a mask for a particular particle
Hi All,
I want to use this command : yade.export.
here is the MWE:
import numpy as np
from yade import pack, plot, export, utils
import math
O.bodies.
sp=pack.
sp.makeCloud(
sp.toSimulation()
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
PyRunner(
PyRunner(
#PyRunner(
#VTKRecorder(
PyRunner(
NewtonIntegrat
]
O.dt=.5*
print(len(
def checkUnbalanced():
if unbalancedForce
O.pause()
#plot.plots=
#plot.plot()
x0 = 0.5
y0 = 0.5
z0 = 0.5
#######
ball_list1 =[]
def subbox():
global ball_list1
aaa = 0.0
for b in O.bodies:
brp = math.sqrt(
if brp >= 0.2:
if brp <= 0.4:
if (b.state.pos[2]-z0 >= -0.5) and (b.state.pos[2]-z0 <= 0.0):
if isinstance(
b.shape.color =Vector3(
m = b.id
ball_
for i in ball_list1:
for b in O.bodies[i]:
b.mask = 1
def get_po():
export.
but it seems this command just export all particle' information. not just ball_list1.
Is there anyone can give me some suggestions.
best,
yong
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: