[cig-commits] r17036 - in short/3D/PyLith/trunk: libsrc/friction unittests/libtests/friction
brad at geodynamics.org
brad at geodynamics.org
Mon Jul 12 15:41:05 PDT 2010
Author: brad
Date: 2010-07-12 15:41:05 -0700 (Mon, 12 Jul 2010)
New Revision: 17036
Modified:
short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.cc
short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.hh
short/3D/PyLith/trunk/unittests/libtests/friction/TestTimeWeakening.cc
Log:
Renamed state variable in time-weakening for consistency with other fault constitutive models. Adjusted model to include instantaneous healing.
Modified: short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.cc 2010-07-10 14:59:34 UTC (rev 17035)
+++ short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.cc 2010-07-12 22:41:05 UTC (rev 17036)
@@ -48,7 +48,7 @@
// State Variables.
const pylith::materials::Metadata::ParamDescription stateVars[] = {
- { "Elapsed_time", 1, pylith::topology::FieldBase::SCALAR },
+ { "elapsed_time", 1, pylith::topology::FieldBase::SCALAR },
};
// Values expected in spatial database
@@ -60,7 +60,7 @@
};
const int numDBStateVars = 1;
- const char* dbStateVars[1] = { "Elapsed-time",
+ const char* dbStateVars[1] = { "elapsed-time",
};
} // _TimeWeakening
@@ -259,7 +259,7 @@
if (normalTraction <= 0.0) {
// if fault is in compression
if (stateVars[s_time] < properties[p_Tc]) {
- // if/else linear slip-weakening form of mu_f
+ // if/else linear time-weakening form of mu_f
mu_f = properties[p_coefS] -
(properties[p_coefS] - properties[p_coefD]) *
stateVars[s_time] / properties[p_Tc];
@@ -288,9 +288,13 @@
assert(0 != numStateVars);
assert(0 != numProperties);
- const double dt = _dt;
+ if (slipRate != 0.0) {
+ const double dt = _dt;
- stateVars[s_time] += dt;
+ stateVars[s_time] += dt;
+ } else {
+ stateVars[s_time] = 0.0;
+ } // else
} // _updateStateVars
Modified: short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.hh 2010-07-10 14:59:34 UTC (rev 17035)
+++ short/3D/PyLith/trunk/libsrc/friction/TimeWeakening.hh 2010-07-12 22:41:05 UTC (rev 17036)
@@ -12,7 +12,7 @@
/** @file libsrc/friction/TimeWeakening.hh
*
- * @brief C++ slip weakening fault constitutive model.
+ * @brief C++ time weakening fault constitutive model.
*/
#if !defined(pylith_friction_timeweakening_hh)
@@ -22,10 +22,10 @@
#include "FrictionModel.hh" // ISA FrictionModel
// TimeWeakening -------------------------------------------------------
-/** @brief C++ slip weakening fault constitutive model.
+/** @brief C++ time weakening fault constitutive model.
*
- * Friction is equal to the product of a coefficient of friction (function
- * of slip path length) and the normal traction.
+ * Friction is equal to the product of a coefficient of friction
+ * (function of time since slipping started) and the normal traction.
*/
class pylith::friction::TimeWeakening : public FrictionModel
Modified: short/3D/PyLith/trunk/unittests/libtests/friction/TestTimeWeakening.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/friction/TestTimeWeakening.cc 2010-07-10 14:59:34 UTC (rev 17035)
+++ short/3D/PyLith/trunk/unittests/libtests/friction/TestTimeWeakening.cc 2010-07-12 22:41:05 UTC (rev 17036)
@@ -59,7 +59,7 @@
CPPUNIT_ASSERT_EQUAL(1, model._metadata.numDBStateVars());
const char* const* names = model._metadata.dbStateVars();
- CPPUNIT_ASSERT_EQUAL(std::string("Elapsed-time"),
+ CPPUNIT_ASSERT_EQUAL(std::string("elapsed-time"),
std::string(names[0]));
} // testStateVarsMetadata
@@ -83,7 +83,7 @@
{ // testHasStateVar
TimeWeakening material;
- CPPUNIT_ASSERT(material.hasStateVar("Elapsed_time"));
+ CPPUNIT_ASSERT(material.hasStateVar("elapsed_time"));
CPPUNIT_ASSERT(!material.hasStateVar("aaa"));
} // testHasStateVar
More information about the CIG-COMMITS
mailing list