Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdded effective and prescribed stress values to shear visualization - sphere -…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 8bf2eda369d9fd13867a232cfdc0abf28f92bb08
parent 001cde2d241d1bb9b297d0dbbcdda2013093409b
Author: Anders Damsgaard <[email protected]>
Date: Thu, 29 Nov 2012 10:31:19 +0100
Added effective and prescribed stress values to shear visualization
Diffstat:
M python/sphere.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/python/sphere.py b/python/sphere.py
t@@ -1217,10 +1217,11 @@ def visualize(project, method = 'energy', savefig = Tr…
# First iteration: Allocate arrays and find constant values
if (i == 0):
- xdisp = numpy.zeros(lastfile+1, dtype=numpy.float64) #…
- sigma = numpy.zeros(lastfile+1, dtype=numpy.float64) #…
- tau = numpy.zeros(lastfile+1, dtype=numpy.float64) #…
- dilation = numpy.zeros(lastfile+1, dtype=numpy.float64) #…
+ xdisp = numpy.zeros(lastfile+1, dtype=numpy.float64) …
+ sigma_eff = numpy.zeros(lastfile+1, dtype=numpy.float64) …
+ sigma_def = numpy.zeros(lastfile+1, dtype=numpy.float64) …
+ tau = numpy.zeros(lastfile+1, dtype=numpy.float64) …
+ dilation = numpy.zeros(lastfile+1, dtype=numpy.float64) …
fixvel = numpy.nonzero(sb.fixvel > 0.0)
#fixvel_upper = numpy.nonzero(sb.vel[fixvel,0] > 0.0)
t@@ -1234,8 +1235,8 @@ def visualize(project, method = 'energy', savefig = True…
tau[i] += -sb.force[j,0]
xdisp[i] = sb.time_current[0] * shearvel
- sigma[i] = sb.w_force[0] / A
- sigma[i] = sb.w_devs[0]
+ 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
t@@ -1244,9 +1245,10 @@ def visualize(project, method = 'energy', savefig = Tru…
ax1 = plt.subplot2grid((2,1),(0,0))
ax1.set_xlabel('Shear distance [m]')
ax1.set_ylabel('Stress [Pa]')
- ax1.plot(xdisp, sigma, '+-g')
+ ax1.plot(xdisp, sigma_eff, '+-g', label="$\sigma'")
+ ax1.plot(xdisp, sigma_def, '+-b', label="$\sigma_0")
ax1.plot(xdisp, tau, '+-r')
- #plt.legend('$\sigma`$','$\tau$')
+ ax1.legend()
# Plot dilation
ax2 = plt.subplot2grid((2,1),(1,0))
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.