local coordination number
I want to get the local coordination number/mechanical coordination number for a local region. The following is the code, I print all the necessary information.
but the results obtained by this function: yade.utils.
#######
from yade import ymport
from yade import pack,export,geom
import itertools
from numpy import *
import numpy as np
from yade import pack, plot, export, utils
import math
O.bodies.
O.bodies.
O.engines=[
ForceResett
InsertionSo
Interaction
PyRunner(
#PyRunner(
PyRunner(
#PyRunner(
NewtonInteg
]
O.dt=.5*
print(len(
def checkUnbalanced():
if unbalancedForce
O.pause()
#O.run(
#######
def subbox():
global ball_list1
ball_list1 =[]
global zero_contact_p
zero_contact_p = 0
global one_contact_p
one_contact_p = 0
global intrs
intrs = 0
global intrs_number
intrs_number = 0
coodN = avgNumInteracti
coodN1 = avgNumInteracti
for b in O.bodies:
if 0< b.state.pos[2] <= 1:
if isinstance(
m = b.id
for bb in ball_list1:
print ('coodN is:',coodN)
print('coodN1 is:',coodN1)
print('zero contact numbers:
print('one contact numbers:
print('this is partilce numbers:
print(
print("this is the number in region 1:",len(
print('this is intrs_number:
print('the total number of inters is:',intrs)
print('this is the coordination number:
print('this is the mechanical coordination number:
the results:
('coodN is:', 2.125)
('coodN1 is:', 3.3333333333333335)
('zero contact numbers:', 0)
('one contact numbers:', 0)
('this is partilce numbers:', 6)
('ball-list1:', [10, 11, 12, 13, 14, 15])
('this is the number in region 1:', 6)
('this is intrs_number:', 4)
('the total number of inters is:', 79) ###### it seems the total interaction numbers is not correct. but I didn't find the error.
('this is the coordination number:', 26)
('this is the mechanical coordination number:', 26)
thanks!
Yong
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: