tadded circle marks for particles in ts with pos rotation around y - 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
---
(DIR) commit 84e2dae168abdce683e72a95ac54409ea55b3214
(DIR) parent afb3b8c648cb2ea08955d5a16a51691d2c0a2663
(HTM) Author: Anders Damsgaard <adc@geo.au.dk>
Date: Wed, 13 Mar 2013 05:45:08 +0100
added circle marks for particles in ts with pos rotation around y
Diffstat:
M gnuplot/scripts/plotts.gp | 2 +-
M python/sphere.py | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
---
(DIR) diff --git a/gnuplot/scripts/plotts.gp b/gnuplot/scripts/plotts.gp
t@@ -19,7 +19,7 @@ set yrange [ymin:ymax]
set size ratio -1
plot "../data/".sid."-ts-x1x3.txt" with circles palette fs transparent solid 0.4 noborder t "Particle",\
- "../data/".sid."-ts-x1x3-circ.txt" with circles lw 1 rgb "black" t "Particle",\
+ "../data/".sid."-ts-x1x3-circ.txt" with circles lt 1 lc rgb "black" notitle,\
"../data/".sid."-ts-x1x3-arrows.txt" using 1:2:3:4 with vectors head filled lt 1 lc rgb "black" t "Rotation",\
"../data/".sid."-ts-x1x3-velarrows.txt" using 1:2:3:4 with vectors head filled lt 1 lc rgb "white" t "Translation",\
"../data/".sid."-ts-x1x3-slips.txt" using 1:2:3:4 with vectors head filled lt 1 lc rgb "green" t "Slip"
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -296,16 +296,12 @@ class Spherebin:
for i in range(self.nb0):
self.bonds[i,0] = numpy.fromfile(fh, dtype=numpy.uint32, count=1)
self.bonds[i,1] = numpy.fromfile(fh, dtype=numpy.uint32, count=1)
- #self.bonds_delta_n = numpy.zeros(self.nb0, dtype=numpy.float64)
- #self.bonds_delta_t = numpy.zeros((self.nb0, seld.nd), dtype=numpy.float64)
- #self.bonds_omega_n = numpy.zeros(self.nb0, dtype=numpy.float64)
- #self.bonds_omega_t = numpy.zeros((self.nb0, seld.nd), dtype=numpy.float64)
self.bonds_delta_n = numpy.fromfile(fh, dtype=numpy.float64, count=self.nb0)
self.bonds_delta_t = numpy.fromfile(fh, dtype=numpy.float64, count=self.nb0*self.nd).reshape(self.nb0*self.nd)
self.bonds_omega_n = numpy.fromfile(fh, dtype=numpy.float64, count=self.nb0)
self.bonds_omega_t = numpy.fromfile(fh, dtype=numpy.float64, count=self.nb0*self.nd).reshape(self.nb0*self.nd)
else:
- self.nb0 = 0
+ self.nb0 = numpy.zeros(1, dtype=numpy.uint32)
finally:
if fh is not None:
t@@ -1423,7 +1419,7 @@ class Spherebin:
# Store pos. and radius if it is spinning around pos. y
if (self.angvel[i,1] > 0.0):
cxlist.append(self.x[i,0])
- cylist.append(self.x[i,1])
+ cylist.append(self.x[i,2])
crlist.append(r_circ)
# Store pressure
t@@ -1478,7 +1474,7 @@ class Spherebin:
fh = open(filename, 'w')
for (x, y, r) in zip(cxlist, cylist, crlist):
- fh.write("{}\t{}\t{}\t{}\n".format(x, y, r))
+ fh.write("{}\t{}\t{}\n".format(x, y, r))
finally :
if fh is not None: