tinitialize grid - sphere - GPU-based 3D discrete element method algorithm with… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit b973449d963504e65e168bbb3190043e2a81bf40 | |
parent 50488b013525b02bbf8f5d13ea682ae3a9746028 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 1 Sep 2014 11:27:43 +0200 | |
initialize grid | |
Diffstat: | |
M python/capillary-cohesion2.py | 4 ++++ | |
1 file changed, 4 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/python/capillary-cohesion2.py b/python/capillary-cohesion2.py | |
t@@ -56,6 +56,7 @@ Ly = dy*ny | |
Lz = dz*nz | |
sim = sphere.sim('cap2-cohesion=' + str(cohesion), nw=0) | |
+sim.num = numpy.array([Lx, Ly, Lz]) | |
for z in range(nz): | |
for y in range(ny): | |
t@@ -71,6 +72,9 @@ for z in range(nz): | |
cube.x[i,2] + z*dz ] | |
sim.addParticle(pos, radius=cube.radius[i], color=grid[z,x]) | |
+cellsize_min = 2.1 * numpy.amax(self.radius) | |
+sim.defineWorldBoundaries([Lx, Ly, Lz], dx = cellsize_min) | |
+sim.zeroKinematics() | |
sim.checkerboardColors() | |
sim.defaultParams(capillaryCohesion=cohesion) | |
sim.k_n[0] = 1.0e6 |