close all
clear all



disp('Beam Calculations for Top and Bottom Cross Members');
disp(' ');

F = 1000;
L = 32;
b = 2;
h = 4;
t = 0.25;
E = 30E6;

disp(['Applied Force    = ' num2str(F) ' lbs']);
disp(['Length           = ' num2str(L) ' in']);
disp(['Tube width       = ' num2str(b) ' in']);
disp(['Tube height      = ' num2str(h) ' in']);
disp(['Tube thickness   = ' num2str(t) ' in']);
disp(['Material Modulus = ' num2str(E) ' psi']);

disp(' ');

[A,I,Mmax,Vmax,deltaMax,sigmaMaxBending,sigmaMaxShear] = SimplySupportedBeamCalcuations(F,L,b,h,t,E);

disp(['Cross sectional area   = ' num2str(A) ' in^2']);
disp(['2nd Moment of area     = ' num2str(I) ' in^4']);
disp(['Maximum Bending Moment = ' num2str(Mmax) ' in-lb']);
disp(['Maximum Shear Force    = ' num2str(Vmax) ' lbs']);
disp(['Maximum Deflection     = ' num2str(deltaMax) ' in']);
disp(['Maximum Stress due to Bending = ' num2str(sigmaMaxBending) ' psi']);
disp(['Maximum Stress due to Shear   = ' num2str(sigmaMaxShear) ' psi']);

disp(' ');
disp(' ');
disp(' ');


disp('Beam Calculations for Vertical Legs');
disp(' ');

F = 500;
L = 81-4;
b = 3;
h = 2;
t = 3/16;
E = 30E6;

disp(['Applied Force    = ' num2str(F) ' lbs']);
disp(['Length           = ' num2str(L) ' in']);
disp(['Tube width       = ' num2str(b) ' in']);
disp(['Tube height      = ' num2str(h) ' in']);
disp(['Tube thickness   = ' num2str(t) ' in']);
disp(['Material Modulus = ' num2str(E) ' psi']);

disp(' ');

[A,I,Mmax,Vmax,deltaMax,sigmaMaxBending,sigmaMaxShear] = SimplySupportedBeamCalcuations(F,L,b,h,t,E);

disp(['Cross sectional area   = ' num2str(A) ' in^2']);
disp(['2nd Moment of area     = ' num2str(I) ' in^4']);
disp(['Maximum Bending Moment = ' num2str(Mmax) ' in-lb']);
disp(['Maximum Shear Force    = ' num2str(Vmax) ' lbs']);
disp(['Maximum Deflection     = ' num2str(deltaMax) ' in']);
disp(['Maximum Stress due to Bending = ' num2str(sigmaMaxBending) ' psi']);
disp(['Maximum Stress due to Shear   = ' num2str(sigmaMaxShear) ' psi']);




disp(' ');
disp(' ');
disp(' ');


disp('Beam Calculations for Lift Bar');
disp(' ');

F = 1000;
L = 28;
b = 2;
h = 3;
t = 3/16;
E = 30E6;

disp(['Applied Force    = ' num2str(F) ' lbs']);
disp(['Length           = ' num2str(L) ' in']);
disp(['Tube width       = ' num2str(b) ' in']);
disp(['Tube height      = ' num2str(h) ' in']);
disp(['Tube thickness   = ' num2str(t) ' in']);
disp(['Material Modulus = ' num2str(E) ' psi']);

disp(' ');

[A,I,Mmax,Vmax,deltaMax,sigmaMaxBending,sigmaMaxShear] = SimplySupportedBeamCalcuations(F,L,b,h,t,E);

disp(['Cross sectional area   = ' num2str(A) ' in^2']);
disp(['2nd Moment of area     = ' num2str(I) ' in^4']);
disp(['Maximum Bending Moment = ' num2str(Mmax) ' in-lb']);
disp(['Maximum Shear Force    = ' num2str(Vmax) ' lbs']);
disp(['Maximum Deflection     = ' num2str(deltaMax) ' in']);
disp(['Maximum Stress due to Bending = ' num2str(sigmaMaxBending) ' psi']);
disp(['Maximum Stress due to Shear   = ' num2str(sigmaMaxShear) ' psi']);







