trevised hydrostatic pressure distribution function to use prescribed value in the top cells - 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 93a1500f63ea94b5efe51ce8d98af4ae86225081
 (DIR) parent 882ebea81aa2284860563bd8a5dadb87c0ed1bfc
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Thu, 27 Mar 2014 13:27:26 +0100
       
       revised hydrostatic pressure distribution function to use prescribed value in the top cells
       
       Diffstat:
         M python/sphere.py                    |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -2296,10 +2296,10 @@ class sim:
        
                if (hydrostatic == True):
                    dz = self.L[2]/self.num[2]
       -            for iz in range(self.num[2]):
       +            for iz in range(self.num[2]-1):
                        z = dz*iz + 0.5*dz
                        depth = self.L[2] - z
       -                self.p_f[:,:,iz] = p + depth * rho * -self.g[2]
       +                self.p_f[:,:,iz] = p + (depth-dz) * rho * -self.g[2]
        
                self.v_f = numpy.zeros((self.num[0], self.num[1], self.num[2], self.nd),
                        dtype=numpy.float64)