You are on page 1of 6

Appendix

Bevel Gear
function SF = SafetyFactor_Bevel(P,b)

%Determine safety factor as a ratio of fatigue strength to fatigue stress


%based on chosen diametrical pitch, P, and face width, b, with constraints
%as described in the assignment. P is teeth/inch and b is inches. Assumes
%straight teeth.

%Geometry

N = 30; %Number of teeth. Given.


d = N ./ P; %[in]. Base diameter from equation 16.15a.
gamma = pi./4; %[rad]. Angle shown in figure 16.9 for identical gears.
d_av = d - b .* sin(gamma); %[in]. Average diameter from equation 16.18.

%Force Analysis

Power = 50; %[hp]. Power transmitted by gears. Given.


n = 5000; %[rpm]. Rotational speed of shaft. Given.
V_av = pi .* d_av .* n ./ 12; %[ft/min]. Velocity at average diameter from equation 16.19a.
F_t = 33000 .* Power ./ V_av; %[lbs]. Tangent force on the gear from equation 16.20a.

%Fatigue Stress Analysis

J = 0.234; %Geometry factor from figure 16.13 for both gears having 30 teeth.
K_v = sqrt((78 + sqrt(V_av))/78); %Velocity factor from line A in figure 15.24
K_o = 1; %Overload factor. from table 15.1 assuming uniform power and driven machinery.
K_m = 1.1; %Mounting factor from table 16.1 for both gears straddle-mounted assuming fairly rigid
mounting.
Stress = F_t .* P ./ (b .* J) .* K_v .* K_o .* K_m; %Fatigue stress from equation 15.17

%Fatigue Strength Analysis

H_B = 300; %Hardness of core material. Given.


K_B = 500; %Constant of proportionality for steel. (page 88)
S_u = K_B.*H_B; %[psi]. Ultimate tensile stress from equation 3.11
S_y = 1.05.*S_u - 30000; %[psi]. Yield tensile stress from equation 3.12
S_n_prime = 0.5 .* S_u; %[psi]. Footnote on table 8.1 for steel.
C_L = 1; %load factor for bending loads. page 616
if (P > 5)
C_G = 1;
elseif (P <= 5)
C_G = 0.85;
end %gradient factor. page 616
C_S = 0.7; %surface factor from table 8.13 for machined surface and 300 H_B.
k_R = 0.814; %reliability factor from table 15.3 for 99 percent reliability.
k_t = 1.0; %temperature factor due to ignoring temperature effects.
k_ms = 1.4; %mean stress factor for one-way bending.
Strength = S_n_prime .* C_L .* C_G .* C_S .* k_R .* k_t .* k_ms; %[psi]. Fatigue strength from
equation 15.18

%Safety Factor

SF = Strength ./ Stress; %page 617

function Bhn = Bevel_Surface_Hardness(P,b)

%Determine the surface hardness for the bevel gear that gives a safety
%factor of 2 for the constraints given in the assignment.

%Geometry
%for identical gear and pinion
N = 30; %Number of teeth on pinion. Given.
d = N ./ P; %[in]. Base diameter of pinion from
gamma = pi./4; %[rad]. Angle shown in figure 16.9 for identical gears.
d_av = d - b .* sin(gamma); %[in]. Average diameter from equation 16.18.

%Force Analysis

Power = 50; %[hp]. Power transmitted by gears. Given.


n = 5000; %[rpm]. Rotational speed of shaft. Given.
V_av = pi .* d_av .* n ./ 12; %[ft/min]. Velocity at average diameter from
equation 16.19a.
F_t = 33000 .* Power ./ V_av; %[lbs]. Tangent force on the gear from equation
16.20a.
SF = 2; %Safety factor. Given.
F_t_Safe = SF .* F_t; %[lbs]. Tangential force with safety factor considered.

%Surface Fatigue Stress Analysis

v = 0.3; %Poisson's ratio for steel from appendix C-1


E = 30 * 10^6; %[psi]. Modulus of elasticity for steel from appendix C-1
C_p = 0.564 .* sqrt(1 ./ (2 .* (1-v^2)./E)); %[sqrt(psi)]. Elastic
coefficient from equation 15.22
%v = v_p = v_g and E = E_p = E_g
C_p = 1.23 .* C_p; %Modification for bevel gears from page 664.
I = 0.067; %Geometry factor from figure 16.15 for both gears having 30 teeth.
K_v = sqrt((78 + sqrt(V_av))/78); %Velocity factor from line A in figure
15.24
K_o = 1; %Overload factor. from table 15.1 assuming uniform power and driven
machinery.
K_m = 1.1; %Mounting factor from table 16.1 for both gears straddle-mounted
assuming fairly rigid mounting.
Stress_Safe = C_p .* sqrt(F_t_Safe .* K_v .* K_o .* K_m ./ (b .* d_av .* I));
%[psi]. Surface fatigue stress with safety factor considered.

%Fatigue Strength Analysis


%determine Bhn to make fatigue strength equal to the fatigue stress with
%safety factor considered.

C_Li = 0.73; %Life factor from figure 15.27 for life of 9*10^9 cycles.
C_R = 1; %Reliability factor from table 15.6 for 99 percent reliability.
Bhn = (Stress_Safe ./ (C_Li .* C_R) + 10000) ./ 400;
%Brinell hardness number. Derived from table 15.5 and equation 15.25

function SafetyFactors = Iterate_Bevel_Safety(P,b)

%Determines the safety factor for multiple values of diametrical pitch, P,


%and face width, b, and displays them. Dependent on SafetyFactor_Bevel.m

N = 30; %Number of teeth. Given.


n = 1; %Loop index.
for i = 1:length(P)
d = N ./ P(i); %[in]. Base diameter from equation 16.15a.
L = d ./ sqrt(2); %[in]. Pitch cone length from figure 16.9 for identical
gears.
for k = 1:length(b)
if (b(k) <= 10./P(i) && b(k) <= L./3)
SafetyFactors(n,1) = P(i);
SafetyFactors(n,2) = b(k);
SafetyFactors(n,3) = SafetyFactor_Bevel(P(i),b(k));
n=n+1;
end
end
end %Check if the face width fits the standard defined on page 659 and, if
so,
%calculates the safety factor for that case.

%The output is a 3-column matrix where each row is a set of parameters.


%The first row is P
%Second row is b
%Third row is safety factor

Spur Gear

function SF = SafetyFactor_Spur(P,b)

%Determine safety factor as a ratio of fatigue strength to fatigue stress


%based on chosen diametrical pitch, P, and face width, b, with constraints
%as described in the assignment. P is teeth/inch and b is inches.

%Geometry

N = 30; %Given
d = N./P; %determine pitch diameter, d, from equation 15.3

%Force Analysis

Power = 50; %[hp]. Given.


n = 5000; %[rpm]. Rotation speed of the shaft. Given.
V = pi.*d.*n/12; %[ft/min]. Velocity at edge of gear. equation 15.13
F_t = 33000.*Power./V; %[lbs]. Tangential force on the gear. equation 15.14

%Fatigue Stress Analysis


J = 0.27; %Geometry factor. from figure 15.23 for N=30, 20 degree full-depth
teeth, no load sharing.
K_v = sqrt((78 + sqrt(V))/78); %Velocity factor from line A in figure 15.24
K_o = 1; %Overload factor. from table 15.1 assuming uniform power and driven
machinery.
if (b <= 2)
K_m = 1.3;
elseif (b <= 6)
K_m = 0.025.*b+1.25;
elseif (b <= 9)
K_m = 0.0333.*b+1.2;
elseif (b < 16)
K_m = 0.0429.*b+1.114;
elseif (b >= 16)
K_m = 1.8;
end %Mounting factor. from table 15.2 assuming accurate mountings.
Stress = F_t.*P./(b.*J).*K_v.*K_o.*K_m; %[psi]. Fatigue stress from equation
15.17

%Fatigue Strength Analysis

H_B = 300; %Hardness of core material. Given.


K_B = 500; %Constant of proportionality for steel. (page 88)
S_u = K_B.*H_B; %[psi]. Ultimate tensile stress from equation 3.11
S_y = 1.05.*S_u - 30000; %[psi]. Yield tensile stress from equation 3.12
S_n_prime = 0.5 .* S_u; %[psi]. Footnote on table 8.1 for steel.
C_L = 1; %load factor for bending loads. page 616
if (P > 5)
C_G = 1;
elseif (P <= 5)
C_G = 0.85;
end %gradient factor. page 616
C_S = 0.7; %surface factor from table 8.13 for machined surface and 300 H_B.
k_R = 0.814; %reliability factor from table 15.3 for 99 percent reliability.
k_t = 1.0; %temperature factor due to ignoring temperature effects.
k_ms = 1.4; %mean stress factor for one-way bending.
Strength = S_n_prime .* C_L .* C_G .* C_S .* k_R .* k_t .* k_ms; %[psi].
Fatigue strength from equation 15.18

%Safety Factor

SF = Strength ./ Stress; %page 617

function Bhn = Spur_Surface_Hardness(P,b)

%Determine the surface hardness for the spur gear that gives a safety
%factor of 2 for the constraints given in the assignment.

%Geometry

N_p = 30; %Number of teeth for pinion (on the shaft). Given.
N_g = 45; %Number of teeth for gear (off the shaft). Given.
d_p = N_p ./ P; %[in]. Diameter of pinion from equation 15.3
d_g = N_g ./ P; %[in]. Diameter of gear from equation 15.3
%Force Analysis

Power = 50; %[hp]. Given.


n_p = 5000; %[rpm]. Rotational speed of the pinion (shaft). Given.
V_p = pi .* d_p .* n_p ./ 12; %[ft/min]. Velocity at edge of pinion. Equation
15.13
F_t = 33000 .* Power ./ V_p; %[lbs]. Tangential force at the contact point.
Equation 15.14
SF = 2; %Safety factor. Given.
F_t_Safe = SF .* F_t; %[lbs]. Tangential force with safety factor considered.

%Surface Fatigue Stress Analysis

v = 0.3; %Poisson's ratio for steel from appendix C-1


E = 30 * 10^6; %[psi]. Modulus of elasticity for steel from appendix C-1
C_p = 0.564 .* sqrt(1 ./ (2 .* (1-v^2)./E)); %[sqrt(psi)]. Elastic
coefficient from equation 15.22
%v = v_p = v_g and E = E_p = E_g
phi = 20; %[degrees]. Pressure angle. Given.
phi_rad = phi .* pi ./ 180; %[rad]. Pressure angle in radians.
R = d_g ./ d_p; %Ratio of gear to pinion diameters. Page 622
I = sin(phi_rad) .* cos(phi_rad) ./ 2 .* R ./ (R+1); %Geometry factor from
equation 15.23
K_v = sqrt((78 + sqrt(V_p))/78); %Velocity factor from line A in figure
15.24
K_o = 1; %Overload factor. from table 15.1 assuming uniform power and driven
machinery.
if (b <= 2)
K_m = 1.3;
elseif (b <= 6)
K_m = 0.025.*b+1.25;
elseif (b <= 9)
K_m = 0.0333.*b+1.2;
elseif (b < 16)
K_m = 0.0429.*b+1.114;
elseif (b >= 16)
K_m = 1.8;
end %Mounting factor. from table 15.2 assuming accurate mountings.
Stress_Safe = C_p .* sqrt(F_t_Safe .* K_v .* K_o .* K_m ./ (b .* d_p .* I));
%[psi]. Surface fatigue stress with safety factor considered.

%Fatigue Strength Analysis


%determine Bhn to make fatigue strength equal to the fatigue stress with
%safety factor considered.

C_Li = 0.73; %Life factor from figure 15.27 for life of 9*10^9 cycles.
C_R = 1; %Reliability factor from table 15.6 for 99 percent reliability.
Bhn = (Stress_Safe ./ (C_Li .* C_R) + 10000) ./ 400;
%Brinell hardness number. Derived from table 15.5 and equation 15.25

function SafetyFactors = Iterate_Spur_Safety(P,b)


%Determines the safety factor for multiple values of diametrical pitch, P,
%and face width, b, and displays them. Dependent on SafetyFactor_Spur.m

n = 1; %Loop index.
for i = 1:length(P)
for k = 1:length(b)
if (9./P(i) < b(k) && b(k) < 14./P(i))
SafetyFactors(n,1) = P(i);
SafetyFactors(n,2) = b(k);
SafetyFactors(n,3) = SafetyFactor_Spur(P(i),b(k));
n=n+1;
end
end
end %Check if the face width fits the standard defined on page 599 and, if
so,
%calculates the safety factor for that case.

%The output is a 3-column matrix where each row is a set of parameters.


%The first row is P
%Second row is b
%Third row is safety factor

Filtering

function filtered = filtering(data,target,tolerance)


n = 1;
for k = 1:size(data,1)
if (abs(data(k,3)-target) <= tolerance)
filtered(n,1) = data(k,1);
filtered(n,2) = data(k,2);
filtered(n,3) = data(k,3);
n = n+1;
end
end
end

You might also like