[cig-commits] r21150 - short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102
brad at geodynamics.org
brad at geodynamics.org
Thu Dec 13 17:58:49 PST 2012
Author: brad
Date: 2012-12-13 17:58:49 -0800 (Thu, 13 Dec 2012)
New Revision: 21150
Added:
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_traction.py
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.spatialdb.gz
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.timedb
Modified:
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_friction.py
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/pylithapp.cfg
Log:
More work on setting up tpv102.
Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_friction.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_friction.py 2012-12-14 00:31:16 UTC (rev 21149)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_friction.py 2012-12-14 01:58:49 UTC (rev 21150)
@@ -21,7 +21,7 @@
dx = 100.0
W = faultW - taperW
-
+# ----------------------------------------------------------------------
def fnB(x, W, w):
xabs = numpy.abs(x)
mask1 = xabs <= W
@@ -30,6 +30,7 @@
v = 1.0*mask1 + 0.5*(1.0+numpy.tanh(w/(xabs-W-w) + w/(xabs-W)))*mask2 + 0.0*mask3
return v
+# ----------------------------------------------------------------------
x = numpy.array([0.0], dtype=numpy.float64)
y = numpy.arange(-0.5*faultL, 0.5*faultL+0.5*dx, dx, dtype=numpy.float64)
z = numpy.arange(-faultW, 0.0+0.5*dx, dx, dtype=numpy.float64)
Added: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_traction.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_traction.py (rev 0)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_traction.py 2012-12-14 01:58:49 UTC (rev 21150)
@@ -0,0 +1,108 @@
+#!/usr/bin/env python
+# ----------------------------------------------------------------------
+#
+# Python script to create spatial database with rate-state friction parameters.
+#
+# Brad T. Aagaard, U.S. Geological Survey
+#
+# ----------------------------------------------------------------------
+#
+# PREREQUISITES: numpy, spatialdata
+
+# ======================================================================
+import numpy
+
+from spatialdata.spatialdb.SimpleGridAscii import SimpleGridAscii
+from spatialdata.geocoords.CSCart import CSCart
+
+dTshear = 25.0e+6
+T = 1.0
+R = 3.0e+3
+hypoX = 0.0
+hypoY = 0.0
+hypoZ = -7.5e+3
+t = numpy.arange(0.0, 1.01001, 0.01)
+t[-1] = 15.0
+
+faultW = 18.0e+3
+faultL = 36.0e+3
+dx = 100.0
+
+# ----------------------------------------------------------------------
+def fnF(r):
+ mask = r < R
+ F = mask*numpy.exp(r**2/(r**2-R**2))
+ F[~mask] = 0.0
+ F[F < 1.0e-20] = 0.0
+ return F
+
+def fnG(t):
+ mask1 = numpy.bitwise_and(0 < t, t < T)
+ mask2 = t >= T
+ G = mask1*numpy.exp((t-T)**2/(t*(t-2*T))) + mask2*1.0
+ return G
+
+# ----------------------------------------------------------------------
+x = numpy.array([0.0], dtype=numpy.float64)
+y = numpy.hstack((numpy.array([-0.5*faultL], dtype=numpy.float64),
+ numpy.arange(hypoY-R, hypoY+R+0.5*dx, dx, dtype=numpy.float64),
+ numpy.array([+0.5*faultL], dtype=numpy.float64)))
+z = numpy.hstack((numpy.array([-faultW], dtype=numpy.float64),
+ numpy.arange(hypoZ-R, hypoZ+R+0.5*dx, dx, dtype=numpy.float64),
+ numpy.array([0.0], dtype=numpy.float64)))
+
+nx = x.shape[0]
+ny = y.shape[0]
+nz = z.shape[0]
+npts = nx*ny*nz
+xyz = numpy.zeros( (npts, 3), dtype=numpy.float64)
+xyz[:,0] = x
+for iy in xrange(ny):
+ xyz[iy*nz:(iy+1)*nz,1] = y[iy]
+ xyz[iy*nz:(iy+1)*nz,2] = z
+
+zero = numpy.zeros( (npts,), dtype=numpy.float64)
+
+r = ((xyz[:,0]-hypoX)**2 + (xyz[:,1]-hypoY)**2 + (xyz[:,2]-hypoZ)**2)**0.5
+tractionLL = dTshear*fnF(r)
+
+cs = CSCart()
+cs.initialize()
+
+writer = SimpleGridAscii()
+writer.inventory.filename = "traction_change.spatialdb"
+writer._configure()
+writer.write({'points': xyz,
+ 'x': x,
+ 'y': y,
+ 'z': z,
+ 'coordsys': cs,
+ 'data_dim': 2,
+ 'values': [{'name': "traction-shear-leftlateral",
+ 'units': "MPa",
+ 'data': tractionLL},
+ {'name': "traction-shear-updip",
+ 'units': "MPa",
+ 'data': zero},
+ {'name': "traction-normal",
+ 'units': "MPa",
+ 'data': zero},
+ {'name': "change-start-time",
+ 'units': "s",
+ 'data': zero},
+ ]})
+
+# Time history
+th = open("traction_change.timedb", "w")
+th.write("#TIME HISTORY ascii\n" +
+ "TimeHistory {\n" +
+ " num-points = %d\n" % t.shape[0] +
+ " time-units = s\n" +
+ "}\n")
+data = numpy.transpose((t, fnG(t)))
+numpy.savetxt(th, data, fmt='%14.6e')
+th.close()
+
+
+# End of file
+
Property changes on: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/create_traction.py
___________________________________________________________________
Name: svn:executable
+ *
Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/pylithapp.cfg
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/pylithapp.cfg 2012-12-14 00:31:16 UTC (rev 21149)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/pylithapp.cfg 2012-12-14 01:58:49 UTC (rev 21150)
@@ -114,13 +114,13 @@
friction.label = Rate-state w/ageing
friction.db_properties = spatialdata.spatialdb.SimpleGridDB
+friction.db_properties.label = Rate-state parameters
friction.db_properties.filename = friction.spatialdb
-friction.db_properties.label = Rate-state parameters
friction.db_properties.query_type = linear
friction.db_initial_state = spatialdata.spatialdb.SimpleGridDB
+friction.db_initial_state.label = Initial value for state variable
friction.db_initial_state.filename = friction.spatialdb
-friction.db_initial_state.label = Initial value for state variable
friction.db_initial_state.query_type = linear
traction_perturbation = pylith.faults.TractPerturbation
@@ -131,7 +131,14 @@
db_initial.values = [traction-shear-leftlateral, traction-shear-updip, traction-normal]
db_initial.data = [-75.0*MPa, 0.0*MPa, -120.0*MPa]
+db_change = spatialdata.spatialdb.SimpleGridDB
+db_change.label = Traction perturbation
+db_change.filename = traction_change.spatialdb
+db_change.query_type = linear
+th_change = spatialdata.spatialdb.TimeHistory
+th_change.label = Traction perturbation time history
+th_change.filename = traction_change.timedb
# ----------------------------------------------------------------------
# output
@@ -148,7 +155,7 @@
writer = pylith.meshio.DataWriterHDF5ExtSubMesh
[pylithapp.timedependent.interfaces.fault.output]
-vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,reference_friction_coefficient,reference_slip_rate,characteristic_slip_distance,constitutive_parameter_a,constitutive_parameter_b,cohesion]
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,traction_change_in_value,traction_change_start_time,reference_friction_coefficient,reference_slip_rate,characteristic_slip_distance,constitutive_parameter_a,constitutive_parameter_b,cohesion]
vertex_data_fields = [slip,slip_rate,traction]
output_freq = time_step
time_step = 0.04999*s
Added: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.spatialdb.gz
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.spatialdb.gz
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.timedb
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.timedb (rev 0)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv102/traction_change.timedb 2012-12-14 01:58:49 UTC (rev 21150)
@@ -0,0 +1,107 @@
+#TIME HISTORY ascii
+TimeHistory {
+ num-points = 102
+ time-units = s
+}
+ 0.000000e+00 0.000000e+00
+ 1.000000e-02 4.078037e-22
+ 2.000000e-02 2.932663e-11
+ 3.000000e-02 1.218502e-07
+ 4.000000e-02 7.849176e-06
+ 5.000000e-02 9.549752e-05
+ 6.000000e-02 5.049429e-04
+ 7.000000e-02 1.658363e-03
+ 8.000000e-02 4.044422e-03
+ 9.000000e-02 8.088308e-03
+ 1.000000e-01 1.407778e-02
+ 1.100000e-01 2.214807e-02
+ 1.200000e-01 3.230207e-02
+ 1.300000e-01 4.444363e-02
+ 1.400000e-01 5.841131e-02
+ 1.500000e-01 7.400641e-02
+ 1.600000e-01 9.101426e-02
+ 1.700000e-01 1.092190e-01
+ 1.800000e-01 1.284131e-01
+ 1.900000e-01 1.484033e-01
+ 2.000000e-01 1.690133e-01
+ 2.100000e-01 1.900854e-01
+ 2.200000e-01 2.114797e-01
+ 2.300000e-01 2.330741e-01
+ 2.400000e-01 2.547623e-01
+ 2.500000e-01 2.764530e-01
+ 2.600000e-01 2.980681e-01
+ 2.700000e-01 3.195412e-01
+ 2.800000e-01 3.408162e-01
+ 2.900000e-01 3.618464e-01
+ 3.000000e-01 3.825927e-01
+ 3.100000e-01 4.030232e-01
+ 3.200000e-01 4.231117e-01
+ 3.300000e-01 4.428374e-01
+ 3.400000e-01 4.621836e-01
+ 3.500000e-01 4.811377e-01
+ 3.600000e-01 4.996902e-01
+ 3.700000e-01 5.178344e-01
+ 3.800000e-01 5.355658e-01
+ 3.900000e-01 5.528822e-01
+ 4.000000e-01 5.697828e-01
+ 4.100000e-01 5.862684e-01
+ 4.200000e-01 6.023408e-01
+ 4.300000e-01 6.180030e-01
+ 4.400000e-01 6.332586e-01
+ 4.500000e-01 6.481120e-01
+ 4.600000e-01 6.625682e-01
+ 4.700000e-01 6.766324e-01
+ 4.800000e-01 6.903103e-01
+ 4.900000e-01 7.036079e-01
+ 5.000000e-01 7.165313e-01
+ 5.100000e-01 7.290867e-01
+ 5.200000e-01 7.412804e-01
+ 5.300000e-01 7.531188e-01
+ 5.400000e-01 7.646082e-01
+ 5.500000e-01 7.757550e-01
+ 5.600000e-01 7.865654e-01
+ 5.700000e-01 7.970456e-01
+ 5.800000e-01 8.072018e-01
+ 5.900000e-01 8.170397e-01
+ 6.000000e-01 8.265654e-01
+ 6.100000e-01 8.357846e-01
+ 6.200000e-01 8.447028e-01
+ 6.300000e-01 8.533254e-01
+ 6.400000e-01 8.616578e-01
+ 6.500000e-01 8.697051e-01
+ 6.600000e-01 8.774721e-01
+ 6.700000e-01 8.849638e-01
+ 6.800000e-01 8.921848e-01
+ 6.900000e-01 8.991395e-01
+ 7.000000e-01 9.058323e-01
+ 7.100000e-01 9.122673e-01
+ 7.200000e-01 9.184485e-01
+ 7.300000e-01 9.243798e-01
+ 7.400000e-01 9.300647e-01
+ 7.500000e-01 9.355070e-01
+ 7.600000e-01 9.407098e-01
+ 7.700000e-01 9.456765e-01
+ 7.800000e-01 9.504101e-01
+ 7.900000e-01 9.549135e-01
+ 8.000000e-01 9.591895e-01
+ 8.100000e-01 9.632406e-01
+ 8.200000e-01 9.670695e-01
+ 8.300000e-01 9.706784e-01
+ 8.400000e-01 9.740695e-01
+ 8.500000e-01 9.772450e-01
+ 8.600000e-01 9.802067e-01
+ 8.700000e-01 9.829564e-01
+ 8.800000e-01 9.854958e-01
+ 8.900000e-01 9.878265e-01
+ 9.000000e-01 9.899498e-01
+ 9.100000e-01 9.918671e-01
+ 9.200000e-01 9.935795e-01
+ 9.300000e-01 9.950880e-01
+ 9.400000e-01 9.963935e-01
+ 9.500000e-01 9.974969e-01
+ 9.600000e-01 9.983987e-01
+ 9.700000e-01 9.990996e-01
+ 9.800000e-01 9.995999e-01
+ 9.900000e-01 9.999000e-01
+ 1.000000e+00 1.000000e+00
+ 1.500000e+01 1.000000e+00
More information about the CIG-COMMITS
mailing list