[cig-commits] r19132 - in short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith: faults friction

brad at geodynamics.org brad at geodynamics.org
Mon Oct 31 09:47:05 PDT 2011


Author: brad
Date: 2011-10-31 09:47:05 -0700 (Mon, 31 Oct 2011)
New Revision: 19132

Modified:
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/SlipWeakening.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/StaticFriction.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/TimeWeakening.cc
Log:
Readded SCEC dynamic rupture customizations (no opening, no healing) that were wiped out with merge from trunk (libsrc -> libsrc/pylith wiped out previous customizations).

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc	2011-10-31 15:27:29 UTC (rev 19131)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc	2011-10-31 16:47:05 UTC (rev 19132)
@@ -50,6 +50,8 @@
 // slight speed improvement.
 //#define PRECOMPUTE_GEOMETRY
 
+#define NO_FAULT_OPENING
+
 // ----------------------------------------------------------------------
 typedef pylith::topology::Mesh::SieveMesh SieveMesh;
 typedef pylith::topology::Mesh::RealSection RealSection;
@@ -2044,11 +2046,17 @@
   const PylithScalar tractionNormal = tractionTpdt[1];
   const PylithScalar tractionShearMag = fabs(tractionTpdt[0]);
 
+#if !defined(NO_FAULT_OPENING)
   if (tractionNormal < 0 && 0.0 == slip[1]) {
+#endif
     // if in compression and no opening
     const PylithScalar frictionStress = _friction->calcFriction(slipMag, slipRateMag,
 							  tractionNormal);
+#if 0
     if (tractionShearMag > frictionStress || slipRateMag > 0.0) {
+#else
+    if (tractionShearMag > frictionStress) {
+#endif
       // traction is limited by friction, so have sliding OR
       // friction exceeds traction due to overshoot in slip
 
@@ -2068,11 +2076,13 @@
       // no changes to solution
       assert(0.0 == slipRateMag);
     } // if/else
+#if !defined(NO_FAULT_OPENING)
   } else {
     // if in tension, then traction is zero.
     (*dLagrangeTpdt)[0] = -tractionTpdt[0];
     (*dLagrangeTpdt)[1] = -tractionTpdt[1];
   } // else
+#endif
 
   PetscLogFlops(8);
 } // _constrainSolnSpace2D
@@ -2097,11 +2107,17 @@
     sqrt(tractionTpdt[0] * tractionTpdt[0] +
 	 tractionTpdt[1] * tractionTpdt[1]);
   
+#if !defined(NO_FAULT_OPENING)
   if (tractionNormal < 0.0 && 0.0 == slip[2]) {
+#endif
     // if in compression and no opening
     const PylithScalar frictionStress = 
       _friction->calcFriction(slipShearMag, slipRateMag, tractionNormal);
+#if 0
     if (tractionShearMag > frictionStress || slipRateMag > 0.0) {
+#else
+    if (tractionShearMag > frictionStress) {
+#endif
       // traction is limited by friction, so have sliding OR
       // friction exceeds traction due to overshoot in slip
       
@@ -2127,12 +2143,14 @@
       // no changes to solution
       assert(0.0 == slipRateMag);
     } // if/else
+#if !defined (NO_FAULT_OPENING)
   } else {
     // if in tension, then traction is zero.
     (*dLagrangeTpdt)[0] = -tractionTpdt[0];
     (*dLagrangeTpdt)[1] = -tractionTpdt[1];
     (*dLagrangeTpdt)[2] = -tractionTpdt[2];
   } // else
+#endif
 
   PetscLogFlops(22);
 } // _constrainSolnSpace3D

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc	2011-10-31 15:27:29 UTC (rev 19131)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc	2011-10-31 16:47:05 UTC (rev 19132)
@@ -330,7 +330,9 @@
 
     mu_f = a * asinh(sinhArg);
     friction = -mu_f * normalTraction + properties[p_cohesion];
-  } // if
+  } else {
+    friction = properties[p_cohesion];
+  } // if/else
 
   PetscLogFlops(11);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/SlipWeakening.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/SlipWeakening.cc	2011-10-31 15:27:29 UTC (rev 19131)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/SlipWeakening.cc	2011-10-31 16:47:05 UTC (rev 19132)
@@ -306,17 +306,11 @@
   assert(stateVars);
   assert(_SlipWeakening::numStateVars == numStateVars);
 
-  const PylithScalar tolerance = 1.0e-12;
-  if (slipRate > tolerance) {
-    const PylithScalar slipPrev = stateVars[s_slipPrev];
-
-    stateVars[s_slipPrev] = stateVars[s_slipCum];
-    stateVars[s_slipCum] += fabs(slip - slipPrev);
-  } else {
-    // Sliding has stopped, so reset state variables.
-    stateVars[s_slipPrev] = slip;
-    stateVars[s_slipCum] = 0.0;
-  } // else
+  // Don't reset state variables when sliding stops
+  // (SCEC dynamic rupture branch only).
+  const double slipPrev = stateVars[s_slipPrev];
+  stateVars[s_slipPrev] = stateVars[s_slipCum];
+  stateVars[s_slipCum] += fabs(slip - slipPrev);
 } // _updateStateVars
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/StaticFriction.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/StaticFriction.cc	2011-10-31 15:27:29 UTC (rev 19131)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/StaticFriction.cc	2011-10-31 16:47:05 UTC (rev 19132)
@@ -158,7 +158,7 @@
 
   const PylithScalar friction = (normalTraction <= 0.0) ?
     -properties[p_coef] * normalTraction + properties[p_cohesion]: 
-    0.0;
+    properties[p_cohesion];
 
   PetscLogFlops(2);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/TimeWeakening.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/TimeWeakening.cc	2011-10-31 15:27:29 UTC (rev 19131)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/TimeWeakening.cc	2011-10-31 16:47:05 UTC (rev 19132)
@@ -273,7 +273,9 @@
 	mu_f = properties[p_coefD];
       } // if/else
     friction = - mu_f * normalTraction + properties[p_cohesion];
-  } // if
+  } else {
+    friction = properties[p_cohesion];
+  } // if/else
 
   PetscLogFlops(6);
 
@@ -296,15 +298,10 @@
   assert(numStateVars);
   assert(_TimeWeakening::numStateVars == numStateVars);
 
-  const PylithScalar tolerance = 1.0e-12;
-  if (slipRate > tolerance) {
-    const PylithScalar dt = _dt;
-
-    stateVars[s_time] += dt;
-  } else {
-    stateVars[s_time] = 0.0;
-  } // else
-
+  // Don't reset state variables when sliding stops
+  // (SCEC dynamic rupture branch only).
+  const double dt = _dt;
+  stateVars[s_time] += dt;
 } // _updateStateVars
 
 



More information about the CIG-COMMITS mailing list