yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #06695
[Question #215064]: 2D porosity using "utils.voxelPorosity"
New question #215064 on Yade:
https://answers.launchpad.net/yade/+question/215064
Dear yade users,
I'm trying to compute the porosity of a sample 2D by using "utils.voxelPorosity". But it doesn't work. I think because this 'util' is prepared to compute the porosity in 3D-sample.
Has anyone computed the porosity of a sample 2D by using any "utils" in yade?
Thank you very much for your response...
from yade import pack,log
from yade import utils
import math
diam_sp = 0.01
O.bodies.append([utils.sphere((-diam_sp, 0.0, diam_sp),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((0.0, 0.0, diam_sp),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((diam_sp, 0.0, diam_sp),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((-diam_sp, 0.0, 0.0),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((0.0, 0.0, 0.0),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((diam_sp, 0.0, 0.0),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((-diam_sp, 0.0, -diam_sp),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((0.0, 0.0, -diam_sp),radius=0.5*diam_sp)])
O.bodies.append([utils.sphere((diam_sp, 0.0, -diam_sp),radius=0.5*diam_sp)])
print utils.voxelPorosity(resolution=800, start=Vector3(-1.0*diam_sp, 0.0, -1.0*diam_sp), end=Vector3(1.0*diam_sp, 0.0, 1.0*diam_sp))
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.