import math
#calculate The efficiency of the joint
t = 5/8.;## inch
d = 1.;## inch
p = 4.;## inches
f_t = 28.; ##tons/in^2
f_s = 20.; ##tons/in^2
f_b = 40.; ##tons/in^2
P_t = (p-d)*t*f_t;## tons
P_s = 2*2*0.25*math.pi*d**2 *f_s;## tons
P_b = 2*d*t*f_b;##tons
P = p*t*f_t;## tons
n = min(P_t,P_s,P_b)/P ;## efficiency
print'%s %.1f %s'%('The efficiency of the joint =',n,'f')
print'%s %.1f %s'%('or',n*100,'percentage')
import math
#calculate The efficiency of first joint with required conditions
t = 1/2.;## inches
d1= 7/8.;## inches
p1 = 5/2.;## inches
d2= 9/8.;## inches
p2 = 7/2.;## inches
f_t = 8.;## tons/in^2
f_s = 6.;## tons/in^2
f_b = 10.;## tons/in^2
P_t1 = (p1-d1)*t*f_t;## tons
P_s1 = 0.25*math.pi*d1**2 *f_s;## tons
P_b1 = d1*t*f_b;##tons
P1 = p1*t*f_t;## tons
n1 = min(P_t1,P_s1,P_b1)/P1 ;## efficiency
print'%s %.3f %s'%('The efficiency of first joint = ',n1,'')
print'%s %.1f %s'%('or =',n1*100,'percentage')
P_t2 = (p2-d2)*t*f_t;## tons
P_s2 = 0.25*math.pi*d2**2 *f_s;## tons
P_b2 = d2*t*f_b;##tons
P2 = p2*t*f_t;## tons
n2 = min(P_t2,P_s2,P_b2)/P2 ;## efficiency
print'%s %.3f %s'%('The efficiency of second joint = ',n2,'f')
print'%s %.1f %s'%('or= ',n2*100,'percentage')
if n2 > n1:
print(' The second joint, with its higher efficiency, is stronger');
else:
print(' The first joint, with its higher efficiency, is stronger');
import math
#calculate 'The efficiency of the joint
t = 3/8.;## inches
p2 = 7/2.;## inches
f_t = 11/2.;## tons/in^2
f_s = 5.;## tons/in^2
f_b = 12.;## tons/in^2
d = 1.2*math.sqrt(t);## inches
##d = 0.735, say 0.75 inches
d = 0.75;## inches
P_s = 0.25*math.pi*d**2 *f_s;## tons
P_b = d*t*f_b;##tons
P_t_limit = P_s;##tons
p_limit = P_s/(t*f_t) + d;## inches
##p_limit = 1.763, take p = 1.75
p = 1.75;## inches
n = (p-d)/p;## efficiency
print'%s %.1f %s'%('The efficiency of the joint = ',n*100,' percentage')
import math
#calculate Pitch and efficency
d = 7/8.;## inches
t = 1/2.;## inches
f_t = 6.;## tons/in^2
f_s = 5.;## tons/in^2
f_b = 10.;## tons/in^2
p_s = 2*0.25*math.pi*d**2*f_s;## tons
P_b = d*t*f_b;## tons
p_t_limit = 2*P_b/3 + d;## inches
n = (p_t_limit-d)/p_t_limit;## efficiency
print'%s %.3f %s'%('Pitch, p =',p_t_limit,' inches')
print'%s %.1f %s'%('Efficiency = ',n,' ')
print'%s %.d %s'%('or',n*100,' percentage');
##the answer is approximated in the textbook.
import math
#calculate Pitch and The efficiency of the joint
d = 6.;## feet
p = 180.;## lb/in^2
f = 6.;## tons
n = 70./100.;## efficiency
d1 = 1.;## inches
f_s = 5.;## tons/in^2
f_b = 10.;## tons/in^2
t = p*d/(2.*f*n);## inches
## t = 0.6889 inches, say 0.75 inches
t = 0.75;##inches
P_s = 2*0.25*math.pi*d1**2*f_s;## tons
P_b = d1*t*f_b;## tons
p_limit = 2*P_b/(t*f) + d1;## inches
##p_limit = 4.33 inches, make it 4 inches
p = round(p_limit);## inches
n1 = (p-d1)/p;## efficiency
print'%s %.2f %s'%('Pitch = ',p_limit,'inches')
print'%s %.d %s'%('make it',p,' inches.')
print'%s %.d %s'%(' The efficiency of the joint will be',n1*100,'percentage')
print'%s %.d %s'%('percentage aganist the assumed value of ',n*100,' percentage.')
import math
#calculate The number of rivets required and The efficiency of the joint and The actual stresses induce in the rivet and The tensile stress at section 11 ,22 33 44
t = 1./2.;## inches
a = 1./2.;## inches
P = 42.;## tons
d = 3/4.;## inches
f_t = 7.5;## tons/in^2
f_s = 6.;## tons/in^2
f_b = 12.;## tons/in^2
P_s = 2*0.25*math.pi*d**2 *f_s;## tons
P_b = d*t*f_b;## tons
n = P/min(P_s,P_b);
n = round(n+1);
b1 = P/(t*f_t) + d;## inches
b = round(b1);
e = (b-d)/b;## efficiency
f_s = (P/n)/(2*0.25*math.pi*d**2) ;## tons/in^2
f_b = (P/n)/(d*t);## tons/in^2
f1 = P/(a*(b-d));## tons/in^2
f2 = (P-(P/n))/((b-2*d)*t);## tons/in^2
f3 = (P-(3.*P/n))/((b-3.*d)*t);## tons/in^2
f4 = (P-(6.*P/n))/((b-4.*d)*t);## tons/in^2
print'%s %.d %s'%('The number of rivets required, n = ',n,'');
print'%s %.2f %s %.d %s'%(' The width of the flat required, b = ',b1,'inches'and' ',b,' inches');
print'%s %.2f %s '%(' The efficiency of the joint = ',e*100,' percentage');
print'%s %.2f %s %.2f %s'%(' The actual stresses induce in the rivet are, f_s = ',f_s,' tons/in^2' and ' f_b = ',f_b ,'tons/in^2');
print'%s %.3f %s'%(' The tensile stress at section 11, f1 = ',f1,'rons/in^2');
print'%s %.3f %s'%(' The tensile stress at section 22, f2 = ',f2,' rons/in^2');
print'%s %.3f %s'%(' The tensile stress at section 33, f3 = ',f3,' rons/in^2');
print'%s %.3f %s'%(' The tensile stress at section 44, f4 = ',f4,' rons/in^2');
#calculate The number of rivets required and The efficiency of the joint and The pull section at different points and The maximum possible pull which the flat will safely transmit
import math
b = 9.;## inches
t = 3./4.;## inches
f_t = 8.;## tons/in**2
f_s = 5.;## tons/in**2
f_b = 10.;## tons/in**2
d = 7/8.;## inches
P = (b-d)*t*f_t;## tons
P_s = 2.*0.25*math.pi*d**2 *f_s;## tons
P_b = d*t*f_b;## tons
n = P/min(P_s,P_b);
e = (b-d)/b;## efficiency
P1 = f_t*(b-d)*t;## tons
P2 = f_t*(b-2*d)*t+P_s;## tons
P3 = f_t*(b-3*d)*t+3*P_s;## tons
P4 = f_t*(b-3*d)*t+6*P_s;## tons
print'%s %.d %s'%('The number of rivets required, n = ',round(n+1),'')
print'%s %.1f %s'%(' The efficiency of the joint =',e*100,' percentage');
print'%s %.2f %s'%(' The pull at section 11, P1 = ',P1,' rons/in**2');
print'%s %.1f %s'%( 'The pull at section 22, P2 = ',P2,'rons/in**2');
print'%s %.2f %s'%(' The pull at section 33, P3 = ',P3,' rons/in**2');
print'%s %.2f %s'%(' The pull at section 44, P4 = ',P4,' rons/in**2');
if P1 == min(P1,P2,P3,P4) :
print'%s %.2f %s'%(' The maximum possible pull which the flat will safely transmit is P1 = ',P1,' tons/in^2 at section 11');
elif P2 == min(P1,P2,P3,P4):
print'%s %.1f %s'%(' The maximum possible pull which the flat will safely transmit is P2 = ',P2,' tons/in^2 at section 22');
elif P3 == min(P1,P2,P3,P4):
print'%s %.2f %s'%('The maximum possible pull which the flat will safely transmit is P3 = ',P3,' tons/in^2 at section 33');
else:
print'%s %.2f %s'%(' The maximum possible pull which the flat will safely transmit is P4 = ',P4,' tons/in^2 at section 44');
##there is a minute error in the answer given textbook.
import math
#calculate The number of rivets required
P = 150.; ##tons
t = 3./4.;## inches
d = 1.;## inches
f_s = 6.;## tons/in**2
f_b = 12.;## tons/in**2
P_s = 0.25*math.pi*d**2 *f_s;## tons
P_b = t*d*f_b;## tons
n = P/min(P_s,P_b);## no. of rivets required
print'%s %.2f %s %.d %s'%('The number of rivets required, n = ',n,', say ',round(n),'');
import math
#calculate The minimum pitch required
l = 50.;## feet
b = 4.;## feet
P = 3.;## tons per foot run
t = 1/2.;## inches
b1 = 4.;## inches
d1 = 4.;## inches
h1 = 1/2.;## inches
d = 7/8.;## inches
f_s = 6.;## tons/in**2
f_b = 12.;## tons/in**2
P_s = 2.*0.25*math.pi*d**2 *f_s;## tons
P_b = t*d*f_b;## tons
R = P_b;## tons
F = l*P*2./d1;## tons
p_min = R*(l-0.5*b1)/F ;## inches
print'%s %.2f %s %.d %s'%('The minimum pitch required is p = ',p_min,' inches, say ',p_min,' inches');
import math
#calculate The maximum shear intensity induced at any rivet
P = 2.4;## tons
e = 18.;## inches
n = 8.;##no. of rivets
d = 7/8.;## inches
h = 4.;## inches
M = P*e;## ton-inches
d1 = 2.;##
d2 = 6.;##
square_r_sum = h*((0.5*h)**2. + d2**2.) + h*((0.5*h)**2 + d1**2.);##
r = math.sqrt(40.);
F = M*r/square_r_sum;## tons
theta = math.atan(d2/d1)##radians
theta1 = theta*180./math.pi## degrees
V = (P/n) + F*math.cos(theta);## tons
H = F*math.sin(theta);## tons
R = math.sqrt(V**2 + H**2);## tons
f_s = R/(0.25*math.pi*d**2);## tons/in**2
print('The maximum shear intensity induced at any rivet is' )
print'%s %.2f %s'%('f_s = ',f_s,' tons/in**2');