Facing problem with "target porosity part" in triaxial test script
Hi friends,
I have been trying to work on the triaxial test using the example script in (1). My script is as follows:
#triaxial test on dry sand
import matplotlib
matplotlib.
from yade import pack,plot,qt
import math
num_spheres=10000 # number of spheres
young=3e10
targetPorosity= 0.45
compFricDegree = 35 # initial contact friction during the confining phase
finalFricDegree = 42 # contact friction during the deviatoric loading
mn,mx=Vector3(
O.materials.
O.materials.
walls=aabbWalls
wallIds=
pred=pack.
sp=pack.
O.bodies.append(sp)
#SpherePack.
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
TriaxialStress
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask =7,
max_vel = 0.025,
internalCompac
),GlobalStiffne
newton
]
O.dt=0.
#O.dt=0.
#strain_rate=-0.05
triax.goal1=
#Deviatoric loading
##We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant
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 = 6
##now goal1 is the target strain rate
triax.goal1=-0.001
## we define the lateral stresses during the test, here the same 10kPa as for the initial confinement.
triax.goal2=-5e5
triax.goal3=-5e5
##Save temporary state in live memory. This state will be reloaded from the interface with the "reload" button.
O.saveTmp()
def addPlotData():
plot.
s11=
s22=
s33=
i=O.iter)
plot.plots=
plot.plots=
plot.plot()
-------
It appears to work fine (at least gives results) until I try to introduce a target porosity factor, again using the master example script in (1). When I add the following part into my script it runs with an repetitive error saying: "Error in line 1, áddplotdata not defined"
#Porosity
import sys #this is only for the flush() below
while triax.porosity>
## we decrease friction value and apply it to all the bodies and contacts
compFricDegree = 0.95*compFricDegree
setContactFric
print "\r Friction: ",compFricDegree," porosity:
sys.stdout.flush()
## while we run steps, triax will tend to grow particles as the packing
## keeps shrinking as a consequence of decreasing friction. Consequently
## porosity will decrease
O.run(500,1)
Any ideas what could possibly be going wrong from my side?
(1)https:/
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 Swapnil for more information if necessary.