tadded dampening - 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 3541524c4cd9b0c3c474232ca6bb9e469e5b5546
(DIR) parent d9bcb826a7b9d4cbf74c8b0afc00bcd89829e23f
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Thu, 19 Jun 2014 14:58:30 +0200
added dampening
Diffstat:
M python/shortening.py | 62 +++++++++++++++++++++----------
1 file changed, 43 insertions(+), 19 deletions(-)
---
(DIR) diff --git a/python/shortening.py b/python/shortening.py
t@@ -8,25 +8,25 @@ cube.adjustUpperWall(z_adjust=1.0)
# Fill out grid with cubic packages
grid = numpy.array((
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,13],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,11,11,11,11,11],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10,10,10,10,10,10,10],
- [9, 9, 9, 9, 9, 9, 9,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+sim.mu_s[0] = 0.0
+sim.mu_d[0] = 0.0
+
sim.periodicBoundariesX()
sim.uniaxialStrainRate(wvel = 0.0)
t@@ -93,12 +102,26 @@ sim.run()
sim.writeVTKall()
+'''
## Shortening
sim = sphere.sim('shortening-relaxation', nw=1)
sim.readlast()
sim.sid = 'shortening'
+sim.cleanup()
sim.initTemporal(current=0.0, total=5.0, file_dt = 0.01)
+# set colors again
+color_ny = 6
+y_max = numpy.max(sim.x[:,1])
+color_dy = y_max/color_ny
+color_y = numpy.arange(0.0, y_max, ny)
+for i in range(ny-1):
+ I = numpy.nonzero((sim.x[:,1] >= color_y[i]) & (sim.x[:,1] <= color_y[i+1]))
+ sim.color[I] = i%2 + 1
+
+sim.mu_s[0] = 0.5
+sim.mu_d[0] = 0.5
+
# push down upper wall
compressional_strain = 0.5
sim.uniaxialStrainRate(wvel = -compressional_strain*Lx/sim.time_total[0])
t@@ -106,3 +129,4 @@ sim.uniaxialStrainRate(wvel = -compressional_strain*Lx/sim.time_total[0])
sim.run(dry=True)
sim.run()
sim.writeVTKall()
+'''