tshear-results-fc.py - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tshear-results-fc.py (670B)
---
1 #!/usr/bin/env python
2 import sphere
3 import numpy
4 import subprocess
5
6 sid = 'shear-sigma0=20000.0-hw'
7 imgformat = 'png'
8 sim = sphere.sim(sid, fluid=False)
9 subprocess.call('mkdir -p ' + sid + '-fc', shell=True)
10
11 d = 0
12 for i in numpy.arange(210,300):
13 #for i in numpy.arange(240,260):
14 print("File: %d, output: %s-fc/%05d.png" % (i, sid, d))
15 sim.readstep(i, verbose=False)
16 #sim.forcechains(lc = 3.0e1, uc=1.0e2)
17 sim.forcechains(lc = 30.0, uc=1.0e2)
18 subprocess.call('mv shear-sigma0=20000-0-hw-fc.' + imgformat \
19 + ' ' + sid + '-fc/%05d.png' % (d), shell=True)
20 d += 1
21
22 subprocess.call('cd ' + sid + '-fc && sh ./make_video.sh', shell=True)
23