weight of clump differs from sum of z-directional interaction forces

Asked by Ferenc Safranyik

Dear All,

I would like to create a cylindrical clump from spherical elements. This clump is falling down to a particle bed, beacuse of the effect of gravity. After in equilibrium state I summarized all of z components of interaction forces actin on the clump (with function tomegCheck()), but the result differs from the weight of the clump (which is calculated from the mass of the clump), and I do not understand why... It should to be equal in equilibrium state because there are no more forces acting on the clump.

Has anybody any suggestions?

Thanks in advance!

Here is my code:

from yade import plot
from yade import pack
from yade import qt
from yade import ymport
import math
qt.View()

densT = 2600
ET = 2.5e12
nuT = .3
frictAngT = .2
nCoh = 1e10
sCoh = 1e10
eRoll = .1

EA = 2.1e8
nuA = .3
densA = 7800
frictAngA = .35

talaj = O.materials.append(CohFrictMat(young=ET,poisson=nuT,density=densT,frictionAngle=frictAngT,normalCohesion=nCoh,
                                      shearCohesion=sCoh,etaRoll=eRoll,isCohesive=True,momentRotationLaw=True,label='talaj'))

acel = O.materials.append(CohFrictMat(young=EA,poisson=nuA,density=densA,frictionAngle=frictAngA,normalCohesion=0,
                                      shearCohesion=0,etaRoll=.1,isCohesive=False,momentRotationLaw=False,label='acel'))

seged = O.materials.append(CohFrictMat(young=2.1e13,poisson=nuT,density=2000,frictionAngle=frictAngT,normalCohesion=0,
                                      shearCohesion=0,etaRoll=.1,isCohesive=False,momentRotationLaw=False,label='kerek'))

talaj = O.bodies.append(geom.utils.facetBox((0,0,.2),(1.8,.2,.2),wallMask=16, color=(.2,.2,.2),material = 'acel',wire=False))
doboz = O.bodies.append(geom.utils.facetBox((0,0,.06),(.25,.06,.06),wallMask=63, color=(.2,.2,.0),material = 'acel'))

Sugar1 = .01
felho = pack.SpherePack()
felho.makeCloud((-.2,-.05,.01),(.2,.05,.06),rMean=Sugar1)
particles = O.bodies.append([sphere(c,r,material='talaj',color=(.3,.8,.1)) for c,r in felho])

O.engines=[
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
        InteractionLoop(
                [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()],
                [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label='coh')],
                [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
   useIncrementalForm=True,
   always_use_moment_law = True)]
        ),
        NewtonIntegrator(damping=.8,gravity=(0,0,-9.81),label='newton'),
]

O.dt=.1*utils.PWaveTimeStep()

O.engines=O.engines + [PyRunner(command='ment()',iterPeriod = 1,label='vez')]

def ment():
 plot.addData(i=O.iter,uF=utils.unbalancedForce())
 if O.iter > 12000 and utils.unbalancedForce() < .2:
  coh.setCohesionNow=True
  for b in doboz:
   O.bodies.erase(b)

  global kerek_body
  kerek_body = []
  ker_r = .02
  ker_R = .25
  db_e = 120
  db_R = 12
  emel = ker_R+ker_r+.05
  osztas = math.radians(360)/db_e
  kerek_body.append(O.bodies.append(sphere([0,0,emel],ker_r,color=(1,0,0),material='kerek')))
  for j in range(1,db_R+1):
   hanyados = float(j)/float(db_R)
   for i in range(0,db_e):
    if j == 8 and i>0 and i<db_e*.5:
     szin = (1,0,0)
    else:
     szin = (1,1,0)
    kerek_body.append(O.bodies.append(sphere([hanyados*ker_R*math.sin(i*osztas),0,hanyados*ker_R \
    *math.cos(i*osztas)+emel],ker_r,color=szin,material='kerek')))
  global kerekID
  kerekID = O.bodies.clump(kerek_body)
  O.bodies[kerekID].state.blockedDOFs = 'xyXYZ'
  vez.dead = True

def tomegCheck():
 m=0
 b=0
 for i in O.interactions:
      if i.id1 in kerek_body:
   print(i.id1)
   print(O.forces.f(i.id1)[2])
   b+=1
   m+=O.forces.f(i.id1)[2]
 print('number of interactions: ',b)
 print('sum value of z directional forces: ',m)
 print('whole mass of the clump: ',O.bodies[kerekID].state.mass)

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Robert Caulk (rcaulk) said :
#1

Hello,

I tried running your script (after fixing syntax issues), and the utils.unbalancedForce() reports as nan indefinitely.

Please create an MWE [1] if you desire assistance.

Cheers,

Robert

[1]https://yade-dem.org/wiki/Howtoask

Revision history for this message
Ferenc Safranyik (safranyikf) said :
#2

Dear Robert,

thanks for your reply, but I tested the script and it worked for me (exactly that which you can find in my question). I use ubuntu 14.04 LTS and Yade 1.10.0-72.

Ferenc

Revision history for this message
Ferenc Safranyik (safranyikf) said :
#3

Dear Robert,

thanks for your reply, but I tested the script and it worked for me (exactly that which you can find in my question). I use ubuntu 14.04 LTS and Yade 1.10.0-72.

Ferenc

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

Hi, 1.10.0-72 is a bit old. It is difficult and ineffecient (for the developers at least) to discuss specific problems of old versions.
I would suggest compiling current source code (still possible on 14.04) or upgrading ubuntu (16.04 is enough) and installing more recent binary packages.
Bruno

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.