tfix lowermost particles - sphere - GPU-based 3D discrete element method algori… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit f2c74457b53b987cdd2f6687f33a7d861d7644c8 | |
parent 6d43d86505ba38caf0de020525c3c955d73f31d4 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 22 Jun 2014 18:20:25 +0200 | |
fix lowermost particles | |
Diffstat: | |
M python/shortening.py | 18 ++++++++++++------ | |
M python/sphere.py | 12 ++++-------- | |
2 files changed, 16 insertions(+), 14 deletions(-) | |
--- | |
diff --git a/python/shortening.py b/python/shortening.py | |
t@@ -108,7 +108,7 @@ 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) | |
+sim.initTemporal(current=0.0, total=5.0, file_dt = 0.01, epsilon=0.07) | |
# set colors again | |
y_min = numpy.min(sim.x[:,1]) | |
t@@ -133,14 +133,20 @@ for i in range(sim.np): | |
iz = numpy.floor((sim.x[i,2] - z_min)/(z_max/color_nz)) | |
sim.color[i] = (-1)**iy + (-1)**iz + 1 | |
-sim.normalBoundariesXY() | |
+# fix lowest plane of particles | |
+I = numpy.nonzero(sim.x[:,1] < 1.5*numpy.mean(sim.radius)) | |
+sim.fixvel[I] = 1 | |
+sim.color[I] = 0 | |
+ | |
+#sim.normalBoundariesXY() | |
+sim.periodicBoundariesX() | |
sim.zeroKinematics() | |
# Wall parameters | |
-sim.mu_ws[0] = 0.0 | |
-sim.mu_wd[0] = 0.0 | |
-sim.gamma_wn[0] = 0.0 | |
-sim.gamma_wt[0] = 0.0 | |
+sim.mu_ws[0] = 0.5 | |
+sim.mu_wd[0] = 0.5 | |
+sim.gamma_wn[0] = 1.0e2 | |
+sim.gamma_wt[0] = 1.0e2 | |
# Particle parameters | |
sim.mu_s[0] = 0.5 | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -2379,21 +2379,17 @@ class sim: | |
+ "simulating particles may produce instabilities.") | |
else: | |
r_min = numpy.min(self.radius) | |
- | |
- # Radjaii et al 2011 | |
m_min = self.rho * 4.0/3.0*numpy.pi*r_min**3 | |
k_max = numpy.max([self.k_n[:], self.k_t[:]]) | |
+ | |
+ # Radjaii et al 2011 | |
self.time_dt[0] = epsilon/(numpy.sqrt(k_max/m_min)) | |
# Zhang and Campbell, 1992 | |
- #self.time_dt[0] = 0.075 *\ | |
- #math.sqrt((V_sphere(r_min) * self.rho[0]) \ | |
- #/ numpy.amax([self.k_n[:], self.k_t[:]]) ) | |
+ #self.time_dt[0] = 0.075*math.sqrt(m_min/k_max) | |
# Computational time step (O'Sullivan et al, 2003) | |
- #self.time_dt[0] = 0.17 * \ | |
- #math.sqrt((4.0/3.0 * math.pi * r_min**3 * self.rho[0]) \ | |
- #/ numpy.amax([self.k_n[:], self.k_t[:]]) ) | |
+ #self.time_dt[0] = 0.17*math.sqrt(m_min/k_max) | |
# Check numerical stability of the fluid phase, by criteria derived by | |
# von Neumann stability analysis of the diffusion and advection terms |