tDilation in shear vis. now in percent - sphere - GPU-based 3D discrete element… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit eea999808f3d54c29b4c3d7add4850c7eb21fe8d | |
parent a1fba93609ccaadf9d2da946d464c686ce0ee758 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 5 Dec 2012 14:52:41 +0100 | |
Dilation in shear vis. now in percent | |
Diffstat: | |
M python/sphere.py | 7 ++++--- | |
1 file changed, 4 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -1278,7 +1278,7 @@ def visualize(project, method = 'energy', savefig = True… | |
fixvel = numpy.nonzero(sb.fixvel > 0.0) | |
#fixvel_upper = numpy.nonzero(sb.vel[fixvel,0] > 0.0) | |
shearvel = sb.vel[fixvel,0].max() | |
- w_x0 = sb.w_x[0] | |
+ w_x0 = sb.w_x[0] # Original height | |
A = sb.L[0] * sb.L[1] # Upper surface area | |
# Summation of shear stress contributions | |
t@@ -1290,7 +1290,8 @@ def visualize(project, method = 'energy', savefig = True… | |
sigma_eff[i] = sb.w_force[0] / A | |
sigma_def[i] = sb.w_devs[0] | |
#tau[i] = sb.force[fixvel_upper,0].sum() / A | |
- dilation[i] = sb.w_x[0] - w_x0 | |
+ #dilation[i] = sb.w_x[0] - w_x0 # dilation in … | |
+ dilation[i] = (sb.w_x[0] - w_x0)/w_x0 * 100.0 # dilation in … | |
# Plot stresses | |
if (outformat != 'txt'): | |
t@@ -1306,7 +1307,7 @@ def visualize(project, method = 'energy', savefig = True… | |
# Plot dilation | |
ax2 = plt.subplot2grid((2,1),(1,0)) | |
ax2.set_xlabel('Shear distance [m]') | |
- ax2.set_ylabel('Dilation [m]') | |
+ ax2.set_ylabel('Dilation [%]') | |
ax2.plot(xdisp, dilation, '+-') | |
ax2.grid() | |
else : |