← Back to team overview

yade-users team mailing list archive

Re: [Question #676284]: avg Num Interactions

 

Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Luis Barbosa posted a new comment:
Hi Bruno I am using yadedaily  Yade 2018.02b-1786828270~xenial

Here follows the script:

#!/usr/bin/python
# -*- coding: utf-8 -*-

from yade import plot
from yade import pack
from yade import utils
from yade import bodiesHandling
import math
import random

# Spheres############################################################

O.materials.append(JCFpmMat(type=1,young=70e9,poisson=0.3,frictionAngle=radians(30),density=1600,tensileStrength=15e5,cohesion=15e5,jointNormalStiffness=1e5,jointShearStiffness=1e5,jointCohesion=15e5,jointFrictionAngle=radians(30),jointDilationAngle=0.0,label='spheres'))

ag=O.bodies.append(
#	pack.regularHexa(
	pack.randomDensePack(
		(pack.inSphere((0,0,0.055),0.055)),radius=rad,color=(0,1,0),rRelFuzz=0,material='spheres') # head
)

###################################################################

O.engines=[
  ForceResetter(),

	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
		[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True)]
	),

  GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=500,timestepSafetyCoefficient=0.5),
  NewtonIntegrator(damping=0.1,gravity=[0,0,0]),
  PyRunner(command='AutoData()',iterPeriod=500,initRun=True),

]


##########################Coordination Number############################################
def AutoData():
	plot.addData(CN=avgNumInteractions(cutoff=0.,skipFree=True,considerClumps=False), i=O.iter)
O.run(2000,True)#800000
plot.plots={'i':('CN')}
plot.plot()
plot.saveDataTxt('CN.txt')


from yade import qt
qt.View()
qt.Controller()


Thank you,
Luis

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