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

[Cleanup] Rename: V_cutoff -> Vmin

parent 6b1bd618
No related branches found
No related tags found
No related merge requests found
...@@ -34,10 +34,10 @@ class FrictionPotential : public FrictionPotentialWrapper { ...@@ -34,10 +34,10 @@ class FrictionPotential : public FrictionPotentialWrapper {
double coefficientOfFriction(double V) const { double coefficientOfFriction(double V) const {
assert(V >= 0.0); assert(V >= 0.0);
if (V <= V_cutoff) if (V <= Vmin)
return 0.0; return 0.0;
return fd.a * (std::log(V) - logV_m); return fd.a * (std::log(V) - logVmin);
} }
double differential(double V) const { double differential(double V) const {
...@@ -46,7 +46,7 @@ class FrictionPotential : public FrictionPotentialWrapper { ...@@ -46,7 +46,7 @@ class FrictionPotential : public FrictionPotentialWrapper {
double second_deriv(double V) const { double second_deriv(double V) const {
assert(V >= 0); assert(V >= 0);
if (V <= V_cutoff) if (V <= Vmin)
return 0; return 0;
return weight * (-normalStress) * (fd.a / V); return weight * (-normalStress) * (fd.a / V);
...@@ -54,7 +54,7 @@ class FrictionPotential : public FrictionPotentialWrapper { ...@@ -54,7 +54,7 @@ class FrictionPotential : public FrictionPotentialWrapper {
double regularity(double V) const { double regularity(double V) const {
assert(V >= 0); assert(V >= 0);
if (std::abs(V - V_cutoff) < 1e-14) // TODO if (std::abs(V - Vmin) < 1e-14) // TODO
return std::numeric_limits<double>::infinity(); return std::numeric_limits<double>::infinity();
return std::abs(second_deriv(V)); return std::abs(second_deriv(V));
...@@ -63,16 +63,16 @@ class FrictionPotential : public FrictionPotentialWrapper { ...@@ -63,16 +63,16 @@ class FrictionPotential : public FrictionPotentialWrapper {
void updateLogState(double logState) { void updateLogState(double logState) {
double const tmp = double const tmp =
(fd.mu0 + fd.b * (logState + std::log(fd.V0 / fd.L))) / fd.a; (fd.mu0 + fd.b * (logState + std::log(fd.V0 / fd.L))) / fd.a;
logV_m = std::log(fd.V0) - tmp; logVmin = std::log(fd.V0) - tmp;
V_cutoff = fd.V0 / std::exp(tmp); Vmin = fd.V0 / std::exp(tmp);
} }
private: private:
FrictionData const fd; FrictionData const fd;
double const weight; double const weight;
double const normalStress; double const normalStress;
double logV_m; double logVmin;
double V_cutoff; // velocity at which mu falls short of mumin double Vmin;
}; };
class TrivialFunction : public FrictionPotentialWrapper { class TrivialFunction : public FrictionPotentialWrapper {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment