Small particles jumping up in gravity deposition example in a cylindrical box

Asked by Soheil Safari

Hello everyone,

Hope you are doing well.

I want to simulate spherical packing in a cylindrical container. I followed the Gravity deposition example on the Yade website. It works well for the bigger particles. But for the small particles, most of the particles jumping up and going above, instead of deposition. Some of the particles go out of the box.
I need the porosity and particle configuration of packing at the end (balanced state).

I want to simulate my experiments, in which the particles are mono-sized spheres with 0.5 mm and 0.1 mm in diameter. And, the diameter of my cylinder is 5.2 cm. As it is not possible to use the real geometry of the cylinder because of the huge number of particles, that is why I used smaller ones.

Here is my code:
###########
# gravity deposition in box, showing how to plot and save history of data,
# and how to control the simulation while it is running by calling
# python functions from within the simulation loop

# import yade modules that we will use below
from yade import pack, geom, plot
from yade import export

pred = pack.inCylinder((0,0,0),(0,0,0.01),0.005)
sp = pack.randomDensePack(pred,radius=0.00025,spheresInCell=300)
O.bodies.append(sp)
facets = geom.facetCylinder((0,0,0.02),0.005,0.05,wallMask=2|4)
O.bodies.append(facets)
# add the sphere pack to the simulation
# sp.toSimulation()

O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
        InteractionLoop(
                # handle sphere+sphere and facet+sphere collisions
                [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_FrictPhys()],
                [Law2_ScGeom_FrictPhys_CundallStrack()]
        ),
        NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4),
        # call the checkUnbalanced function (defined below) every 2 seconds
        PyRunner(command='checkUnbalanced()', realPeriod=2),
]
O.dt = .5 * PWaveTimeStep()

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy = True

# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
 if unbalancedForce() < .05:
  O.pause()

O.saveTmp()

# export spheres function every 1000 iterations
O.engines += [PyRunner(command="exportSpheres()", iterPeriod=1000, initRun=True)]

def exportSpheres():
    i = O.iter
    fName = f"yade-spheres-{i:06d}.txt"
    export.text(fName)

# porosity
O.engines += [PyRunner(iterPeriod=1000,command="plotAddData()",initRun=True)] # runs every 1000 iterations

def plotAddData():
    porosity = utils.porosity()
    plot.addData(iter=O.iter, time=O.time, porosity=porosity)
    plot.saveDataTxt("result.txt")

############

Any help will be greatly appreciated.

Thanks and regards,
Soheil

Question information

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

Hello,
see recent similar discussion [1]
Cheers
Jan

[1] https://answers.launchpad.net/yade/+question/706332

Revision history for this message
Soheil Safari (soheilsafari) said :
#2

Dear Jan,

Thank you very much for your kind reply and valuable information as always.

I changed these options but it did not work:
1- Reducing the “damping=0.4” value
2- Reducing the “unbalancedForce() < .05” value
3- using a higher cylinder (it works for larger particles, but not for small ones)

Please let me know how I can use a "semi-permeable" wall as you recommend. (masked such that it does not contact with spheres going down, but does contact with those going up (preventing them from bouncing out))

Also, what should I do for the below options?
- contact law damping
- numerical integrator damping

I really appreciate any help you can provide.

Regards,
Soheil

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

> Reducing the “damping=0.4” value

try higher values, even close to 1

> contact law damping

Using contact law with damping / viscosity.
I do not use these myself, so I cannot help more.

> numerical integrator damping

NewtonIntegrator(...,damping=XYZ)

> how I can use a "semi-permeable" wall

MWE below.
The idea is that a barrier and spheres has incompatible masks by default = they do not interact = particle can get in.
Then there is a regular check and for "low enough" or "inner" particles it adds the barrier bit to the particles mask such that it interacts with the barrier = the particle cannot get out.

##############################
zBarrier = 5

bottom = wall((0,0,0), axis=2)
barrier = wall((0,0,zBarrier), axis=2, mask=0b10)
ball = sphere((0,0,2*zBarrier), radius=1, mask=0b01)

# barrier and ball masks has no bit in common - no interaction

O.bodies.append([bottom,barrier,ball])

O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb()]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom(), Ig2_Wall_Sphere_ScGeom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],
        [Law2_ScGeom_FrictPhys_CundallStrack()]
    ),
    NewtonIntegrator(gravity=(0, 0, -10), damping=0),
    PyRunner(command='lockInside()', iterPeriod=20),
]

def lockInside():
    for b in O.bodies:
        if not isinstance(b.shape,Sphere):
            continue
        x,y,z = b.state.pos
        if z < zBarrier:
            b.mask |= 0b10
            # set mask to "inner" particles to interact with barrier

O.dt = 1e-5
##############################

Cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask Soheil Safari for more information if necessary.

To post a message you must log in.