trename sid during collapse - sphere - GPU-based 3D discrete element method alg… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 5702a349deb400506e747ef13fe3b2f18a67e593 | |
parent 4cf81fbdb5bf766b29ea42cbbd74095955cd2bd0 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 29 Aug 2014 15:09:43 +0200 | |
rename sid during collapse | |
Diffstat: | |
M python/capillary-cohesion.py | 24 ++++++++++++++++++++++-- | |
1 file changed, 22 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/python/capillary-cohesion.py b/python/capillary-cohesion.py | |
t@@ -16,10 +16,30 @@ import sys | |
device = sys.argv[1] | |
cohesion = sys.argv[2] | |
-sim = sphere.sim('cap-cohesion=' + str(cohesion), np=2000) | |
-sim.defaultParams(capillaryCohesion = cohesion) | |
+# Create packing | |
+sim = sphere.sim('cap-cohesion=' + str(cohesion) + '-init', np=2000) | |
+sim.mu_s[0] = 0.0 | |
+sim.mu_d[0] = 0.0 | |
sim.generateRadii(psd='logn', radius_mean=1.0e-3, radius_variance=1.0e-4) | |
sim.contactModel(1) | |
sim.initRandomGridPos([12, 12, 10000]) | |
+sim.initTemporal(5.0, file_dt=0.01, epsilon=0.07) | |
+sim.g[2] = -10.0 | |
+sim.run() | |
+ | |
+sim.readlast() | |
+sim.sid = 'cap-cohesion=' + str(cohesion) | |
+sim.defaultParams(capillaryCohesion=cohesion) | |
+sim.adjustUpperWall() | |
+init_lx = sim.L[0] | |
+init_ly = sim.L[1] | |
+sim.L[0] *= 5 | |
+sim.L[1] *= 5 | |
+sim.num[0] *= 5 | |
+sim.num[1] *= 5 | |
+sim.x[:,0] += 0.5*sim.L[0] - 0.5*init_lx | |
+sim.x[:,1] += 0.5*sim.L[1] - 0.5*init_ly | |
sim.initTemporal(2.0, file_dt=0.01, epsilon=0.07) | |
sim.run() | |
+ | |
+sim.writeVTKall() |