when/how use O.run()
Dear all,
I have a problem in understanding the use of ''O.run()" in my script. this problem is not a bug or an error. it is about, when and how does O.run() work?????
more precisely, what is difference between using O.run(n,True) in the middle, or befor timing.stats() or at the end of the script??
does it loop over the scrip for n iterations (O.run(n,True)) and then continuing the code? or the script runs step by step but O.run() only executes for n iterations?????
for being more precise, I need some explanation about (***[1,2,3,4]) in below script (oedometer.py):
from yade import pack
num_spheres=1000# number of spheres
young=1e6
compFricDegree = 3 # initial contact friction during the confining phase
finalFricDegree = 30 # contact friction during the deviatoric loading
mn,mx=Vector3(
O.materials.
O.materials.
walls=aabbWalls
wallIds=
sp=pack.
sp.makeCloud(
sp.toSimulation
triax=TriaxialS
maxMultiplier=
finalMaxMultip
thickness = 0,
stressMask = 7,
max_vel = 0.005,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
FlowEngine(
GlobalStiffnes
triax,
newton
]
triax.goal1=
while 1:
O.run(1000, True) #######
unb=unbalance
if unb<0.001 and abs(-10000-
break
setContactFrict
## ______________ Oedometer section _________________
#A. Check bulk modulus of the dry material from load/unload cycles
triax.stressMask=2
triax.goal1=
triax.internalC
triax.wall_
#load
triax.goal2=-11000; O.run(2000,1) #######
#unload
triax.goal2=-10000; O.run(2000,1)
#load
triax.goal2=-11000; O.run(2000,1)
e22=triax.strain[1]
#unload
triax.goal2=-10000; O.run(2000,1)
e22=e22-
modulus = 1000./abs(e22)
#B. Activate flow engine and set boundary conditions in order to get permeability
flow.dead=0
flow.defToleran
flow.meshUpdate
flow.useSolver=3
flow.permeabili
flow.viscosity=10
flow.bndCondIsP
flow.bndCondVal
flow.boundaryUs
O.dt=0.1e-3
O.dynDt=False
O.run(1,1) #######
Qin = flow.getBoundar
Qout = flow.getBoundar
permeability = abs(Qin)/1.e-4 #size is one, we compute K=V/∇H
print "Qin=",Qin," Qout=",Qout," permeability=
#C. now the oedometer test, drained at the top, impermeable at the bottom plate
flow.bndCondIsP
flow.bndCondVal
newton.damping=0
#we want the theoretical value from Terzaghi's solution
#keep in mind that we are not in an homogeneous material and the small strain
#assumption is not verified => we don't expect perfect match
#there can be also an overshoot of pressure in the very beginning due to dynamic effects
Cv=permeability
zeroTime=O.time
zeroe22 = - triax.strain[1]
dryFraction=0.05 #the top layer is affected by drainage on a certain depth, we account for it here
drye22 = 1000/modulus*
wetHeight=
def consolidation(Tv): #see your soil mechanics handbook...
U=1
for k in range(50):
M=pi/2*(2*k+1)
U=U-2/
return U
triax.goal2=-11000
from yade import plot
## a function saving variables
def history():
plot.
#plot.
O.engines=
##make nice animations:
#O.engines=
from yade import plot
plot.plots=
plot.plot()
O.saveTmp()
O.timingEnabled=1
from yade import timing
print "starting oedometer simulation"
O.run(200,1) #######
timing.stats()
any help will be appreciated.
thanks
Azim
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: