
A thin homogeneous mass rod m = 2 kg, length AB = 2 l = 1 m at point A is pivotally attached to a weightless slider moving in horizontal rough guides. At the initial moment of time, the rod is located vertically, then it is deflected from the vertical at a negligibly small angle and released without the initial velocity. It is necessary to make up the equations of motion of a given mechanical system and find the law of its motion. The friction coefficient between the slider and the guides is equal to f = 0.1.


and, according to (1), the friction force will also grow, which in this case is called the friction force of rest . This will continue until the friction force of rest reaches the value
- the speed of the bar.

![\ vec {q} = \ left [x (t), y (t), \ varphi (t) \ right] ^ T \ quad \ quad (3)](https://habrastorage.org/getpro/habr/post_images/15f/089/abf/15f089abf977cdc06e900ee132f2c5f2.gif)
- the angle of the rod to the vertical. Arming Maple'om# restart; # with(LinearAlgebra): # read `/home/maisvendoo/work/maplelibs/mechanics/lagrange.m`: # q := [x(t), y(t), phi(t)]: # A xA := q[1]: yA := q[2]: # xC := q[1] - L*sin(q[3]): yC := q[2] + L*cos(q[3]): # - A C rA := Vector([xA, yA]): rC := Vector([xC, yC]): # VectorCalculus[BasisFormat](false): vC := VectorCalculus[diff](rC, t): # J := m*(2*L)^2/12: # T := simplify(J*diff(q[3], t)^2/2 + m*DotProduct(vC, vC, conjugate=false)/2); 
# , Mg := Vector([0, -m*g]): # F_A := Vector([-F, 0]): # N_A := Vector([0, N]): # # Fk := [Mg, F_A, N_A]: # rk := [rC, rA, rA]: # 2 EQs := LagrangeEQs(T, q, rk, Fk): 




- some horizontal coordinate of the slider. Now we transform the system (4) - (6) taking into account equations (7) and (8) and find the friction force of rest and the normal reaction # link_eq1 := q[1] = A: # , - link_eq2 := q[2] = 0: # X Link_EQs := {link_eq1, link_eq2}: # Reduced_EQs := ReduceSystem(EQs, Link_EQs, q): solv_reduced := SolveAccelsReacts(Reduced_EQs, [q[3]], [F, N]): # for i from 1 to numelems(solv_reduced) do if has(solv_reduced[i], F) then F1 := rhs(solv_reduced[i]); end if; if has(solv_reduced[i], N) then N1 := rhs(solv_reduced[i]); end if; end do: 


# Slade_EQs := ReduceSystem(EQs, {link_eq2}, q): # for i from 1 to numelems(Slade_EQs) do Slade_EQs[i] := subs(F = f*N*signum(diff(q[1], t)), Slade_EQs[i]); end do: solv_slade := SolveAccelsReacts(Slade_EQs, [q[1], q[3]], [N]): # for i from 1 to numelems(solv_reduced) do if has(solv_slade[i], N) then N2 := rhs(solv_slade[i]); end if; end do: 
# Main_EQs := SolveAccelsReacts(EQs, q, []): # s := numelems(q): # # Y[1] -> x(t) # Y[2] -> y(t) # Y[3] -> phi(t) # Y[4] -> vx(t) - # Y[5] -> vy(t) - # Y[6] -> omega(t) - # for i from 1 to s do N2 := subs(diff(q[i], t) = y[i+s], N2); N2 := subs(q[i] = y[i], N2); N1 := subs(diff(q[i], t) = y[i+s], N1); N1 := subs(q[i] = y[i], N1); F1 := subs(diff(q[i], t) = y[i+s], F1); F1 := subs(q[i] = y[i], F1); end do: # for i from 1 to s do for j from 1 to s do eq := Main_EQs[j]; if has(eq, diff(diff(q[i], t), t)) then accel[i] := rhs(eq); end if; end do; for j from 1 to s do accel[i] := subs(diff(q[j], t) = y[j+s], accel[i]); accel[i] := subs(q[j] = y[j], accel[i]); end do: end do: # GetN1 := proc(mass, length, grav_accel, fric_coeff, Y) local react := subs(m = mass, L = length, g = grav_accel, f = fric_coeff, N1); local i; for i from 1 to numelems(Y) do react := subs(y[i] = Y[i], react); end do: return evalf(react); end proc: # GetN2 := proc(mass, length, grav_accel, fric_coeff, Y) local react := subs(m = mass, L = length, g = grav_accel, f = fric_coeff, N2); local i; for i from 1 to numelems(Y) do react := subs(y[i] = Y[i], react); end do: return evalf(react); end proc: # GetF1 := proc(mass, length, grav_accel, fric_coeff, Y) local react := subs(m = mass, L = length, g = grav_accel, f = fric_coeff, F1); local i; for i from 1 to numelems(Y) do react := subs(y[i] = Y[i], react); end do: return evalf(react); end proc: # GetAccel := proc(mass, length, grav_accel, fric_force, normal_react, Y) local acc; local i, j; for i from 1 to numelems(Y)/2 do acc[i] := subs(m = mass, L = length, g = grav_accel, F = fric_force, N = normal_react, accel[i]); end do: for i from 1 to numelems(Y)/2 do for j from 1 to numelems(Y) do acc[i] := evalf(subs(y[j] = Y[j], acc[i])); end do: end do: return [seq(acc[i], i=1..numelems(Y)/2)]; end proc: # m1 := 2.0; L1 := 0.5; f1 := 0.1; g1 := 9.81; # GetFricNormal := proc(mass, length, grav_accel, fric_coeff, Y) local F1, N1; # local eps_v := 1e-6; # # if abs(Y[4]) < eps_v then # F1 := GetF1(mass, length, grav_accel, fric_coeff, Y); N1 := GetN1(mass, length, grav_accel, fric_coeff, Y); # , # if abs(F1) > fric_coeff*abs(N1) then F1 := fric_coeff*abs(N1)*signum(F1); end if; else # , N1 := GetN2(mass, length, grav_accel, fric_coeff, Y); F1 := fric_coeff*abs(N1)*signum(Y[4]); end if; return [F1, N1]; end proc: # ( ) EQs_func := proc(N, t, Y, dYdt) local F1, N1; # local acc; # local ret; # ret := GetFricNormal(m1, L1, g1, f1, Y); F1 := ret[1]; N1 := ret[2]; # acc := GetAccel(m1, L1, g1, F1, N1, Y); dYdt[1] := Y[4]; dYdt[2] := Y[5]; dYdt[3] := Y[6]; dYdt[4] := acc[1]; dYdt[5] := acc[2]; dYdt[6] := acc[3]; end proc: # vars := [X(t), Y(t), Phi(t), Vx(t), Vy(t), Omega(t)]; # initc := Array([0.0, 0.0, 1e-4, 0.0, 0.0, 0.0]); # dsolv := dsolve(numeric, number = 6, procedure = EQs_func, start = 0, initial = initc, procvars = vars, output=listprocedure); # x := eval(X(t), dsolv); y := eval(Y(t), dsolv); phi := eval(Phi(t), dsolv); vx := eval(Vx(t), dsolv); vy := eval(Vy(t), dsolv); omega := eval(Omega(t), dsolv); # t0 := 0.0: t1 := 10.0: num_plots := 1000: dt := (t1 - t0)/num_plots: t := t0: i := 1: while t <= t1 do Time[i] := t; Y := [x(t), y(t), phi(t), vx(t), vy(t), omega(t)]; x1[i] := Y[1]; phi1[i] := Y[3]; fric[i] := GetFricNormal(m1, L1, g1, f1, Y)[1]; norm_react[i] := GetFricNormal(m1, L1, g1, f1, Y)[2]; lim_fric[i] := f1*abs(norm_react[i])*fric[i]/abs(fric[i]); t := t + dt; i := i + 1; end do: # G_x := [ [Time[k],x1[k]] $k=1..num_plots]: G_phi := [ [Time[k],phi1[k]] $k=1..num_plots]: G_fric := [ [Time[k],fric[k]] $k=1..num_plots]: G_norm_react := [ [Time[k],norm_react[k]] $k=1..num_plots]: G_lim_fric := [ [Time[k],lim_fric[k]] $k=1..num_plots]: # gr_opts := captionfont=['ROMAN', 16], axesfont=['ROMAN','ROMAN', 12],titlefont=['ROMAN', 14],gridlines=true: plot(G_x, gr_opts, view=[t0..t1, -1..1.0]); plot(G_phi, gr_opts, view=[t0..t1, 0.0..7.0]); plot({G_fric, G_lim_fric}, gr_opts, view=[t0..t1, -20..20]); plot(G_norm_react, gr_opts, view=[t0..t1, 0.0..200.0]); 



Source: https://habr.com/ru/post/245211/
All Articles