appropriate of porosity

Asked by ytang

Hi all,

I know there are three ways to calculate the porosity. (1) in triaxial test, using trix.porosity. (2) using 'yade._utils.porosity' (3) using 'yade._utils.voxelPorosity' .
Right now, I want to get the porosity of a gravity deposition sample. after the sample settles down.
I use method (2) and (3).

here is the code to calculate the porosity:
the boundary of the box is: O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))
#######################
from yade import utils
volume_all = 1*1*1
solid_volume = 0
resolution = 1600
corner =Vector3(0,0,0)
upper =Vector3(1,1,1)
for b in O.bodies:

 if isinstance(b.shape,Sphere):
  if 0 < b.state.pos[2] <= 0.2:
   radius = b.shape.radius
   solid_volume= solid_volume+4.*pi/3.*b.shape.radius**3
local_porosity1 = porosity((volume_all-solid_volume)/volume_all)
print('porosity1 is:',local_porosity1)
local_porosity2 = voxelPorosity(resolution,corner,upper)
print('porosity2 is:',local_porosity2)
###############
the results are:
('porosity1 is:', 0.6974628420464914)
('porosity2 is:', 0.7288646931152344)
####################
I know that for both methods, we don't condider the partiles at the boundary (where the particle center isn't inside the boundary). for method 2, we don't consider the overlap between the particles. I don't know whether method 3 considers the voerlap or not and how the consider the overlap.

right now, the difference between these two values is significant.
Can anyone give me some suggestions about which method is more suitable or reasonable?

best,
Yong

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hello,

1) and 2) are in principle the same, computing (V-V_s)/V [1,2]
V_s = sum of volumes of spheres (regardless overlaps)
V = total volume (see below)

differences:
1) triax.porosity treats V "automatically",
2) utils.porosity (as the documentation says) consideres V as aabbDim or user-defined argument

3) voxelPorosity [3], as the name suggests, it is an **approximation** based on voxels ("little cubes")
- does not count overlaps multiple times (is not clear from the documentation? If so, feel free to improve it)
- needs fine resolution to be precise

> Can anyone give me some suggestions about which method is more suitable or reasonable?

it very much depends on your needs, expectations, ...
- if you have significant overlaps or not
- what you use the value of porosity for
- how many particles you have in the sample (like a few particles is OK, but. e.g. having 1000x1000x1000 particles, then voxelPorosity(1600,...) does not make sense)
- etc. etc.

cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/TriaxialStressController.cpp#L142
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/Shop_01.cpp#L382
[3] https://yade-dem.org/doc/yade.utils.html#yade._utils.voxelPorosity

Revision history for this message
ytang (ytang116) said :
#2

Hi Jan,

thank you very much!

I want to get the contour map of the void ratio.

for my real simulation case. the overall particle is 0.3 million.

I use gravity deposition to generate the sample. I think the overlap is not significant (but I need to check this).

overall, I think I will use "utils.porosity" this function.

Revision history for this message
ytang (ytang116) said :
#3

Thanks Jan Stránský, that solved my question.