Some Problems about Direct Shear Test
Hello, everyone. I'm trying to simulate the direct shear process with the following program[1]. Before running the script, I generated particles in another script. But when I run the following script, the system can't find the particles. But when I input the commands of the script sentence by sentence in the Yade program (before importing the particles), I can import the particles normally. Is there someone can tell me where the problem is?
[1]the script:
from yade import ymport, utils, plot
from yade import ymport, utils, plot
from yade import pack,export
from yade import polyhedra_utils
from yade import geom,utils,plot
from yade import qt,ymport,timing
from yade import *
################## parameters definition
DAMPING=0.5
dtCOEFF=0.5
normalSTRESS=5e5
normalVEL=
shearVEL=
intR=1.263 #1.263 for X1Y1Z1_5k
DENS=3000
YOUNG=50e9
FRICT=18
ALPHA=0.3
TENS=45e5
COH=45e6
iterMAX=400000
#######
### material definition
sphereMat = FrictMat()
sphereMat.
sphereMat.
sphereMat.
wallMat = FrictMat()
wallMat.young=YOUNG
wallMat.
wallMat.
O.materials.
O.materials.
## copy spheres from the packing into the scene
O.bodies.
## preprocessing to get dimensions
dim=utils.
xinf=dim[0][0]
xsup=dim[1][0]
X=xsup-xinf
yinf=dim[0][1]
ysup=dim[1][1]
Y=ysup-yinf
zinf=dim[0][2]
zsup=dim[1][2]
Z=zsup-zinf
## initial surface
S0=X*Z
## spheres factory
R=0
Rmax=0
numSpheres=0
for o in O.bodies:
if isinstance(
o.shape.
numSpheres+=1
R+=o.shape.radius
if o.shape.
Rmax=
Rmean=
#######
thickness=Y/100
oversizeFactor=1.05
O.bodies.
butee=O.bodies[-1]
### add top box
O.bodies.
O.bodies.
O.bodies.
### add bottom box
O.bodies.
piston1=
O.bodies.
piston2=
O.bodies.
O.bodies.
### loading platens,it is a xz plate?
O.bodies.
bottomPlate=
O.bodies.
topPlate=
#######
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
TranslationEng
PyRunner(
NewtonIntegrat
PyRunner(
]
#######
shearing=False
sigmaN=0
tau=0
Fs1=0
Fs2=0
Xdispl=0
px0=0
Ydispl=0
py0=topPlate.
prevTranslation=0
n=0
def servoController():
global px0, py0, sigmaN, n, Fn1, Fn2, shearing, butee, piston1, piston2
Fn1=abs(
Fn2=abs(
sigmaN=
if shearing==False:
if yTranslation.
yTranslation
if sigmaN>
yTranslation
if shearing==False and abs((normalSTRE
yTranslation.
n+=1
if n>1000 and abs((sigmaN-
print 'stress on joint plane = ', utils.forcesOnP
### add engine and initialisation
O.engines=
px0=piston1.
py0=topPlate.
shearing=True
print 'shearing! || iteration=', O.iter
if shearing==True:
#yTranslation.
yTranslation.
if O.engines[
O.engines[
def dataCollector():
global Xdispl, Ydispl, tau, Fs1, Fs2
if shearing:
Fs1=abs(
Fs2=abs(
Xdispl=
tau=Fs1/
Ydispl=
numberOfCohesi
for i in O.interactions:
if i.phys.isCohesive:
numberOfCohe
yade.plot.
plot.saveGnupl
# defines window plot
plot.plots=
################# graphical intervace
from yade import qt
qt.Controller()
qt.View()
v=qt.Renderer()
v.dispScale=(1,1,1) # displacements are scaled for visualization purpose
################# to manage interaction detection factor during the first timestep
O.step();
################# initializes the interaction detection factor to its default value (new contacts will be created between strictly contacting particles only)
ss2d3dg.
aabb.aabbEnlarg
################# simulation starts here
O.run(iterMAX)
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: