← Back to team overview

yade-users team mailing list archive

[Question #695886]: no file output by running yade -n *.py

 

New question #695886 on Yade:
https://answers.launchpad.net/yade/+question/695886

Dear all,
I run the follow code '02.py' by using the command 'yade -n 02.py' or 'yade -x 02.py', but there is no file output 'bbb.txt.bz2'.
In contrast, if I run 'yade 02.py' and go into the graphical interface, I click the start bottom and run the simulation, and then I have the file output  'bbb.txt.bz2'.
Is there any way to generate file output by 'yade -n' or 'yade -x' ? Or is there problem in my 02.py file ?
Many thanks and best regards.
Man Yick

02.py reads as"
# gravity deposition in box
from yade import pack, plot
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.2)
sp.toSimulation()
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_CundallStrack()]
	),
	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
	PyRunner(command='checkUnbalanced()',realPeriod=2),
	PyRunner(command='addPlotData()',iterPeriod=100)
]
O.dt=.5*PWaveTimeStep()
O.trackEnergy=True
def checkUnbalanced():
	if unbalancedForce()<.05:
		O.pause()
		plot.saveDataTxt('bbb.txt.bz2')
def addPlotData():
	plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)
plot.plots={'i':('unbalanced',None,O.energy.keys)}
plot.plot()
O.saveTmp()
O.run
waitIfBatch()


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