← Back to team overview

yade-users team mailing list archive

[Question #682833]: Irregular variation of unbalanced force during simulation

 

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

hello:
   i am doing a deposit simution contained polyhedra and shpere,particles pile up freely in a box formed by polyhedra under the action of gravity. below is my code: 
from yade import polyhedra_utils,pack,plot,utils
import random

m  = FrictMat(young=7.2e7,poisson=.2,density=2.5e3)
n = PolyhedraMat(young=7.2e7,poisson=.2,density=2.5e3)

O.materials.append((m,n))

#the boundary of particle flow
v1=((0,0,0),(0,2.7,0),(0,0,40),(0,2.5,40),(-0.1,0,0),(-0.1,2.7,0),(-0.1,0,40),(-0.1,2.7,40))
v2=((0,0,0),(0,0,40),(18,0,0),(18,0,40),(0,0.1,0),(0,0.1,40),(18,0.1,0),(18,0.1,40))
v3=((0,2.5,0),(0,2.5,40),(18,2.5,0),(18,2.5,40),(0,2.6,0),(0,2.6,40),(18,2.6,0),(18,2.6,40))
v4=((0,0,0),(0,2.7,0),(18,2.7,0),(18,0,0),(0,0,-0.1),(0,2.7,-0.1),(18,2.7,-0.1),(18,0,-0.1))
v5=((2.5,0.1,0),(2.5,2.6,0),(2.5,0.1,40),(2.5,2.6,40),(2.6,0.1,0),(2.6,2.6,0),(2.6,0.1,40),(2.6,2.6,40))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b1.shape.wire=True
b2.shape.wire=True
b3.shape.wire=True
b4.shape.wire=True
O.bodies.append((b1,b2,b3,b4,wall))

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0.2,0.2,2),(2.4,2.4,100),psdSizes=[0.1,0.1,0.6,0.6],psdCumm=(0.0,0.9634,0.9634,1),seed=1,porosity=1)
for center,radius in sp:
    if radius > 0.1:
        t=polyhedra_utils.polyhedra(material=n,size=(0.5386,0.5386/3,0.5386/3),seed=2)
        t.state.pos = center # sets polyhedron position according to sphere position
        O.bodies.append(t)
     else:                                                                                                                                                                                       
        t = sphere(center,radius,material=m)
        O.bodies.append(t)
#simulation
O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb()]),
    InteractionLoop(
        [Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Sphere_Sphere_ScGeom()],
        [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],  
        [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]  
    ),
    # GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
    PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker'),
]
def checkUnbalanced():
   print unbalancedForce()
   if unbalancedForce()<.0000000001:
      O.pause()

O.dt=1e-4

when the simulaiton begins, i found that the unbalanced force changed Irregularly in a small value field. what i expect is that as the number of simulation iterations increases, the unbalanced force decreases gradually.



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