tfix range in shear plot, improve fc plots, small corrections to shear2 experiment - 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 6e0ae86edd96ea60957e2e2e8c8c140b45c130fb
 (DIR) parent 47e1a28dd303b7c5f4cf7e2a796e903c4e7d05b7
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Wed, 24 Sep 2014 13:47:26 +0200
       
       fix range in shear plot, improve fc plots, small corrections to shear2 experiment
       
       Diffstat:
         M python/shear-results-fc.py          |       5 +++--
         M python/shear-results.py             |      10 +++++-----
         M python/shear2.py                    |      11 ++++++-----
       
       3 files changed, 14 insertions(+), 12 deletions(-)
       ---
 (DIR) diff --git a/python/shear-results-fc.py b/python/shear-results-fc.py
       t@@ -15,8 +15,9 @@ for i in numpy.arange(210,300):
            sim.readstep(i, verbose=False)
            #sim.forcechains(lc = 3.0e1, uc=1.0e2)
            sim.forcechains(lc = 30.0, uc=1.0e2)
       -    subprocess.call('mv ' + sid + '-fc.' + imgformat \
       +    subprocess.call('mv shear-sigma0=20000-0-hw-fc.' + imgformat \
                    + ' ' + sid + '-fc/%05d.png' % (d), shell=True)
            d += 1
        
       -subprocess.call('mv ' + sid + '-fc && sh ./make_video.sh', shell=True)
       +subprocess.call('cd ' + sid + '-fc && sh ./make_video.sh', shell=True)
       +
 (DIR) diff --git a/python/shear-results.py b/python/shear-results.py
       t@@ -34,8 +34,8 @@ sid = 'shear-sigma0=' + sys.argv[1] + '-hw'
        sim = sphere.sim(sid)
        sim.readlast(verbose=False)
        sim.visualize('shear')
       -#shear_strain[0] = sim.shear_strain
       -shear_strain[0] = numpy.arange(sim.status()+1)
       +shear_strain[0] = sim.shear_strain
       +#shear_strain[0] = numpy.arange(sim.status()+1)
        friction[0] = sim.tau/sim.sigma_eff
        dilation[0] = sim.dilation
        
       t@@ -56,8 +56,8 @@ for c in numpy.arange(1,len(cvals)+1):
        
                sim.readlast(verbose=False)
                sim.visualize('shear')
       -        #shear_strain[c] = sim.shear_strain
       -        shear_strain[c] = numpy.arange(sim.status()+1)
       +        shear_strain[c] = sim.shear_strain
       +        #shear_strain[c] = numpy.arange(sim.status()+1)
                friction[c] = sim.tau/sim.sigma_eff
                dilation[c] = sim.dilation
        
       t@@ -118,7 +118,7 @@ ax1.set_ylabel('Shear friction $\\tau/\\sigma\'$ [-]')
        ax2.set_ylabel('Dilation $\\Delta h/(2r)$ [-]')
        ax3.set_ylabel('Fluid pressure $p_\\text{f}$ [kPa]')
        
       -ax1.set_xlim([200,300])
       +#ax1.set_xlim([200,300])
        
        plt.setp(ax1.get_xticklabels(), visible=False)
        plt.setp(ax2.get_xticklabels(), visible=False)
 (DIR) diff --git a/python/shear2.py b/python/shear2.py
       t@@ -5,20 +5,21 @@ fluid = True
        
        sim = sphere.sim('cons2-20kPa')
        sim.readlast()
       -sim.id('shear2-20kPa-c=1.0')
       +c = 1.0
       +sim.id('shear2-20kPa-c=' + str(c))
        sim.shear(1.0/20.0)
        
        if fluid:
       -    sim.num[2] *= 2
       -    sim.L[2] *= 2.0
       +    #sim.num[2] *= 2
       +    #sim.L[2] *= 2.0
            sim.initFluid(mu=1.787e-6, p=600.0e3, hydrostatic=True)
            sim.setFluidBottomNoFlow()
            sim.setFluidTopFixedPressure()
            sim.setDEMstepsPerCFDstep(100)
            sim.setMaxIterations(2e5)
       -    sim.c_grad_p[0] = 1.0
       +    sim.c_grad_p[0] = c
        
        sim.checkerboardColors()
        sim.initTemporal(20.0, epsilon=0.07)
       -sim.run()
       +sim.run(device=1)
        sim.writeVTKall()