Export Deviatoric loading phase data
Hi, everybody!
I am a Yade newbie and now I want to export the data from each step of the deviatoric loading phase. Here is my code. What should I do? Thank you for your help.
from yade import pack,plot,qt
import math
#######
### DEFINING VARIABLES AND MATERIALS ###
#######
# The following 5 lines will be used later for batch execution
nRead=readParam
)
from yade.params import table
num_spheres=
key=table.key
targetPorosity = 0.43 #the porosity we want for the packing
finalFricDegree = 30 # contact friction during the deviatoric loading
rate=-0.02 # loading rate (strain rate)
damp=0.2 # damping coefficient
stabilityThresh
young=5e6 # contact stiffness
mn,mx=Vector3(
## create materials for spheres and plates
O.materials.
O.materials.
wallIds=
psdSizes,psdCumm =[0.05,
sp = pack.SpherePack()
sp.makeCloud(
#Add material
sp.toSimulation
triax=TriaxialS
## TriaxialStressC
## this control of boundary conditions was used for instance in http://
thickness = 0,
## switch stress/strain control using a bitmask. What is a bitmask, huh?!
## Say x=1 if stess is controlled on x, else x=0. Same for for y and z, which are 1 or 0.
## Then an integer uniquely defining the combination of all these tests is: mask = x*1 + y*2 + z*4
## to put it differently, the mask is the integer whose binary representation is xyz, i.e.
## "100" (1) means "x", "110" (3) means "x and y", "111" (7) means "x and y and z", etc.
stressMask = 7,
)
newton=
O.engines=[
),
triax,
newton,
# VTKRecorder(
]
def addPlotData():
plot.
Gl1_Sphere.
if nRead==0: yade.qt.
triax.goal1=
while 1:
O.run(1000, True)
##the global unbalanced force on dynamic bodies, thus excluding boundaries, which are not at equilibrium
unb=unbalance
print 'unbalanced force:',unb,' mean stress: ',triax.meanStress
if unb<stabilityTh
break
print "### Isotropic state saved ###"
#O.run(1000,True)
#O.save(
triax.internalC
## Change contact friction (remember that decreasing it would generate instantaneous instabilities)
setContactFrict
##set stress control on y and z, we will impose strain rate on x
triax.stressMask = 5
##now goal2 is the target strain rate
triax.goal1=-10000
## we define the lateral stresses during the test, here the same 10kPa as for the initial confinement.
triax.goal2=rate
triax.goal3=-10000
newton.damping=0.1
#O.run(100,True)
O.saveTmp()
##Save temporary state in live memory. This state will be reloaded from the interface with the "reload" button.
plot.plots=
plot.plot()
O.run(1000,True)
for b in O.bodies:
print "Body",b.id
print " displ",
print " vel ",b.state.vel
for i in b.intrs():
print " Intr with",i.id2 if i.id1 == b.id else i.id1
print " cp",i.geom.
print " f ",i.phys.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Robert Caulk
- Solved:
- Last query:
- Last reply: