Ejemplo n.º 1
0
 def __init__(self):
     if plotSize == "poster":
         fontsize = 14
     elif plotSize == "presentation":
         fontsize = 14
     elif plotSize == "manual":
         fontsize = 10
     else:
         raise ValueError("Unknown plotSize '%s'." % plotSize)
     Figure.__init__(self, color=color, fontsize=fontsize)
     return
Ejemplo n.º 2
0
 def __init__(self):
     if plotSize == "poster":
         fontsize = 14
     elif plotSize == "presentation":
         fontsize = 14
     elif plotSize == "manual":
         fontsize = 10
     else:
         raise ValueError("Unknown plotSize '%s'." % plotSize)
     Figure.__init__(self, color=color, fontsize=fontsize)
     return
Ejemplo n.º 3
0
# 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
Ejemplo n.º 4
0
# Get datasets
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
Ejemplo n.º 5
0
stressE[:,5] = 2.0*mu_t*strain0[5]
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