Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
1
  • Loading branch information
Leahy committed Dec 8, 2017
1 parent 867173f commit 7f8c14f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 211 deletions.
185 changes: 0 additions & 185 deletions ME3227_FinalProject.asv

This file was deleted.

38 changes: 26 additions & 12 deletions ME3227_FinalProject.m
@@ -1,8 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ME 3227 Final Project
% This code allows the user to automatically calculate and visualize the
% required diameters if the design requirements change. The requirements that can be changed are the gear weight, the number of teeth, the pressure angle, and the diametric pitch.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Given Parameters:
% Shaft Material - AISI 4130 Q&T CD
E = 29*10^6; %psi (Young's Modulus)
sut = 118*10^3; %psi (ultimate stress)
sy = 102*10^3; %psi (yield stress)
sut = 118*10^3; %psi (ultimate strength)
sy = 102*10^3; %psi (yield strength)
p = 0.3; %(poisson's ratio)
ga_w = 4; %lbf - make as input value
ga_t = 50; %teeth number - input
Expand Down Expand Up @@ -49,27 +55,31 @@ c2z = 4.5*Fat - 3*c1z;
x = linspace(0,9,10);
for i=0:9
if i<(3)
q_xy(i+1) = 0;
M_xy(i+1) = 0;
EIdy_x(i+1) = -Fan/2*(i)^2+c1y;
EIy_x(i+1) = -Fan/6*(i)^3+c1y*i+c2y;
M_xz(i+1) = 0;
EIdz_x(i+1) = -Fat/2*(i)^2+c1z;
EIz_x(i+1) = -Fat/6*(i)^3+c1z*i+c2z;
elseif i>=3 && i<6
q_xy(i+1) = -Fan*(i)^-1 + Rby*(i-3)^(-1);
M_xy(i+1) = -Fan*i + Rby*(i-3);
EIdy_x(i+1) = -Fan/2*(i)^2+Rby/2*(i-3)^2+c1y;
EIy_x(i+1) = -Fan/6*(i)^3+Rby/6*(i-3)^3+c1y*i+c2y;
M_xz(i+1) = -Fat*i + Rbz*(i-3);
EIdz_x(i+1) = -Fat/2*(i)^2+Rbz/2*(i-3)^2+c1z;
EIz_x(i+1) = -Fat/6*(i)^3+Rbz/6*(i-3)^3+c1z*i+c2z;
elseif i>=6 && i<9
q_xy(i+1) = -Fan*i^-1+Rby*(i-3)^-1-Fcn*(i-6)^-1;
M_xy(i+1) = -Fan*i+Rby*(i-3)-Fcn*(i-6);
EIdy_x(i+1) = -Fan/2*(i)^2+Rby/2*(i-3)^2-Fcn/2*(i-6)^2+c1y;
EIy_x(i+1) = -Fan/6*(i)^3+Rby/6*(i-3)^3-Fcn/6*(i-6)^3+c1y*i+c2y;
M_xz(i+1) = -Fat*i+Rbz*(i-3)+Fct*(i-6);
EIdz_x(i+1) = -Fat/2*(i)^2+Rbz/2*(i-3)^2+Fct/2*(i-6)^2+c1z;
EIz_x(i+1) = -Fat/6*(i)^3+Rbz/6*(i-3)^3+Fct/6*(i-6)^3+c1z*i+c2z;
else
q_xy(i+1) = -Fan*i^-1 +Rby*(i-3)^-1-Fcn*(i-6)^-1+Rdy*(i-9)^-1;
M_xy(i+1) = -Fan*i +Rby*(i-3)-Fcn*(i-6)+Rdy*(i-9);
EIdy_x(i+1) = -Fan/2*(i)^2+Rby/2*(i-3)^2-Fcn/2*(i-6)^2+Rdy/2*(i-9)^2+c1y;
EIy_x(i+1) = -Fan/6*(i)^3+Rby/6*(i-3)^3-Fcn/6*(i-6)^3+Rdy/2*(i-9)^3+c1y*i+c2y;
Expand Down Expand Up @@ -123,26 +133,26 @@ theta_d = delta_prime(10);
% Diameter of the shaft due to slope at the bearings - Points B/D
D_b = ((theta_b*64)/(E*pi*bearing_slope))^(1/4);
D_d = ((theta_d*64)/(E*pi*bearing_slope))^(1/4);
D_shaft_1 = max(D_b,D_d);
d_shaft_1 = max(D_b,D_d);

% Diameter of the shaft due to slope at the gears - Points A/C
D_a = ((theta_a*64)/(E*pi*gear_slope))^(1/4);
D_c = ((theta_c*64)/(E*pi*gear_slope))^(1/4);
D_shaft_2 = max(D_a,D_c);
d_shaft_2 = max(D_a,D_c);

% Diameter of the shaft due to deflection at the gears - Points A/C
D_a1 = ((delta_a*64)/(E*pi*gear_def))^(1/4);
D_c1 = ((delta_c*64)/(E*pi*gear_def))^(1/4);
D_shaft_3 = max(D_a1,D_c1);
d_shaft_3 = max(D_a1,D_c1);

%Diameter of the shaft due to torsional wind-up
G = E/(2*(1+p));
D_shaft_4 = ((T*32)/(G*pi*dtheta_dx))^(1/4);
d_shaft_4 = ((T*32)/(G*pi*dtheta_dx))^(1/4);

%Fatigue/Failure Criteria - Modified Goodman
% Modified Endurance Limit
ka = (2.7*10^3)*sut^-0.265; %Cold-Drawn
kb = 0.879^-0.107; %diameter guess of 1 in
ka = (2.7)*(sut*10^-3)^-0.265; %Cold-Drawn
kb = 0.879*1^-0.107; %diameter guess of 1 in
kc = 1; %due to combined loading
kd = 1; %ambient temperature
ke = 0.814; % 99% reliability
Expand All @@ -159,7 +169,7 @@ q = 0.7; %From chart 6-20
qs = 0.77; % From chart 6-21
kt = 2.14; %given
kts = 3.0; %given
kf = q*(kt-1)+1;
kf_notch = q*(kt-1)+1;
kfs =q*(kts-1)+1;
syms d
sig_a = (kf*M_max*32)/(pi*d^3);
Expand All @@ -168,20 +178,24 @@ tau_a = 0;
tau_m = (16*kfs*T)/(pi*d^3);
sig_a_prime = sqrt((sig_a)^2+3*(tau_a)^2);
sig_m_prime = sqrt((sig_m)^2+3*(tau_m)^2);
n = 2; % design factor
n = 2; % design factor

%Modified Goodman
% (sig_a_prime/se)+(sig_m_prime/sut)=(1/n)
% ^ use this equation to derive diameter for d_shaft_5
d_shaft_5 = ((n^2*(((kf^2*M_max^2*32^2)/(pi^2*se^2))+((3*16^2*kfs^2*T^2)/(pi^2*sut^2)))))^(1/9);
d_shaft_5 = ((((32*M_max*kf_notch)/se)+(kfs*T*16*sqrt(3))/(sut))*(n/pi))^(1/3);


% Critical speed of shaft
% w_operating(shaft speed) *nd = w1;
g = 386.24; % in/sec^2
nd = 1.5;
ss1 = ss*0.1047;
ss1 = ss*0.1047; % convert to rad/in
w1 = ss1 * nd;
y1 = -EIy_x(1);
y2 = EIy_x(7);
d_shaft_6 = ((((w1)^2/g)*4096*(ga_w*y1^2+gc_w*y2^2))/((pi*E)*64*(ga_w*y1+gc_w*y2)))^(1/12);

% Determine required diameter for the shaft
d_shaft_total = [d_shaft_1,d_shaft_2,d_shaft_3,d_shaft_4,d_shaft_5,d_shaft_6];
d_shaft_required = max(d_shaft_total);
14 changes: 0 additions & 14 deletions parameters.m

This file was deleted.

0 comments on commit 7f8c14f

Please sign in to comment.