tParticles spinning in pos. y direction are now marked with a black border - 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 0ae0f4649f84b60f1d8f195594629b346ca4f7af
 (DIR) parent ecfc70812628f9ac56ab817087ad15778ac88c88
 (HTM) Author: Anders Damsgaard <adc@geo.au.dk>
       Date:   Tue, 12 Mar 2013 22:07:22 +0100
       
       Particles spinning in pos. y direction are now marked with a black border
       
       Diffstat:
         M gnuplot/scripts/plotts.gp           |      11 +++++++++--
         M python/sphere.py                    |      23 +++++++++++++++++++++++
       
       2 files changed, 32 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/gnuplot/scripts/plotts.gp b/gnuplot/scripts/plotts.gp
       t@@ -1,6 +1,6 @@
        #!/usr/bin/env gnuplot
        # Call this script with sid and gamma variables, e.g.
       -#  $ gnuplot -e "sid='testrun'; gamma='4.3" plotts.gp
       +#  $ gnuplot -e "sid='testrun'; gamma='4.3'; xmin='0.0'; xmax='1.0'; ymin='0.0'; ymax='1.0'" plotts.gp
        
        set title sid.", $\\gamma$ = ".gamma
        
       t@@ -13,7 +13,14 @@ set xlabel "$\\x^1$"
        set ylabel "$\\x^3$"
        set cblabel "Pressure [Pa]"
        
       +set xrange [xmin:xmax]
       +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-arrows.txt" using 1:2:3:4 with vectors head filled lt 2 lc rgb "black" t "Rotation", "../data/".sid."-ts-x1x3-slips.txt" using 1:2:3:4 with vectors head filled lt 2 t 'Slip'
       +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-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@@ -1392,6 +1392,10 @@ class Spherebin:
                daylist = []
                dvxlist = []
                dvylist = []
       +        # Black circle at periphery of particles with angvel[:,1] > 0.0
       +        cxlist = []
       +        cylist = []
       +        crlist = []
        
                # Loop over all particles, find intersections
                for i in range(self.np):
       t@@ -1413,6 +1417,12 @@ class Spherebin:
                            rmax = r_circ
                        rlist.append(r_circ)
        
       +                # 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])
       +                    crlist.append(r_circ)
       +
                        # Store pressure
                        pval = self.p[i]
                        if (cbmax != None):
       t@@ -1458,6 +1468,19 @@ class Spherebin:
                    if fh is not None:
                        fh.close()
        
       +        # Save circle data for articles spinning with pos. y
       +        filename = '../gnuplot/data/' + self.sid + '-ts-x1x3-circ.txt'
       +        fh = None
       +        try :
       +            fh = open(filename, 'w')
       +
       +            for (x, y, r) in zip(cxlist, cylist, crlist):
       +                fh.write("{}\t{}\t{}\t{}\n".format(x, y, r))
       +        
       +        finally :
       +            if fh is not None:
       +                fh.close()
       +
                # Save angular velocity data. The arrow lengths are normalized to max. radius
                #   Output format: x, y, deltax, deltay
                #   gnuplot> plot '-' using 1:2:3:4 with vectors head filled lt 2