Law2_Dem3DofGeom_CpmPhys_Cpm
Hi
I want to simulate joints, so I established a wll, but "NameError: name 'Law2_Dem3DofGe
". How should I revise?please tell me.
from __future__ import division
from yade import utils,plot,
import time, sys, os, copy
# default parameters or from table
utils.readParam
young=24e9,
poisson=.2,
Fn=9e9,
sigmaT=3.5e6,
frictionAngle=
epsCrackOnset=
crackOpening=1e-6,
intRadius=1.5,
dtSafety=.8,
damping=0.4,
strainRateTens
strainRateComp
setSpeeds=True,
# 1=tension, 2=compression (ANDed; 3=both)
doModes=3,
specimenLength
sphereRadius=3e-3,
# isotropic confinement (should be negative)
isoPrestress=0,
# use the ScGeom variant
scGeom=False
)
from yade.params.table import *
if 'description' in O.tags.keys(): O.tags[
concreteId=
spheres=
O.bodies.
O.bodies.append([
utils.
bb=utils.
negIds,
O.dt=dtSafety*
print 'Timestep',O.dt
mm,mx=[pt[axis] for pt in utils.aabbExtre
coord_25,
area_25,
O.engines=[
ForceResetter(),
InsertionSortC
'is2aabb'
InteractionLoop(
[Ig2_Sphere_
scGeom else
Ig2_Sphere_
Ig2_Facet_
[Ip2_
[Law2_
),
NewtonIntegrat
CpmStateUpdate
UniaxialStrain
PyRunner(
PyRunner(
]
plot.plots=
O.saveTmp(
O.timingEnabled
global mode
mode='tension' if doModes & 1 else 'compression'
def initTest():
global mode
print "init"
if O.iter>0:
O.wait();
O.loadTmp(
print "Reversing plot data"; plot.reverseData()
else: plot.plot(
strainer.
try:
from yade import qt
renderer=
renderer.
except ImportError: pass
print "init done, will now run."
O.step(); # to create initial contacts
# now reset the interaction radius and go ahead
if not scGeom: ss2d3dg.
else: ss2sc.interacti
is2aabb.
O.run()
def stopIfDamaged():
global mode
if O.iter<2 or not plot.data.
sigma,
extremum=
minMaxRatio=0.5 if mode=='tension' else 0.5
if extremum==0: return
# uncomment to get graph for the very first time stopIfDamaged() is called
#eudoxos.
print O.tags[
import sys; sys.stdout.flush()
if abs(sigma[
if mode=='tension' and doModes & 2: # only if compression is enabled
mode=
O.save(
print "Saved /tmp/uniax-
print "Damaged, switching to compression... "; O.pause()
# important! initTest must be launched in a separate thread;
# otherwise O.load would wait for the iteration to finish,
# but it would wait for initTest to return and deadlock would result
import thread; thread.
return
else:
print "Damaged, stopping."
ft,fc=
print 'Strengths fc=%g, ft=%g, |fc/ft|
title=
print 'gnuplot'
print 'Bye.'
#O.pause()
sys.exit(0)
def addPlotData():
yade.plot.
'sigma.
'sigma.
'sigma.
})
plot.plot(
#O.run()
initTest()
utils.waitIfBatch()
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 403175147 for more information if necessary.