Coordination number

Asked by maria aurora natale

Morning Yade community.

I've been working with the eodometric test example. Everything went well implementing the script. However, I would like to estimate the coordination number of the particles at different stages of the test. Right now I'm trying to estimate the coordination number just after the interactions to see how this number change. You're going to find what I've done and if you have any suggestion for me I would appreciate it.

Thanks in advance,

Aurora

$ yade-batch --job-threads=1 03-oedometric-test.table 03-oedometric-test.py
#

# load parameters from file if run in batch
# default values are used if not run from batch
readParamsFromTable(rMean=.05,rRelFuzz=.3,maxLoad=1e6,minLoad=1e4)
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *

# create box with free top, and ceate loose packing inside the box
from yade import pack, plot
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=rMean,rRelFuzz=rRelFuzz)
sp.toSimulation()

O.engines=[
   ForceResetter(),
   # sphere, facet, wall
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
   InteractionLoop(
      # the loading plate is a wall, we need to handle sphere+sphere, sphere+facet, sphere+wall
      [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
   # the label creates an automatic variable referring to this engine
   # we use it below to change its attributes from the functions called
   PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
   PyRunner(command='c_number()',realPeriod=2,label='checker'),
]

O.dt=.5*PWaveTimeStep()
O.step()

def c_number():
 for b in O.bodies:
   c_num1=avgNumInteractions(considerClumps=True)
   print c_num_1

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
maria aurora natale (aurinatale) said :
#1

Yade friends!

Don't worry about my question. I just solved thanks your previous answer. It shows that I'm very new in this matter and specially python programming. Nonetheless I give you thank you anyway. I'm learning a lot.

See you all around here soon.

Regards,

Aurora

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

According to OP, this thread is solved.