Introduction
Introduction Statistics Contact Development Disclaimer Help
trun gravity-free simulation on starting grid - sphere - GPU-based 3D discrete …
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit fb6705d3af67c7a44b029e40c1c819013a9b58a9
parent 7b8724f7f05b2c28708db222abe498be2c5d431b
Author: Anders Damsgaard <[email protected]>
Date: Mon, 1 Sep 2014 09:09:32 +0200
run gravity-free simulation on starting grid
Diffstat:
M python/capillary-cohesion.py | 48 ++++++++++++++---------------…
1 file changed, 22 insertions(+), 26 deletions(-)
---
diff --git a/python/capillary-cohesion.py b/python/capillary-cohesion.py
t@@ -21,39 +21,35 @@ cohesion = sys.argv[2]
gravity = sys.argv[3]
# Create packing
-sim = sphere.sim('cap-cohesion=' + str(cohesion) + '-init', np=2000)
+sim = sphere.sim('cap-cohesion=' + str(cohesion) + '-init-grav=' \
+ + str(gravity), np=2000)
sim.mu_s[0] = 0.0
sim.mu_d[0] = 0.0
+sim.k_n[0] = 1.0e7
+sim.k_t[0] = 1.0e7
sim.generateRadii(psd='uni', 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
+if gravity == 1:
+ 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
-
-if gravity == 0:
- init_lz = sim.L[2]
- sim.L[2] *= 5
- sim.num[2] *= 5
- sim.w_x[0] = sim.L[2]
- sim.sid = sim.sid + '-nograv'
- sim.x[:,2] += 0.5*sim.L[2] - 0.5*init_lz
- sim.g[2] = 0.0
-
-sim.initTemporal(2.0, file_dt=0.01, epsilon=0.07)
-sim.run()
+if gravity == 1:
+ 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()
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.