%%This program can be used to calculate the deameter of a shaft with two %%pulleys
%% Taking inputs for the variables of the pulleys and the shaft
clc a=42; %allowable shear stress
pi=3.14;
b=63; %allowable working stress
l= inputdlg('enter the span of the shaft l=');
d1= inputdlg('enter the diameter of the first pulley from the left d1(in m)=');
l1= inputdlg('enter the distance of the first pulley from the left l1(in m)=');
d1= inputdlg('enter the diameter of the second pulley from the left d2(in m)=');
l2= inputdlg('enter the distance of the second pulley from the right l2(in m)=');
Vc= inputdlg('enter the vertical load on first pulley Vc=');
Hc= inputdlg('enter the horizontal load on first pulley Hc=');
Vd= inputdlg('enter the vertical load on second pulley Vd=');
Hd= inputdlg('enter the horizontal load on second pulley Hd=');
%let RA and RB be the reactions at the bearing positions
%% For the vertical loading
RBV=((Vc*l1+Vd*(l-l2)/l))
fprintf('Vertical reaction at B=%4.2f N\n',RBV)
RAV=(Vc+Vd-RBV)
fprintf('Vertical reaction at A=%4.2f N\n',RAV)
%% For vertical bending moment
Mav=0; Mbv=0;
Mcv=RAV*l1;
fprintf('the vertical bending moment at C=%4.2f\n',Mcv)
Mdv=RBV*l2;
fprintf('the vertical bending moment at B=%4.2f\n',Mdv)
How can I solve this problem??
Best Answer