Dynamics Rotating Rod Problem
5 ビュー (過去 30 日間)
古いコメントを表示
My teacher would like for us to use the format I am using, however I cannot seem to get some of my equations and/or vectors correct. I am getting an output but it is not right. Does anyone know what I am missing or doing wrong?
clc, clear
% known values
m = 50.0 ; % mass of the rod in kg
g = 9.81 ; % acceleration due to gravity, m/s^2
L = 5.0 ; % length of the rod in meters
W = m*g ; % weight of the rod in Newtons
theta = 90*pi/180 ; % angle between the rod and the x-axis
Ia = (1/3)*m*L^2 ; % moment of inertia equation for point A
mu_s = [0.1, 0.2, 0.3] ; % coef of static friction
mu_k = [0.075, 0.15, 0.225] ; % coef of kinetic friction
syms a_Gx a_Gy alpha a_A Ay Ax
% vector equations
alpha_ = alpha*[0 0 1] ; % angular acceleration vector
rga_ = (L/2)*[cos(theta) sin(theta) 0] ; % position vector from A to rod center
A_ = [Ax Ay 0]; % reaction force at point A
W_ = -W*[0 1 0] ; % weight vector
a_G_ = [a_Gx a_Gy 0] ; % acceleration vector for point G
a_A_ = a_A*[1 0 0] ; % acceleration vector for point A
% system of equations
F_eq = A_ + W_ - m*a_G_ ; % sum of forces equation
M_eq = Ia*alpha_ - cross(-rga_,A_) ; % sum of moments alpha positive CCW
a_eq = cross(alpha_,rga_) - a_G_ ; % acceleration equation
sol = solve(F_eq(1), F_eq(2), M_eq, a_eq, Ay, Ax, a_Gx, a_Gy, a_A, alpha) ;
alpha = eval(sol.alpha)
a_Gx = eval(sol.a_Gx)
a_Gy = eval(sol.a_Gy)
a_A = eval(sol.a_A)
Ay = eval(sol.Ay)
Ax = eval(sol.Ax)

0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!