← Back to team overview

yade-users team mailing list archive

Re: [Question #678668]: O.load Error

 

Question #678668 on Yade changed:
https://answers.launchpad.net/yade/+question/678668

jamespaul posted a new comment:
Thanks Jan so much.Your tutorial is very detailed.

> Are you aware that now you have 2 PeriTriaxController simultaneously
in the simulation?

 What is the effect of 2 PeriTriaxController?

>I changed my second script. I define triaxFinished again.Is there only
one PeriTriaxController?

#!/usr/bin/python 
from yade import pack, qt, plot

O.load('four.yade.gz')
O.run()
O.dt=1e-13

O.engines += [PyRunner(command='addPlotData2()',iterPeriod=100000)];

def triaxFinished():
	O.cell.trsf=Matrix3.Identity
	triax.goal=(0,0,-1000000)
	triax.stressMask=4
	triax.maxStrainRate=(0,0,.01)
	triax.maxUnbalanced=1e-8
	triax.doneHook='functionToRunWhenFinished()'

def functionToRunWhenFinished():
   	print 'Finished'
   	O.pause()

def addPlotData2():
	plot.addData(unbalanced=unbalancedForce(),i=O.iter,
		sxx=-triax.stress[0],syy=-triax.stress[1],szz=-triax.stress[2],
		exx=-triax.strain[0],eyy=-triax.strain[1],ezz=-triax.strain[2],
		q=-triax.stress[2]+0.5*(triax.stress[0]+triax.stress[1]),
		p=-(triax.stress[0]+triax.stress[1]+triax.stress[2])/3,
	)

plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),' i':('ezz'),' p ':('q'),}
plot.plot()

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.