Direct shear test simulation
Hello all,
I am trying to set-up a direct shear test box simulation to retrieve the soil resistance parameters of a soil. I am using the PeriTriaxContro
Cheers,
Mario
#coding: utf-8
#Direct shear test simulation
#
from yade import pack,qt,plot
#set periodic boundaries
O.periodic=True
#
O.cell.
#O.cell.
sp=pack.
radius=5e-3
num=sp.
O.bodies.
O.engines=[
#reset forces
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
#In python the format is 0b110, can be converted to decimal format.
PeriTriaxContr
NewtonIntegrat
# record data for plotting every 100 steps; addData function is defined below
# saves data to a txt file, calls the function 'savenormaltxt', defined below
]
phase=0
def shear():
global phase
if phase==0:
print 'Here we are: stress'
print 'Now shearing.'
#O.cell.
#dst.
dst.goal=
for b in O.bodies:
phase+=1
#elif phase==1:
#print 'Here we are: stress'
#phase+=1
##print 'Done, pausing now.'
##O.pause()
def endSim():
print 'End of simulation'
print 'stress',dst.stress
print 'strain',dst.strain
O.pause()
O.dt=PWaveTimeS
qt.View()
#uses the function addData to assign labels and plot the values of the stresses of the stress tensor.
def addPlotData():
plot.
def savenormaltxt():
plot.
#defines the values of x and y for every plot
plot.plots=
#shows the plot
plot.plot()
O.run()
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: