# BEGIN TEMPORARY
#time =  h5.root.vertex_fields.time (not yet available)
ntimesteps = slip.shape[0]
time = numpy.linspace(0, dt*ntimesteps, ntimesteps, endpoint=True)
# END TEMPORARY

h5.close()


nrows = 2
ncols = 2
irow = 1
icol = 1

fig = Figure(fontsize=8, color="lightbg")
fig.open(7.0, 7.25, margins=[[0.6, 0.6, 0.2],
                             [0.6, 0.5, 0.2]])

ax = fig.axes(nrows, ncols, irow, icol)
ax.plot(time, slip_rate[:,indices,0])
ax.set_xlabel("Time (s)")
ax.set_ylabel("Slip Rate (m/s)")
icol += 1

ax = fig.axes(nrows, ncols, irow, icol)
ax.plot(time, -traction[:,indices,0]/traction[:,indices,1])
ax.set_xlabel("Time (s)")
ax.set_ylabel("Shear/Normal Traction")
icol += 1

irow = 2
icol = 1
Exemple #2
0
stressE /= 1.0e+6

print stress[0:2,0,:]
print stress[ntimesteps-1,0,:]
print stressE[0,:]
print stressE[1,:]
print stressE[ntimesteps-1,:]

# ----------------------------------------------------------------------
nrows = 2
ncols = 3
irow = 1
icol = 1

fig = Figure(fontsize=8, color="lightbg")
fig.open(9.0, 7.0, margins=[[0.45, 0.25, 0.1],
                            [0.45, 0.5, 0.2]])


icomp = 0
for irow in xrange(1, 3):
  for icol in xrange(1, 4):
      ax = fig.axes(nrows, ncols, irow, icol)
      
      ax.plot(t, stressE[:,icomp], 'r-',
              t, stress[:,0,icomp], 'b--')
      #ax.plot(t, devStress[:,0,icomp])
      ax.set_ylim( (-2, 8) )

      icomp += 1

pylab.show()
Exemple #3
0
slip = h5.root.vertex_fields.slip[:]
slip_rate = h5.root.vertex_fields.slip_rate[:]
traction = h5.root.vertex_fields.traction[:]
timeStamps = h5.root.time[:].ravel()
nsteps = timeStamps.shape[0]
dt = timeStamps[1] - timeStamps[0]

h5.close()

nrows = 3
ncols = 2
irow = 1
icol = 1

fig = Figure(fontsize=8, color="lightbg")
fig.open(7.0, 7.25, margins=[[0.6, 0.6, 0.2], [0.6, 0.5, 0.2]])

ax = fig.axes(nrows, ncols, irow, icol)
ax.plot(timeStamps, slip_rate[:, indices, 0])
ax.set_xlabel("Time (s)")
ax.set_ylabel("Slip Rate (m/s)")
icol += 1

ax = fig.axes(nrows, ncols, irow, icol)
ax.plot(timeStamps, -traction[:, indices, 0] / traction[:, indices, 1])
ax.set_xlabel("Time (s)")
ax.set_ylabel("Shear/Normal Traction")
icol += 1

irow = 2
icol = 1
Exemple #4
0
stressE /= 1.0e+6

print(stress[0:2, 0, :])
print(stress[ntimesteps - 1, 0, :])
print(stressE[0, :])
print(stressE[1, :])
print(stressE[ntimesteps - 1, :])

# ----------------------------------------------------------------------
nrows = 2
ncols = 3
irow = 1
icol = 1

fig = Figure(fontsize=8, color="lightbg")
fig.open(9.0, 7.0, margins=[[0.45, 0.25, 0.1], [0.45, 0.5, 0.2]])

icomp = 0
for irow in range(1, 3):
    for icol in range(1, 4):
        ax = fig.axes(nrows, ncols, irow, icol)

        ax.plot(t, stressE[:, icomp], 'r-', t, stress[:, 0, icomp], 'b--')
        #ax.plot(t, devStress[:,0,icomp])
        ax.set_ylim((-2, 8))

        icomp += 1

pylab.show()

# End of file