Introduction
Introduction Statistics Contact Development Disclaimer Help
tfix loop behavior - sphere - GPU-based 3D discrete element method algorithm wi…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 5941c431888db40c345ae11ab3de08c5018c8c94
parent 77bce7ca2f3aa916e57ae62e837a9257248549db
Author: Anders Damsgaard <[email protected]>
Date: Wed, 20 Aug 2014 09:30:18 +0200
fix loop behavior
Diffstat:
M python/diffusivity-test.py | 14 +++++++++-----
M python/permeability-results-c=1.py | 14 ++++++++++++--
2 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/python/diffusivity-test.py b/python/diffusivity-test.py
t@@ -21,6 +21,10 @@ sigma0_list = numpy.array([5.0e3, 10.0e3, 20.0e3, 40.0e3, 8…
i = 0
for sigma0 in sigma0_list:
+ if (i == 0):
+ i += 1
+ continue
+
# Read previous output if not first load test
if (i > 0):
sim.sid = 'cons-sigma0=' + str(sigma0_list[i-1]) + '-c_phi=' + \
t@@ -41,11 +45,11 @@ for sigma0 in sigma0_list:
color_nx = 6
color_ny = 6
color_nz = 6
- for i in range(sim.np):
- ix = numpy.floor((sim.x[i,0] - x_min)/(x_max/color_nx))
- iy = numpy.floor((sim.x[i,1] - y_min)/(y_max/color_ny))
- iz = numpy.floor((sim.x[i,2] - z_min)/(z_max/color_nz))
- sim.color[i] = (-1)**ix + (-1)**iy + (-1)**iz
+ for n in range(sim.np):
+ ix = numpy.floor((sim.x[n,0] - x_min)/(x_max/color_nx))
+ iy = numpy.floor((sim.x[n,1] - y_min)/(y_max/color_ny))
+ iz = numpy.floor((sim.x[n,2] - z_min)/(z_max/color_nz))
+ sim.color[n] = (-1)**ix + (-1)**iy + (-1)**iz
sim.cleanup()
sim.adjustUpperWall()
diff --git a/python/permeability-results-c=1.py b/python/permeability-results-c…
t@@ -13,6 +13,7 @@ for sigma0 in sigma0_list:
K = numpy.empty(len(sids))
dpdz = numpy.empty_like(K)
Q = numpy.empty_like(K)
+phi_bar = numpy.empty_like(K)
i = 0
for sid in sids:
t@@ -22,6 +23,9 @@ for sid in sids:
pc.findCrossSectionalFlux()
dpdz[i] = pc.dPdL[2]
Q[i] = pc.Q[2]
+ pc.findMeanPorosity()
+ phi_bar[i] = pc.phi_bar
+
i += 1
# produce VTK files
t@@ -31,17 +35,23 @@ for sid in sids:
fig = plt.figure()
-plt.subplot(2,1,1)
+plt.subplot(3,1,1)
plt.xlabel('Pressure gradient $\\Delta p/\\Delta z$ [Pa m$^{-1}$]')
plt.ylabel('Hydraulic conductivity $K$ [ms$^{-1}$]')
plt.plot(dpdz, K, '+')
plt.grid()
-plt.subplot(2,1,2)
+plt.subplot(3,1,2)
plt.xlabel('Pressure gradient $\\Delta p/\\Delta z$ [Pa m$^{-1}$]')
plt.ylabel('Hydraulic flux $Q$ [m$^3$s$^{-1}$]')
plt.plot(dpdz, Q, '+')
plt.grid()
+plt.subplot(3,1,3)
+plt.xlabel('Pressure gradient $\\Delta p/\\Delta z$ [Pa m$^{-1}$]')
+plt.ylabel('Mean porosity $\\bar{\\phi}$ [-]')
+plt.plot(dpdz, phi_bar, '+')
+plt.grid()
+
plt.tight_layout()
plt.savefig('permeability-dpdz-vs-K.png')
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.