Newtonian Mechanics vector solution needed to find the range of forces (P) that satisfy Fnetx = 0

40 visualizaciones (últimos 30 días)
% Find vector of P values to keep block in equilibrium
ramp.jpg
% Variables Given
m = 100; % mass, kg
angle_ramp = 15; % degrees
angle_bar = 20; % degrees
g = 9.81; % gravity (m/s^2)
coeff = 0.3; % coefficient of static friction
% Calculations
P = [-600:0.1:600]; % vector of range for P (Newtons)
W = m*g;
Px = P*cosd(angle_bar); Py = sind(angle_bar);
N = W*cosd(angle_ramp)-Py;
Fx = W*sind(angle_ramp); Fs = coeff*N;
% Find P values for Fnet(x) = 0
if P > 0 % pulling force
Fnetx = Px - Fx - Fs;
else % pushing force or zero force applied
Fnetx = Px - Fx + Fs;
end
find(Fnetx==0)
ans = 1×0 empty double row vector

Respuesta aceptada

Torsten
Torsten el 12 de Nov. de 2025 a las 21:32
Editada: Torsten el 12 de Nov. de 2025 a las 22:08
Your search will never find a value for P for which Fnetx is exactly 0.
Better use "fsolve" to solve for the corresponding root of Fnetx(P) = 0.
P0 = 600;
P = fsolve(@fun,P0,optimset('Display','none'))
P = 516.3332
[res,Px,Py] = fun(P)
res = -7.9902e-08
Px = 485.1945
Py = 176.5964
P0 = -30;
P = fsolve(@fun,P0,optimset('Display','none'))
P = -36.2812
[res,Px,Py] = fun(P)
res = 3.4890e-10
Px = -34.0932
Py = -12.4089
function [Fnetx,Px,Py] = fun(P)
% Variables Given
m = 100; % mass, kg
angle_ramp = 15; % degrees
angle_bar = 20; % degrees
g = 9.81; % gravity (m/s^2)
coeff = 0.3; % coefficient of static friction
% Calculations
W = m*g;
Px = P*cosd(angle_bar); Py = P*sind(angle_bar);
N = W*cosd(angle_ramp)-Py;
Fx = W*sind(angle_ramp); Fs = coeff*N;
% Find P values for Fnet(x) = 0
if P > 0 % pulling force
Fnetx = Px - Fx - Fs;
else % pushing force or zero force applied
Fnetx = Px - Fx + Fs;
end
end
Or use
[~,idx] = min(Fnetx.^2);
P(idx)
at the end of your code to get an approximate value for P.

Más respuestas (2)

Doug Leaffer
Doug Leaffer el 12 de Nov. de 2025 a las 21:44
Thank you @Torsten
I found another MATLAB code solution which is accurate as I checked it in Excel using Goal Seek
=> Block remains in equilibrium for -36.28 ≤ P ≤ 516.33 N
  4 comentarios
Torsten
Torsten el 12 de Nov. de 2025 a las 22:13
Editada: Torsten el 12 de Nov. de 2025 a las 22:17
The block cannot be in equilibrium at P = +572.6 N, it would move up the ramp if P > 516.33 N
Yes, you made a mistake when specifying Py in your code. I corrected that (see below).
Still I cannot follow your argumentation concerning the range for P, but I'm not a physicist.

Iniciar sesión para comentar.


Paul
Paul el 13 de Nov. de 2025 a las 3:57
Here is an algebraic solution; I suspect one could do the whole thing symbolically and then sub the numbers at the end.
Note that my expression for Fnetx is different because, to my understanding, the relative motion resisted by the static friction depends on the sign of Px - Fx, not Px (nor P!) alone. That is, we need Px > Fx for the block to want to slide up the hill and Fx > Px for the block to want to slide down the hill. Comes up with the same solutions for the parameters for this problem.
Disclaimer: I haven't done statics in more time than I care to admit.
syms P real
m = 100; % mass, kg
angle_ramp = 15; % degrees
angle_bar = 20; % degrees
g = 9.81; % gravity (m/s^2)
coeff = 0.3; % coefficient of static friction
W = m*g;
Px = P*cosd(angle_bar); Py = P*sind(angle_bar);
N = W*cosd(angle_ramp) - Py;
Fx = W*sind(angle_ramp);
Fs = coeff*N;
Fnetx = Px - Fx - Fs*sign(Px-Fx);
figure
fplot(Fnetx,[-100,600]),grid
assume(Px-Fx > 0) % motion tends up the hill
Ppos = vpa(solve(Fnetx,P))
Ppos = 
516.33324748670646195665428956607
assume(Px-Fx < 0) % motion tends down the hill
Pneg = vpa(solve(Fnetx,P))
Pneg = 

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos


Versión

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by