Friction Models
Model a block on a moving conveyor belt anchored to a wall by a spring, using different models for the friction force
. Compare positions and velocities for the different models. This model incorporates four types of friction: viscous, Coulomb, Stribeck, and static.
m = l = 1.;
beltv[t_] = .1;
spring[x_] = 1000.(l - x);sys := {m x''[t] == spring[x[t]] + friction[x'[t]], x[0] == 1, x'[0] == 0};viscous[v_] := -30.(v - beltv[t]);
friction[v_] := viscous[v];{pos1, vel1} = NDSolveValue[sys, {x, x'}, {t, 0, 2}];GraphicsRow[{Plot[{pos1[t]}, {t, 0, 1}, AxesLabel -> {"t", "x"}, PlotRange -> All], Plot[{vel1[t], beltv[t]}, {t, 0, 1}, AxesLabel -> {"t", "v"}, PlotRange -> All]}, ImageSize -> 500]coulomb[v_] := -25.Sign[v - beltv[t]];
friction[v_] := viscous[v] + coulomb[v];{pos2, vel2} = NDSolveValue[sys, {x, x'}, {t, 0, 20}];GraphicsRow[{Plot[{pos2[t]}, {t, 0, 1}, AxesLabel -> {"t", "x"}, PlotRange -> All], Plot[{vel2[t], beltv[t]}, {t, 0, 1}, AxesLabel -> {"t", "v"}, PlotRange -> All]}, ImageSize -> 500]stribeck[v_] := -.3Sign[v]Exp[-2Abs[v]];
friction[v_] := viscous[v] + coulomb[v] + stribeck[v];{pos3, vel3} = NDSolveValue[sys, {x, x'}, {t, 0, 20}];GraphicsRow[{Plot[{pos3[t]}, {t, 0, 1}, AxesLabel -> {"t", "x"}, PlotRange -> All], Plot[{vel3[t], beltv[t]}, {t, 0, 1}, AxesLabel -> {"t", "v"}, PlotRange -> All]}, ImageSize -> 500]Static friction holds the block in place until the spring force exceeds some value
, depending on the roughness of the surfaces:
friction[v_] := viscous[v] + coulomb[v] + stribeck[v];staticsys := {x''[t] == If[stuck[t] == 1, beltv'[t], spring[x[t]] + friction[x'[t]]], x[0] == 1, x'[0] == 0};μ = 100;
stick = WhenEvent[x'[t] == beltv[t], stuck[t] -> Boole[spring[x[t]]^2 < μ^2]];
slip = WhenEvent[spring[x[t]]^2 > μ^2, stuck[t] -> 0];{pos4, vel4} = NDSolveValue[{staticsys, stick, slip, stuck[0] == 0}, {x, x'}, {t, 0, 8}, DiscreteVariables -> stuck[t]];The block repeatedly sticks to the belt due to frictional forces and then slips back due to the spring force:
GraphicsRow[{Plot[{pos4[t]}, {t, 0, 8}, AxesLabel -> {"t", "x"}, PlotRange -> All], Plot[{vel4[t], beltv[t]}, {t, 0, 8}, AxesLabel -> {"t", "v"}, PlotRange -> All]}, ImageSize -> 500]Plot[{pos1[t], pos2[t], pos3[t], pos4[t]}, {t, 0, 2}, AxesLabel -> {"t", "x"}, PlotRange -> {0.9, 1.1}, PlotLegends -> {"viscous", "viscous+Coulomb", "viscous+Coulomb+Stribeck", "viscous+Coulomb+Stribeck+static"}, ImageSize -> 300]