yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #13751
[Question #404363]: porosity calculation for clumps
New question #404363 on Yade:
https://answers.launchpad.net/yade/+question/404363
Dear all,
in simulations using clumps of overlapping spheres, I was wondering if the porosity is calculated correctly.
Using the following example, I obtain the same results with yade-1.20.0 and yade-2016.06a:
import numpy as np
#create a clump of two overlapping spheres:
ra=0.5
clump1=O.bodies.appendClumped([ sphere([0,0,0],ra), sphere([ra,0,0],ra) ])
O.bodies.updateClumpProperties(discretization=100)
#define a total volume for porosity calculation
Vtotal=(3*ra)*ra*2
#thanks to Wolfram alpha, the analytic solution should be
print "analytic solution: ", (Vtotal - (2*4.0/3.0 - 5.0/12.0)*np.pi*ra**3)/Vtotal
print "porosity calculated by yade: ", utils.porosity(Vtotal)
# a correct porosity could be calculated like this (?)
def myClumpPorosity(VolTot, density):
mass=sum([ b.state.mass for b in O.bodies if b.isClump])
return (VolTot -mass/density)/VolTot
print "my porosity: ", myClumpPorosity(Vtotal, O.materials[0].density)
Is there a bug in the porosity calculation or did I understand something wrong?
Thanks for your help.
Regards,
Bettina
--
You received this question notification because your team yade-users is
an answer contact for Yade.