Mass in the cylinder
I am trying to calculate the mass of the particles that remain inside the cylinders, I defined the functions to calculate them but it generates an error when executing the algorithm and does not show me the value I need.
from yade import pack, plot
#Altura de caida del material
hc=0
#EQUIPO
#coordenadas centro
x=0
y=0
z=0
#coordenadas extension
f=0.45
a=0.50
h=1
#estrutura del equipo de pluviacion
O.bodies.
#Mallas
#O.bodies.
#(0,0,(
#
#PROBETA
#Radio
radius=0.05
#Altura de la probeta
height=0.1
#Probeta 1
#Coordenadas centro
xp1=0.1
yp1=0
zp1=1
O.bodies.
#Probeta 2
#Coordenadas centro
xp2=0.1
yp2=0
zp2=1
O.bodies.
#coordenadas perimetro de particulas
#esquina inferior
xi=0.225
yi=0.225
zi=0.2
#esquina superior
xs=0.225
ys=0.25
zs=0.5
#porosidad
p=0.903
#tamices
#los diametrso y los porcentajes acumulados siempre se deben ubicar de menor a mayor
#por cada t debe haber un p
#Diametro de la abertura de tamices psdSizes
t1=0.00008
t2=0.00015
t3=0.00030
t4=0.00085
t5=0.00200
t6=0.00475
#Porcentajes retenidos del material psdCumm
p1=0
p2=0.002
p3=0.111
p4=0.889
p5=0.9994
p6=1
#Material
#angulo de friccion
angulo=radians(36) #radianes
#densidad del material
densidad=1418 #(kg/m3)
#Modulo de Young
young=(1e8) #Pa
#Poisson
poisson=0.5
#contenidod de vacios
porosidad=0.9
#Algoritmo YADE para el material
snd=O.materials
#label="SndG"
))
#Algoritmo YADE para el cuerpo de las esferas
sp=pack.
sp.makeCloud(
sp.toSimulation
O.engines=[
ForceResetter(),
InsertionSortC
Bo1_
Bo1_
Bo1_Wall_Aabb()
]),
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[Ig2_
[Ip2_
[Law2_
),
#GravityEngine
NewtonIntegrat
PyRunner(
PyRunner(
PyRunner(
]
O.dt=PWaveTimeS
def checkUnbalanced():
if unbalancedForce
def isBodyInCylinde
d=body.
d[2]=0
distance=d.norm()
return distance<radius
def masses():
mass1=mass2=0.0
center1=
center2=
for b in O.bodies:
if not isinstance(
if isBodyInCylinde
mass1+
if isBodyInCylinde
mass2+
return mass1,mass2
print(
Thanks
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: