New question #692067 on Yade:
https://answers.launchpad.net/yade/+question/692067

Hello everyone,

I run the scripts periodicSandPile.py as shown in:
https://gitlab.com/yade-dev/trunk/blob/master/examples/PeriodicBoundaries/periodicSandPile.py
where the bottom plate is made by box instead of wall or facet. I am curious 
about the situation if wall or facet is used instead of box, so I changed the 
box into wall. But the spheres under gravity will passes through the wall or 
facet that I defined, which is confusing. Would you please tell me why this 
happened, or where I was wrong? Thank you! The script using wall is presented:

#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# import yade modules that we will use below
from yade import pack, plot, qt
O.periodic=True

lx=0.05
ly=0.1
lz=0.1

# creat horizontal 4 periodic boundries by cell
O.cell.hSize=Matrix3(lx, 0, 0,
                      0, ly, 0,
                      0, 0, lz)

# creat plate
O.bodies.append(utils.wall(position=(lx/2,ly/2,lz/5),axis=2))

# define material of sphere particles
idSand=O.materials.append(FrictMat(young=1e5,poisson=1,frictionAngle=radians(20),density=2650,label="Sand"))
 

# creat sphere particles
radium=0.0005
sp=pack.SpherePack() # create an empty cloud; SpherePack() contains only 
geometrical information
sp.makeCloud((0.0,0.0,0.3*lz+4*radium), (lx,ly,0.7*lz-4*radium), rMean=radium, 
rRelFuzz=0.0, num=500, periodic=True)
sp.makeCloud((0.0,0.0,0.3*lz+4*radium), (lx,ly,0.7*lz-4*radium), 
rMean=1.5*radium, rRelFuzz=0.0, num=500, periodic=True)
for s in sp:
        if s[1]==radium: 
                
O.bodies.append(utils.sphere(center=s[0],radius=s[1],material="Sand",color=(1.0,0.0,0.0)))
 #
        else:
                
O.bodies.append(utils.sphere(center=s[0],radius=s[1],material="Sand",color=(0.0,1.0,0.0)))
 #
#---------------------------------------------------------------------------------------------

O.engines=[
        ForceResetter(),
        
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],allowBiggerThanPeriod=True),
 
        InteractionLoop(
                # handle sphere+sphere and facet+sphere collisions
                [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
                [Ip2_FrictMat_FrictMat_FrictPhys()],
                [Law2_ScGeom_FrictPhys_CundallStrack()]
        ),
        GlobalStiffnessTimeStepper(),
        NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
        PyRunner(command='checkUnbalanced()',realPeriod=2),
        PyRunner(command='addPlotData()',iterPeriod=100)
]
O.trackEnergy=True

def checkUnbalanced():
        if unbalancedForce()<.05:
                O.pause()
                plot.saveDataTxt('bbb.txt')
                # plot.saveGnuplot('bbb') is also possible

def addPlotData():
        # each item is given a names, by which it can be the unsed in plot.plots
        # the **O.energy converts dictionary-like O.energy to plot.addData 
arguments
        plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

plot.plots={'i':('unbalanced',None,O.energy.keys)}
plot.plot()

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to