Skip to content
Snippets Groups Projects
Commit b75bb090 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Fix up RuinaFunction

parent 5dbefe66
Branches
No related tags found
No related merge requests found
...@@ -41,44 +41,25 @@ class RuinaFunction : public NiceFunction { ...@@ -41,44 +41,25 @@ class RuinaFunction : public NiceFunction {
h(h), h(h),
rho(exp(-(mu + compound_state) / a)) {} rho(exp(-(mu + compound_state) / a)) {}
/* // TODO: untested
If mu and sigma_n denote the coefficient of friction and the
normal stress, respectively, this function is given by
1/eta sigma_n r(max(eta id, rho)) + a rho + mu
with the constants a and b from Ruina's model and
r(beta) = beta (a (log beta - 1) + mu)
as well as
rho = exp(-mu/a)
*/
void virtual evaluate(double const &x, double &y) const { void virtual evaluate(double const &x, double &y) const {
assert(false);
double const arg = eta * x / h; double const arg = eta * x / h;
if (arg <= rho) { double const expstar = (arg == 0) ? 0 : arg * std::log(arg) - arg;
y = -std::log(rho); // TODO: We can write this out explicitly double const gamma =
return; normalStress * (mu + a * std::log(eta) + compound_state);
} y = a * normalStress * expstar + gamma * arg;
y = arg * (std::log(arg) - 1) - arg * std::log(rho) + rho - std::log(rho);
y *= coefficient * h * normalStress / eta; y *= coefficient * h * normalStress / eta;
} }
/*
(leaving some terms aside): with s > rho
1/eta d/dx [ a * (s log s - s) + mu s ] where s = eta x
= 1/eta [ a * (log (eta x) * eta) + eta mu ]
= a * log(eta x) + mu
*/
double virtual leftDifferential(double s) const { double virtual leftDifferential(double s) const {
double const arg = eta * s / h; double const arg = eta * s / h;
if (arg <= rho) if (arg == 0)
return 0; return 0;
return coefficient * normalStress * double const gamma =
(a * std::log(arg) + mu + compound_state); normalStress * (mu + a * std::log(eta) + compound_state);
return coefficient * (a * normalStress * std::log(arg) + gamma);
} }
/* see above */ /* see above */
...@@ -86,21 +67,12 @@ class RuinaFunction : public NiceFunction { ...@@ -86,21 +67,12 @@ class RuinaFunction : public NiceFunction {
return leftDifferential(s); return leftDifferential(s);
} }
/*
d/dx a * log(eta x) + mu
= a * 1/(eta x) * eta
= a/x
*/
double virtual second_deriv(double s) const { double virtual second_deriv(double s) const {
// includes the case eta * s = rho for which there is no second derivative return coefficient * a * normalStress / s;
if (eta * s / h <= rho)
return 0;
else
return coefficient * normalStress * a / s;
} }
double virtual regularity(double s) const { double virtual regularity(double s) const {
if (eta * s == rho) if (s == 0)
return std::numeric_limits<double>::infinity(); return std::numeric_limits<double>::infinity();
return std::abs(second_deriv(s)); return std::abs(second_deriv(s));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment