Stop conditions failed
hi brothers,
i tried imposed a stop condition that is K_i -K_(i+1)<1e-5 for example, and i need obtain this K_i and K_(i+1), but with my scrypt i can't to get k_i calculated in def of my PyRunner. i can't to define ki variable as global and then i can't read this variable in parar() PyRunner. this is scrypt
from yade import geom, utils, export, pack
global rmean, D, h, load, Sd, mu, Pi, rhoh, ki
rmean=0.003
D=rmean*38.
h=rmean*60.
load=5e-4
Sd=0.17
mu=0.001
Pi=1/6.
g=9.81
rhoh=1000
R=D/2.
H=2.*h
mn,mx=Vector3(
young=1e6
compFricDegree = 3 #ojo con este parametro
finalFricDegree = 30
O.materials.
O.materials.
walls=aabbWalls
wallIds=
cuadr=pack.
spheres=
spheres.
newton=
O.bodies[
def parar():
carga=
if O.bodies[
else:
if carga>5e-4:
O.
O.pause()
flow.dead=0
flow.
flow.
flow.
flow.
flow.
flow.
flow.
O.run()
def flujest():
if flow.getBoundar
else: Err=(flow.
if abs(Err)<0.1:
Qout=
Qin=
dh=
k1=
k2=
n=
print "Qin=",Qin," k1=",k1 ,"k2=",k2 ," Porosity=",n
def kant():
Qin=
dh=O.
if Qin==0: ki=1000
else: ki=mu*Qin*
#globals(
def final():
Qin=
dh=O.
kf=mu*
if abs(kf-ki)<1e-5: O.pause()
O.engines=[
ForceResetter(),
InsertionSortCo
InteractionLoop(
[Ig2_Sphere_
[Ip2_FrictMat_
[Law2_ScGeom_
),
FlowEngine(dead=1, label="flow"),
GlobalStiffness
PyRunner(
newton,
PyRunner(
PyRunner(
PyRunner(
]
O.run()
thanks
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: