PeriTriaxController Load
Hi I'm having a little problem with the PeriTriaxController and saving and loading of simulations. Maybe one of you can help me.
I provided a MWE below.
My Problems are:
- When I first run the simulation everything works fine, but simulation doesn't stop when the strain -0.4 is reached, so I think the doneHook isn't triggered, but I don't know why
- When I rund the simulation for the second time, there is already the file 'three.yade.gz' containing the information of the first run. The problem here is that the shearing of the sample doesn't start. When looking at the output, it goes to phase 2, but there nothing happens.
Thank you in advance for your help.
Johannes
# encoding: utf-8
from yade import pack, qt, plot
sigmaIso=-25000
Filename = 'three.yade.gz'
savedState = os.path.
if not savedState:
O.periodic=True
O.cell.
compFricDegree = 35
sphere=
psdSizes,
sp=
sp.
sp.
else:
O.load(
O.engines=[
ForceResett
InsertionSo
Interaction
PeriTriaxCo
NewtonInteg
]
O.dt=.5*
def triaxFinished():
print 'Making decision'
if not savedState:
print 'Going to Phase 1'
else:
print 'Going to Phase 2'
def Phase_2():
print 'Phase 2'
O.cell.
triax.goal = (sigmaIso,
triax.
triax.
triax.
triax.
def Phase_1():
print 'Phase 1'
O.save(
print 'Saved'
triax.doneHook = 'Phase_2()'
def Stop():
O.pause()
def UnbalancedForce():
print unbalancedForce(), triax.strain[2]
O.engines += [PyRunner(
O.run()
O.SaveTmp()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johannes Welsch
- Solved:
- Last query:
- Last reply: