← Back to team overview

yade-users team mailing list archive

Re: [Question #706684]: Small particles jumping up in gravity deposition example in a cylindrical box

 

Question #706684 on Yade changed:
https://answers.launchpad.net/yade/+question/706684

    Status: Open => Answered

Jan Stránský proposed the following answer:
> 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

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