← Back to team overview

yade-users team mailing list archive

[Question #670078]: Dense packing with given distribution of radii


New question #670078 on Yade:

Hi all,

I want to create a spherical dense packing of spheres, where the radii of the spheres are given by a Gaussian distribution. Since I want to assign the radii myself, I have seen on some questions (https://answers.launchpad.net/yade/+question/406741) that filterSpherePack should be the way to go. But I am unsure how I can make my spherePack dense after filling the predicate? In the question linked above it seems as I could do it using an isotropic compression, but when I try that all my spheres "explode". And since my body of spheres is also spherical, it seems to me that a compression from 6 different planes will only distort my sphere.

 Is there another way to achieve a densely packed spherical body with assigned radii? I have seen on https://answers.launchpad.net/yade/+question/211583 
that it is suggested to change the source code for spherePack, how can this be done? 

I am new with Yade so I greatly appreciate any help!

Cheers, Olav

Below is my script for creating the spherical loose-packed body using filterSpherePack:

from yade import pack
import numpy as np
## Creating a body of spheres of varying radii

# Using numpy to generate a Gaussian distribution of sphere diameters
mu, sigma=20,2  #mean and standard deviation
d=np.random.normal(mu,sigma,numParticles) #diameter array 

#Sorting the diameters
#Creating a vector of accumulated factors of the particles
#Here we have one particle assigned to each radius
#for some reason Yade says 1/numParticles=0, so 0.001 is used instead

## making cloud of spheres to insert into predicate
#giving the spheres a radius assigned by Normal distribution

## constructing predicate

## packing predicate with loosely packed spheres

## add spheres to simulation

You received this question notification because your team yade-users is
an answer contact for Yade.