← Back to team overview

yade-users team mailing list archive

[Question #691874]: batch-table

 

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

Dear all,

When I practice using the batch-table in  bouncing sphere script, the data file is empty. The modified script is as follows:
#
readParamsFromTable(damping=.2)     
from yade.params import table 

from yade import plot

O.bodies.append([
	# fixed: particle's position in space will not change (support)
	sphere(center=(0,0,0),radius=.5,fixed=True,color=(0,0,1)),
	# this particles is free, subject to dynamics
	sphere((0,0,2),.5,color=(0,0,1))
])

sphere1=O.bodies[-1]
z=sphere1.state.pos[2]-sphere1.state.refPos[2]

O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom()],        # collision geometry
		[Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
		[Law2_ScGeom_FrictPhys_CundallStrack()]   # contact law -- apply forces
	),
	# Apply gravity force to particles. damping: numerical dissipation of energy.
	NewtonIntegrator(gravity=(0,0,-9.81),damping=table.damping),
	PyRunner(command='checkUnbalanced()',realPeriod=2),
	PyRunner(command='addPlotData()',iterPeriod=1000)
]

O.dt=.5e-4*PWaveTimeStep()

O.trackEnergy=True

def checkUnbalanced():
	if unbalancedForce()<.05:
		O.pause()
		plot.saveDataTxt(O.tags['d.id']+'.data.bz2')
		
def addPlotData():
                plot.addData(i=O.iter,z=sphere1.state.pos[2]-sphere1.state.refPos[2],**O.energy)
                                
plot.plots={'i':('z',None,O.energy.keys)}

plot.plot()

O.run()              
waitIfBatch()

O.saveTmp()
#

After running the script, the error information is as follows, 
#
Using python version: 3.8.2 (default, Apr 27 2020, 15:53:34) 
[GCC 9.3.0]
Will run simulation(s) ['1batch.py'] using `/usr/bin/yade', nice value 10, using max 1 cores.
Will use table `params.txt', with available lines 2, 3, 4.
Will use lines  2 (damping=.6), 3 (damping=.4), 4 (damping=.2).
Master process pid 63773
Job summary:
   #0 (damping=.6): YADE_BATCH=params.txt:2 DISPLAY=  /usr/bin/yade [threadspec] --nice=10 -x 1batch.py> 1batch.py.damping=.6.log 2>&1
   #1 (damping=.4): YADE_BATCH=params.txt:3 DISPLAY=  /usr/bin/yade [threadspec] --nice=10 -x 1batch.py> 1batch.py.damping=.4.log 2>&1
   #2 (damping=.2): YADE_BATCH=params.txt:4 DISPLAY=  /usr/bin/yade [threadspec] --nice=10 -x 1batch.py> 1batch.py.damping=.2.log 2>&1
http://localhost:9080 shows batch summary
#0 (damping=.6) started on Tue Jul 14 17:14:35 2020
#0 (damping=.6) FAILED  (exit status 34304), duration 00:00:13, log 1batch.py.damping=.6.log
#1 (damping=.4) started on Tue Jul 14 17:14:48 2020
#1 (damping=.4) FAILED  (exit status 34304), duration 00:00:15, log 1batch.py.damping=.4.log
#2 (damping=.2) started on Tue Jul 14 17:15:04 2020
#2 (damping=.2) FAILED  (exit status 34304), duration 00:00:27, log 1batch.py.damping=.2.log
All jobs finished, total time  00:00:57
Log files: 1batch.py.damping=.6.log 1batch.py.damping=.4.log 1batch.py.damping=.2.log
Bye.
#

Could you tell me where is wrong in the script and how to deal with it?
Thanks a lot!


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