[cig-commits] r17940 - short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d

brad at geodynamics.org brad at geodynamics.org
Tue Feb 22 10:38:03 PST 2011


Author: brad
Date: 2011-02-22 10:38:03 -0800 (Tue, 22 Feb 2011)
New Revision: 17940

Modified:
   short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/gradient.jou
   short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/params.jou
   short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_faultth.py
   short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_surfvel.py
   short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/pylithapp.cfg
Log:
Adjusted settings for gradient meshes.

Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/gradient.jou
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/gradient.jou	2011-02-22 05:25:14 UTC (rev 17939)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/gradient.jou	2011-02-22 18:38:03 UTC (rev 17940)
@@ -1,12 +1,57 @@
-#{bias_factor=1.01}
+# ----------------------------------------------------------------------
+# Set vertex spacing with increasing spacing away from fault
+# ----------------------------------------------------------------------
+#{bias_factor=1.02}
 
-surface all size {dx}
+# Function for computing discretization size at end of curve with bias
+#{fun_dx='dxStart*bias_factor**ceil( ln(1-curveL/dxStart*(1-bias_factor))/ln(bias_factor))'}
 
+# ----------------------------------------------------------------------
+# Compute sizes at curve endpoints
+# ----------------------------------------------------------------------
+
+# dxA - size at vertex 13 14
+#{dxStart=dx}{curveL=Length(22)}{execute("dxA="//fun_dx)}
+
+# dxB - size at vertex 17
+#{dxStart=dx}{curveL=Length(27)}{execute("dxB="//fun_dx)}
+
+# dxC - size at vertex 9 10 12
+#{dxStart=dxA}{curveL=Length(18)}{execute("dxC="//fun_dx)}
+
+# dxD - size at vertex 11
+#{dxStart=dxB}{curveL=Length(30)}{execute("dxD="//fun_dx)}
+
+# ----------------------------------------------------------------------
+# Reset sizes
+# ----------------------------------------------------------------------
+curve all scheme default
+surface all sizing function none
+
+# Set size on faults
+curve fault_surface_main fault_surface_main at A fault_surface_branch size {dx}
+
+# Set bias on curves extending from faults
 curve 22 scheme bias fine size {dx} factor {bias_factor} start vertex 15
 curve 31 scheme bias fine size {dx} factor {bias_factor} start vertex 19
 curve 24 scheme bias fine size {dx} factor {bias_factor} start vertex 16
-surface 8 sizing function type bias start curve 28 29 factor {bias_factor}
-surface 10 sizing function type bias start curve 28 32 factor {bias_factor}
-surface 11 sizing function type bias start curve 29 32 factor {bias_factor}
 
+# A to B
+curve 27 scheme bias fine size {dxA} factor {bias_factor} start vertex 13
 
+# A to C
+curve 18 scheme bias fine size {dxA} factor {bias_factor} start vertex 13
+curve 19 scheme bias fine size {dxA} factor {bias_factor} start vertex 14
+curve 20 scheme bias fine size {dxA} factor {bias_factor} start vertex 14
+
+# B to D
+curve 30 scheme bias fine size {dxB} coarse size {dxD} start vertex 17
+
+# D to C
+curve 14 scheme bias fine size {dxD} coarse size {dxC} start vertex 11
+
+# C to C
+curve 16 size {dxC}
+
+
+# End of file

Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/params.jou
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/params.jou	2011-02-22 05:25:14 UTC (rev 17939)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/params.jou	2011-02-22 18:38:03 UTC (rev 17940)
@@ -6,12 +6,12 @@
 # Parameters for geometry.
 # ----------------------------------------------------------------------
 #
-# Block is 64.0 km x 80.0 km
-# -32.0 km <= x <= 32.0 km
-# -40.0 km <= y <= 40.0 km
+# Block is 48.0 km x 64.0 km
+# -24.0 km <= x <= 24.0 km
+# -32.0 km <= y <= 32.0 km
 #
-#{blockWidth=64*km}
-#{blockLength=80*km}
+#{blockWidth=48*km}
+#{blockLength=64*km}
 #{blockHeight=32*km}
 #
 # Main fault is 28.0 km long
@@ -25,10 +25,8 @@
 #{branchFaultLength=12.0*km}
 #{branchOffsetY=2.0*km}
 #
-# Note: Fault lengths are slightly longer than necessary to insure that
-# we capture the nodes that span the rupture.
-#
 # ----------------------------------------------------------------------
 # Parameters for mesh.
 # ----------------------------------------------------------------------
 #{dx=100*m}
+

Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_faultth.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_faultth.py	2011-02-22 05:25:14 UTC (rev 17939)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_faultth.py	2011-02-22 18:38:03 UTC (rev 17940)
@@ -10,9 +10,9 @@
 # ======================================================================
 #
 
-sim = "tpv14"
+sim = "tpv15"
 cell = "tri3"
-dx = 50
+dx = 100
 dt = 0.05
 
 # ======================================================================
@@ -24,12 +24,19 @@
 
 inputRoot = "output/%s_%s_%03dm_gradient" % (sim, cell,dx)
 
-targets = numpy.array([[0.0,   1800.0],
-                       [0.0,   1900.0],
-                       [0.0,   2000.0],
+targets = numpy.array([[0.0,   2000.0],
                        [0.0,   2100.0],
                        [0.0,   2200.0],
+                       [0.0,   2300.0],
+                       [0.0,   2400.0],
+                       [0.0,   2500.0],
+                       [0.0,   2600.0],
+                       [0.0,   2700.0],
+                       [0.0,   2800.0],
+                       [0.0,   2900.0],
+                       [0.0,   3000.0],
 ])
+targets[:,1] += 2*1000.0
 #targets = numpy.array([[0.0,   -7500.0],
 #                       [0.0,   -6000.0],
 #                       [0.0,   -4500.0],
@@ -54,8 +61,11 @@
 # Get datasets
 slip = h5.root.vertex_fields.slip[:]
 slip_rate = h5.root.vertex_fields.slip_rate[:]
-traction = h5.root.vertex_fields.traction[:]
+traction = h5.root.vertex_fields.traction[:] / 1.0e+6
 
+imask = numpy.where(numpy.abs(traction[1,:,1]) < 1.0e-6)[0]
+traction[:,imask,1] = 1.0
+
 # BEGIN TEMPORARY
 #time =  h5.root.vertex_fields.time (not yet available)
 ntimesteps = slip.shape[0]
@@ -65,29 +75,44 @@
 h5.close()
 
 
-nrows = 1
-ncols = 3
+nrows = 2
+ncols = 2
 irow = 1
 icol = 1
 
 fig = Figure(fontsize=8, color="lightbg")
-fig.open(7.0, 7.25, margins=[[0.5, 0.4, 0.1],
-                             [0.5, 4, 0.2]])
+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[:,indices,0],
-        timeO, slipO[:,indices,0], '--')
+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, slip_rate[:,indices,0])
+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
 ax = fig.axes(nrows, ncols, irow, icol)
+ax.plot(time, -traction[:,indices,0])
+ax.set_xlabel("Time (s)")
+ax.set_ylabel("Shear Traction (MPa)")
+icol += 1
+
+ax = fig.axes(nrows, ncols, irow, icol)
 ax.plot(time, traction[:,indices,1])
+ax.set_xlabel("Time (s)")
+ax.set_ylabel("Normal Traction (MPa)")
 icol += 1
 
 pylab.show()
 
 
+print slip[ntimesteps-1,indices,0]
+
 # End of file

Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_surfvel.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_surfvel.py	2011-02-22 05:25:14 UTC (rev 17939)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/plot_surfvel.py	2011-02-22 18:38:03 UTC (rev 17940)
@@ -10,11 +10,11 @@
 # ======================================================================
 #
 
-sim = "tpv14_tri3_100m_gradient"
-tBegin = 0.0
-tEnd = 6.01
-dt = 0.2
-exaggeration = 0.1
+sim = "tpv15_tri3_050m_gradient"
+tBegin = 2.0
+tEnd = 4.01
+dt = 0.1
+exaggeration = 0.05
 
 # ======================================================================
 from enthought.mayavi.plugins.app import Mayavi
@@ -83,7 +83,7 @@
 
     (nvertices, spaceDim) = self.vertices.shape
 
-    tstep = int(t / dataDt)
+    tstep = int(t / dataDt + 0.001)
     mag = (self.vel[tstep,:,0]**2 + self.vel[tstep,:,1]**2)**0.5
     mask = mag < magMin
     mag[mask] = magMin
@@ -224,7 +224,7 @@
     camera.focal_point = ptTo
     camera.position = ptFrom
     camera.clipping_range = clipRange
-    camera.parallel_scale = 12.0
+    camera.parallel_scale = 0.5
     camera.parallel_projection = True
 
     return

Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/pylithapp.cfg
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/pylithapp.cfg	2011-02-22 05:25:14 UTC (rev 17939)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv14-2d/pylithapp.cfg	2011-02-22 18:38:03 UTC (rev 17940)
@@ -18,7 +18,7 @@
 faultcohesivedyn = 1
 
 [pylithapp.journal.debug]
-#pylithapp = 1
+pylithapp = 1
 #problem = 1
 #explicit = 1
 
@@ -27,7 +27,7 @@
 # ----------------------------------------------------------------------
 [pylithapp.mesh_generator]
 reader = pylith.meshio.MeshIOCubit
-reorder_mesh = True
+#reorder_mesh = True
 
 [pylithapp.mesh_generator.reader]
 coordsys.space_dim = 2
@@ -40,7 +40,7 @@
 dimension = 2
 
 formulation = pylith.problems.ExplicitLumped
-formulation.norm_viscosity = 0.2
+formulation.norm_viscosity = 0.4
 normalizer = spatialdata.units.NondimElasticDynamic
 
 [pylithapp.timedependent.formulation.time_step]



More information about the CIG-COMMITS mailing list