Run several unloading tests together
I want to do a series of biaxial unloading tests.
Before the unloading, I do a biaxial loading test, and save the model in many ".bz2" files when the vertical strain reaches different values. The obtained files are: save0.00010yade
Now, I want to unload the sample from these values of vertical strain, until the vertical stress reduces to the confining pressure. Because there are too many .bz2 files, I hope the code could call these files one by one, and after one unloading test is completed, another test would be done automatically.
I first write a code that can do an unloading test once at a time, and it works. Then, I put the code in a “for” loop. However, it seems that the “O.engines” does not start when the unloading test is to be done, because no information about the running time is shown in the terminal window and no file is outputted (I introduce two PyRunners into O.engines).
Could you help me solve this problem?
#######
# unicode: UTF-8
# For 2D biaxial simulation
# 19/09/2022
#######
### Defining parameters and variables ###
#######
#Material constants
FrictionAngle = 35.000000000000000
Damp = 0.5
Porosity = 0.0
#Confining variables
ConfPress = -1.0e5
#Loading control
LoadRate = 0.01
#time calculation
startT = O.time
endT = O.time
timeSpent = endT - startT
#######
#import necessary packages
from yade import pack,plot,os,timing
#record of e22
recorde = ['0.00010'
for iii in recorde:
#folders for post-processing
try:
except:
pass
#restart
O.load(
for k in O.bodies:
triax1=
#O.run(100,1)
def Output():
#particle info
g = open('.
g.write('ID x y radius mass fx fy disx disy rotz velx vely omega\n')
for b in O.bodies:
if isinstance(
g.close()
Output()
###
#####Defining triaxil engines####
###
triax1=
thickness = 0.001,
max_vel = 0.1,
stressMask = 5,
goal1 = ConfPress,
goal2 = LoadRate,
#goal3 = ConfPress,
)
ini_e22 = -triax1.strain[1]
ini_e22i = -triax1.strain[1]
kkk = 1
# print('
O.usesTimeS
# O.dt=2e-6
newton=
setContactF
O.trackEner
O.timingEna
###engine
O.engines=[
),
triax1,
newton,
# VTKRecorder(
# TriaxialStateRe
]
print(
# Simulation stop conditions defination
def endCheck():
if e22<0.0 or triax1.
endT = O.time
# collect history of data
def addPlotData():
global ini_e22i,ini_e22
global kkk
if kkk:
ini_e22 = -triax1.strain[1]
kkk = 0
if abs(ini_e22i) - abs(e22) < 0.00025:
test = abs(ini_e22) - abs(e22) > 0.000001
elif abs(ini_e22i) - abs(e22) < 0.08:
test = abs(ini_e22) - abs(e22) > 0.0001
if test:
unb = unbalancedForce()
mStress = -(triax1.
area = (O.bodies[
)
ini_e22 = e22
if iii==0:
O.run(); #O.wait()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply:
This question was reopened
- by Yu Tian