Irregular variation of unbalanced force during simulation

Asked by lip on 2019-08-13

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.

Question information

Language:
English Edit question
Status:
Needs information
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-08-13
Last reply:
2019-08-13
Jan Stránský (honzik) said : #1

Hello,
please provide a typical values (.e.g. 50 time-unbalancedForce couples)
In general, unbalanced force is an oscillating quantity, but it should converge to a certain value.
Cheers
Jan

Can you help with this problem?

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

To post a message you must log in.