mass after simulation

Asked by Estefany Carmona Alvarez on 2020-02-24

I have the following code, but I want to calculate the mass and porosity of the particles left in the cylinder after the deposition of the material.
Can someone help me with the function I should use? or how can I build the code for this function.

Thanks

postscript: the algorithm comments are in Spanish

#######
# Algorithm
#######

from yade import pack

#Altura de caida del material
hc=0

#centro
x=0
y=0
z=0
radius=.5

#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.append(geom.facetBox((x,y,z),(f,a,(h+hc)),wallMask=31,wire=True))

pred=pack.inAlignedBox((0,0,0),(.5,.5,.5))
sphere=pack.randomDensePack(pred,radius=0.0475,color=(1,1,1))
O.bodies.append(sphere)

f=geom.facetCylinder((0,0,0),.3,1,wallMask=6)
O.bodies.append(f)

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),
    Bo1_Facet_Aabb(),
    Bo1_Cylinder_Aabb(),
    Bo1_Wall_Aabb()
 ]),
 InteractionLoop(
  # handle sphere+sphere and facet+sphere collisions
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 #GravityEngine(gravity=(0,0,-9.81)),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
 PyRunner(command='checkUnbalanced()',realPeriod=1)

]
O.dt=PWaveTimeStep()

def checkUnbalanced():
 if unbalancedForce()<0.05: O.pause()

Vtotal=((pi*radius*radius)*1)

print "Porosidad calculada por Yade=", utils.porosity(Vtotal)

mass=sum([b.state.mass for b in O.bodies])
print "Masa del especimen=", (mass)

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2020-02-24
Last reply:
2020-02-24
Jan Stránský (honzik) said : #1

Hello,
how to filter particles in cylinders, see [1],
how to calculate their mass, see [1] (calculating volume is very similar),
how to calculate porosity, see e.g. wikipedia [2],

cheers
Jan

[1] https://answers.launchpad.net/yade/+question/688837
[2] https://en.wikipedia.org/wiki/Porosity

Can you help with this problem?

Provide an answer of your own, or ask Estefany Carmona Alvarez for more information if necessary.

To post a message you must log in.