Porosity of a packing with overlapped particles
Hi,
I defined a function to calculate the porosity of a packing with lots of overlapped particles, because the build-in function "utils.porosity()" always got a negative one. This question (https:/
My own function has a serious error, that is my function always got a same porosity whatever the growFactor is. Here is my code segment:
from yade import utils
from yade import pack
from yade import qt
mat1 = O.materials.
pred = pack.inAlignedB
dim = pred.dim()
packing = regularHexa(pred, radius=
O.bodies.
# grow particles in order to get lower porosity
growFactor = 1.5
utils.growParti
def overlappedPoros
totVol = dim[0]*
mass = sum([b.state.mass for b in O.bodies]
return (totVol - mass/density)
print 'The porosity of this packing is:',overlapped
# 3D view and controller
try:
qt.Controller()
qt.View()
except:
pass
In my function, ''mass = sum([b.state.mass for b in O.bodies]
Any useful advice will be highly appreciated.
Thanks in advance,
Huihuang Xia
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Klaus Thoeni
- Solved:
- Last query:
- Last reply: