No. of spheres in a packing

Asked by Amrisha Khandelwal

Hello, I m new in yade. I am trying to fill a box of size 0.1m*0.1m*0.1m with 9500 spheres of mean radius 2 mm and standard deviation of 0.1mm. This condition should be achieved after gravity deposition so that the packing should be stable. I used randomdense packing but it gives approx 16000 spheres. Can anyone help me how to achieve specific no. of spheres in random dense packing.
Below is my script for the same.

#modules import
from yade import pack
#define box of size 0.1*0.1*0.1
O.bodies.append(geom.facetBox((0.05, 0.05, 0.05), (.05, .05, .05), wallMask=31))

#define packing
pred1=pack.inParallelepiped((0,0,0),(0.1,0,0),(0,0.1,0),(0,0,0.12)) #z axis value is increased so that after gravity deposition, final height could be 0.1m
O.bodies.append(pack.randomDensePack(pred1, spheresInCell= 4000, radius=2e-3, rRelFuzz=0.1, seed=1)

#define engines
O.engines=[
           ForceResetter(),
           InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
           InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
           [Ip2_FrictMat_FrictMat_FrictPhys()],
           [Law2_ScGeom_FrictPhys_CundallStrack()]),
           NewtonIntegrator(gravity=(0,0,-9.81),damping=0.8,label='newton'),
           PyRunner(command='unbalance()', realPeriod=1, label='force'),
         ]

O.dt=0.3*PWaveTimeStep()

density=2.65e3
mass=sum(b.state.mass for b in O.bodies)
vs=mass/density #fine volume of solids by mass/ density of soil solids

def unbalance():
 print('unbalanced Force', unbalancedForce())
 poro=utils.porosity()
 vol=round(vs/(1-poro),5) #finding current volume by porosity formula, n= v-vs/v
 print('volume:', vol)
 if vol<=0.001: #stop the simulation when final volume of 0.001m3 is reached
  O.pause()

Thank you

Question information

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

Please redirect to our new Q&A location
https://gitlab.com/yade-dev/answers
Thanks
Jan

Revision history for this message
Amrisha Khandelwal (amrishakhandelwal) said :
#3

Thank you so much for your answer.
--Calculate the number of spheres per cell based on this number.

Can you plz specify what does cell means here? Do you mean The box
(0.1*0.1*0.1)? as here there is no periodic cell.

i am not able to understand how is spheresInCell function is working.
Please explain.

Thank you

-------- Original Message --------
Subject: Re: [Question #708213]: No. of spheres in a packing
Date: 18.10.2023 11:25
 From: Asif Khan <email address hidden>
To: <email address hidden>

Your question #708213 on Yade changed:
https://answers.launchpad.net/yade/+question/708213

Asif Khan posted a new comment:
To achieve a specific number of spheres in random dense packing, you can
modify your script as follows:

Define the desired number of spheres (e.g., 9500).
Calculate the number of spheres per cell based on this number.
Adjust the "spheresInCell" parameter in your script to match the
calculated value.
Run your simulation as usual.
These changes should help you reach the desired number of spheres in
your simulation. For more detailed information, you can visit this
Yade wiki page (https://geometrydashapks.net/wiki-de-geometry-dash/)

Revision history for this message
Jan Stránský (honzik) said :
#4

Please redirect to our new Q&A location
https://gitlab.com/yade-dev/answers

The message from Asif Khan was a AI-generated spam, do not heed it.

Thanks
Jan

Can you help with this problem?

Provide an answer of your own, or ask Amrisha Khandelwal for more information if necessary.

To post a message you must log in.