Number of Breakage in JCFPmMat
Hey,
I am trying to implement nbTensCracks and nbShearCracks functions [1] & [2], to count the number of breakage after compression of one single particle. BTW, I faced attribute error, the error is:
AttributeError: 'Law2_ScGeom_
[1] https:/
[2] https:/
the MWE is as follows:
from yade import pack, utils, ymport, export
import numpy as np
import yade.timing
import matplotlib.pyplot as plt
import os.path
particleDiameter = 0.6e-3
displacementRate = 1.6667e-6 # m/s
strainRate = displacementRat
young =3e8 #elastic modulus [Pa]
poisson = 0.3
density = 5000
relDuctility=30 #relative ductility of bonds in normal direction
mn,mx=Vector3(
finalFricDegree = 25 #Contact friction angle
intRadius= 1.329 #Internal Radius
sigmaT = 7e6 #Normal shear stress
identifier=
output=
rate = strainRate*10000
stabilityThresh
iterper=1000 #Periodicity criterion using step number (deactivated if <= 0)
cohesion=20e6
jCFmat = O.materials.
#frictionless walls
wallmat = O.materials.
walls=aabbWalls
wallIds=
sp = O.bodies.
triax = TriaxialStressC
thickness=0,
stressMask=7,
internalCompac
)
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
triax,
VTKRecorder(
NewtonIntegrat
]
O.dt = 0.3 * utils.PWaveTime
from yade import qt
v=qt.Controller()
v=qt.View()
from yade import plot
O.engines=
def stressStrainHist():
plot.addData(
e22=exp(
e33=-
s11=-
s22=-
s33=-
i=O.iter,
displacement=
P = -O.engines[
plot.saveDataT
plot.plots=
plot.plot()
def addPlotData():
yade.
})
plot.
#### coordination number verification
numSSlinks=0
numCohesivelinks=0
for i in O.interactions:
if isinstance(
numSSlinks+=1
if i.phys.isCohesive :
numCohesi
print "nblinks=", numSSlinks, " | nbCohesivelinks=", numCohesivelinks, " || Kcohesive=", 2.0*numCohesive
O.engines=
def stopifDamaged():
sigma,eps, P=plot.
if O.iter > 5000:
if P[-1]>10 and P[-1] < 0.6*max(P):
print 'failure reached'
yade.
O.pause()
triax.stressMask = 0
triax.goal2=rate
triax.goal1=-rate
triax.goal3=rate
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Sam for more information if necessary.