[cig-commits] r16438 - in short/3D/PyLith/trunk: libsrc/friction unittests/libtests/friction/data
surendra at geodynamics.org
surendra at geodynamics.org
Mon Mar 22 21:02:55 PDT 2010
Author: surendra
Date: 2010-03-22 21:02:54 -0700 (Mon, 22 Mar 2010)
New Revision: 16438
Modified:
short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.cc
short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.hh
short/3D/PyLith/trunk/unittests/libtests/friction/data/SlipWeakeningData.cc
Log:
Added cohesion to SlipWeakening
Modified: short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.cc 2010-03-20 22:04:27 UTC (rev 16437)
+++ short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.cc 2010-03-23 04:02:54 UTC (rev 16438)
@@ -33,13 +33,14 @@
namespace _SlipWeakening {
// Number of physical properties.
- const int numProperties = 3;
+ const int numProperties = 4;
// Physical properties.
const pylith::materials::Metadata::ParamDescription properties[] = {
{ "static_coefficient", 1, pylith::topology::FieldBase::SCALAR },
{ "dynamic_coefficient", 1, pylith::topology::FieldBase::SCALAR },
{ "slip_weakening_parameter", 1, pylith::topology::FieldBase::SCALAR },
+ { "cohesion", 1, pylith::topology::FieldBase::SCALAR },
};
// Number of State Variables.
@@ -52,10 +53,11 @@
};
// Values expected in spatial database
- const int numDBProperties = 3;
+ const int numDBProperties = 4;
const char* dbProperties[] = { "static-coefficient"
"dynamic-coefficient"
"slip-weakening-parameter"
+ "cohesion"
};
const int numDBStateVars = 2;
@@ -73,6 +75,8 @@
pylith::friction::SlipWeakening::p_coefS + 1;
const int pylith::friction::SlipWeakening::p_d0 =
pylith::friction::SlipWeakening::p_coefD + 1;
+const int pylith::friction::SlipWeakening::p_cohesion =
+ pylith::friction::SlipWeakening::p_d0 + 1;
// Indices of database values (order must match dbProperties)
const int pylith::friction::SlipWeakening::db_coefS = 0;
@@ -80,6 +84,8 @@
pylith::friction::SlipWeakening::db_coefS + 1;
const int pylith::friction::SlipWeakening::db_d0 =
pylith::friction::SlipWeakening::db_coefD + 1;
+const int pylith::friction::SlipWeakening::db_cohesion =
+ pylith::friction::SlipWeakening::db_d0 + 1;
// Indices of state variables.
const int pylith::friction::SlipWeakening::s_slipCum = 0;
@@ -125,7 +131,8 @@
const double db_static = dbValues[db_coefS];
const double db_dynamic = dbValues[db_coefD];
const double db_do = dbValues[db_d0];
-
+ const double db_c = dbValues[db_cohesion];
+
if (db_static <= 0.0) {
std::ostringstream msg;
msg << "Spatial database returned nonpositive value for static coefficient "
@@ -153,6 +160,7 @@
propValues[p_coefS] = db_static;
propValues[p_coefD] = db_dynamic;
propValues[p_d0] = db_do;
+ propValues[p_cohesion] = db_c;
} // _dbToProperties
@@ -167,8 +175,10 @@
assert(nvalues == _SlipWeakening::numProperties);
const double lengthScale = _normalizer->lengthScale();
+ const double pressureScale = _normalizer->pressureScale();
values[p_d0] /= lengthScale;
+ values[p_cohesion] /= pressureScale;
} // _nondimProperties
// ----------------------------------------------------------------------
@@ -182,8 +192,10 @@
assert(nvalues == _SlipWeakening::numProperties);
const double lengthScale = _normalizer->lengthScale();
+ const double pressureScale = _normalizer->pressureScale();
values[p_d0] *= lengthScale;
+ values[p_cohesion] *= pressureScale;
} // _dimProperties
// ----------------------------------------------------------------------
@@ -264,10 +276,10 @@
} else {
mu_f = properties[p_coefD];
} // if/else
- friction = - mu_f * normalTraction;
+ friction = - mu_f * normalTraction + properties[p_cohesion];
} // if
- PetscLogFlops(5);
+ PetscLogFlops(6);
return friction;
} // _calcFriction
Modified: short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.hh 2010-03-20 22:04:27 UTC (rev 16437)
+++ short/3D/PyLith/trunk/libsrc/friction/SlipWeakening.hh 2010-03-23 04:02:54 UTC (rev 16438)
@@ -142,10 +142,12 @@
static const int p_coefS;
static const int p_coefD;
static const int p_d0;
+ static const int p_cohesion;
static const int db_coefS;
static const int db_coefD;
static const int db_d0;
+ static const int db_cohesion;
/// Indices for state variables in section and spatial database.
static const int s_slipCum;
Modified: short/3D/PyLith/trunk/unittests/libtests/friction/data/SlipWeakeningData.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/friction/data/SlipWeakeningData.cc 2010-03-20 22:04:27 UTC (rev 16437)
+++ short/3D/PyLith/trunk/unittests/libtests/friction/data/SlipWeakeningData.cc 2010-03-23 04:02:54 UTC (rev 16438)
@@ -14,15 +14,15 @@
const int pylith::friction::SlipWeakeningData::_numLocs = 2;
-const int pylith::friction::SlipWeakeningData::_numProperties = 3;
+const int pylith::friction::SlipWeakeningData::_numProperties = 4;
const int pylith::friction::SlipWeakeningData::_numStateVars = 2;
-const int pylith::friction::SlipWeakeningData::_numDBProperties = 3;
+const int pylith::friction::SlipWeakeningData::_numDBProperties = 4;
const int pylith::friction::SlipWeakeningData::_numDBStateVars = 2;
-const int pylith::friction::SlipWeakeningData::_numPropsVertex = 3;
+const int pylith::friction::SlipWeakeningData::_numPropsVertex = 4;
const int pylith::friction::SlipWeakeningData::_numVarsVertex = 2;
@@ -40,6 +40,7 @@
1,
1,
1,
+ 1,
};
const int pylith::friction::SlipWeakeningData::_numStateVarValues[] = {
@@ -51,6 +52,7 @@
"static-coefficient",
"dynamic-coefficient",
"slip-weakeneing-parameter",
+ "cohesion",
};
const char* pylith::friction::SlipWeakeningData::_dbStateVarValues[] = {
@@ -62,9 +64,11 @@
0.6,
0.5,
0.8,
+ 1000000,
0.6,
0.5,
0.4,
+ 1000000,
};
const double pylith::friction::SlipWeakeningData::_dbStateVars[] = {
@@ -78,9 +82,11 @@
0.6,
0.5,
0.8,
+ 1000000,
0.6,
0.5,
0.4,
+ 1000000,
};
const double pylith::friction::SlipWeakeningData::_stateVars[] = {
@@ -94,9 +100,11 @@
0.6,
0.5,
0.0008,
+ 0.000044444444,
0.6,
0.5,
0.0004,
+ 0.000044444444,
};
const double pylith::friction::SlipWeakeningData::_stateVarsNondim[] = {
@@ -107,8 +115,8 @@
};
const double pylith::friction::SlipWeakeningData::_friction[] = {
- 1.21,
- 1.15,
+ 1000001.21,
+ 1000001.15,
};
const double pylith::friction::SlipWeakeningData::_slip[] = {
More information about the CIG-COMMITS
mailing list