8.4 Oscillating 1D Systems: A Second Order ODE
265
If there is no external excitation force acting on the body, we have the equation
of motion
mu
+ μmg sign(u
) + kα
−1 tanh(αu) = 0 .
Let us simulate a situation where a body of mass 1 kg slides on a surface with
μ = 0.4, while attached to a spring with stiffness k = 1000 kg/s 2 . The initial
displacement of the body is 10 cm, and the α parameter in s(u) is set to 60 1/m.
Using the EulerCromer function from the osc_EC_general code, we can write a
function sliding_friction for solving this problem:
def sliding_friction():
from numpy import tanh, sign
f = lambda v: mu*m*g*sign(v)
alpha = 60.0
s = lambda u: k/alpha*tanh(alpha*u)
F = lambda t: 0
g = 9.81
mu = 0.4
m = 1
k = 1000
U_0 = 0.1
V_0 = 0
T = 2
dt = T/5000.
u, v, t = EulerCromer(f=f, s=s, F=F, m=m, T=T,
U_0=U_0, V_0=V_0, dt=dt)
plot_u(u, t)
Running the sliding_friction function gives us the results in Fig. 8.34 with
s(u) = kα −1 tanh(αu) (left) and the linearized version s(u) = ku (right).
Précédent

- 285/350

Suivant