How to determine volume of the spheres in psd after deposition

Asked by stephen

hi,
please am having some difficulties in calculating the volume of the spheres imediately after deposition.
the number of spheres i added before the deposition started is 1050 and after the deposition, when the sample is stabilized, the unwanted spheres were leveled off.
(1) how can the exert volume of the spheres in the sample after deposition be calculated.
(2)what command can be used to calculate the porosity of the sample.

O.bodies.append(geom.facetBox((0.035,0.035,0.035),(0.035,0.035,0.035),wallMask=15, dynamic=1))
O.bodies.append(utils.geom.facetBox((0.035,0.035,0.035),(0.035,0.035,0.035),wallMask=16, material = BoundaryMat,dynamic=0))#bottom of the sample, which is not allowed to move. because of that dynamic=0 [O means "False"]
O.bodies.append(utils.geom.facetBox((0.035,0.035,0.105),(0.035,0.035,0.035),wallMask=15))#!!!! in order to control the particles!!! after the end of the stabilization, we will remove it

psdSizes,psdCumm=[0.00525,0.00603,0.0105,0.01206,0.02099],[0,0.1,0.5,0.6,1.0] #d50=10.5mm, cu=2

mincorner,maxcorner=Vector3(0.001,0.001,0.001),Vector3(0.07,0.07,0.1) #min and max coordinates of the wall

sp=pack.SpherePack() #burda pack modulunun Spherepack modulunu cagiriyo, bi altinda da o cagirdinin,piramit gibi lan iste!

sp.makeCloud(mincorner,maxcorner,psdSizes=psdSizes,num=number,psdCumm=psdCumm,distributeMass=1)

thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Best Jérôme Duriez (jduriez) said :
#1

Hello,

Your question is a small python-yade exercise.
So,
1) to compute the total volume of spheres, do, in yade prompt :
V=0 # variable that should be equal to the desired volume, after following operations. Now initialized to 0

for b in O.bodies: # loop over all bodies of your simulation
     if isinstance(b.shape,Sphere): # check if the body considered is indeed a sphere
          V=V+4.0/3.0*pi*pow(b.shape.radius,3.0) # increment the variable "V" with the volume of this sphere
#blank line suppressing the indentation to execute the loop

Then, let output "V", and enjoy !

2) for the porosity, you will need the volume of your model, maybe you could deduce it from your script (I do not know), or use aabbExtrema() yade function. See the doc, or an example in examples/jointedCohesiveFrictionalPM/gravityLoading.py

Revision history for this message
stephen (ifeanyi2295) said :
#2

Thanks jduriez, that solved my question.