# Chapter6-Torision;Including Non-Circular Sections¶

## Ex3-pg187¶

In [1]:
import math
## initialization o variables
#find the shear force on each rivet and suitable diameter of rivets
p=5. ##cm
D=10. ##cm
d=2. ##mm
T= 10. ##kgm
ss= 785. ##kg/cm^2
## calculations
P= 2.*T/(math.pi*D**2)
P=P*5*100.
## results
print'%s %.2f %s'%('Force per rivet is ',P,' kg')
print'%s %.2f %s'%('\n The diameter of rivet, using a permissible stress of',ss,' kg/cm^2 = 0.227 cm')

Force per rivet is  31.83  kg

The diameter of rivet, using a permissible stress of 785.00  kg/cm^2 = 0.227 cm


## Ex4-pg189¶

In [2]:
import math
## initialization of variables
#what is maximum torque
D=5. ##cm
Y=3500. ##kg/cm^2

##part (a)
Ta=350. ##kg-m
tau=Y/2.
Ip=Ta*D*100./(2.*tau)
d1=Ip*32./math.pi
d1=(D**4-d1)**(1/4.)

##part (b)
Tb= 700. ##kg-m
Ip=Tb*D*100./(2.*tau)
d2=Ip*32./math.pi
d2=(D**4-d2)
T=tau*math.pi*(D**4)*2./(32.*D)
## results
print'%s %.2f %s'%('The maximum diameter corresponding to the case a is ',d1,' cm')
print'%s %.2f %s'%('\n Since the daimeter for the case (b) is coming out to be negative, \n The maximum torque transmitted is ',T/100,' kg-m')

The maximum diameter corresponding to the case a is  3.28  cm

Since the daimeter for the case (b) is coming out to be negative,
The maximum torque transmitted is  429.51  kg-m


## Ex5-pg190¶

In [3]:
import math
## initialization of variables
#find the weight of students
A=3 ##cm^2
E= 2*10**6 ##kg/cm^2
nu= 0.25
l= 60. ##m
L=150. ##cm
d=0.5 ##cm
dd=10 ##cm
D=180 ##cm
##calculations
K=(l*100./(A*E))+(L*D/2.*D*32.*2.*(1.+nu)/(E*math.pi*dd**4*2))
P=d/K
## results
print'%s %.2f %s'%('The weight of the students that entered the length is',P,' kg')

The weight of the students that entered the length is 196.31  kg


## Ex6-pg192¶

In [5]:
import math
## initialization of variables
#find the stress in the cable and the shaft
A=3. ##cm^2
E= 2.*10**6 ##kg/cm^2
nu= 0.25
l= 60. ##m
L=150. ##cm
d=0.5 ##cm
dd=10 ##cm
D=180. ##cm
##calculations
K=(l*100./(A*E))+(L*D/2.*D*32.*2.*(1+nu)/(E*math.pi*dd**4*2.))
P=d/K
Ts=P/A
fs=dd*D*P*32./(math.pi*4.*dd**4)

## results
print'%s %.2f %s'%('The tensile stress is ',Ts,'kg/cm^2')
print'%s %.2f %s'%('\n Maximum shear stress is ',fs,' kg/cm^2')

The tensile stress is  65.44 kg/cm^2

Maximum shear stress is  89.98  kg/cm^2


## Ex7-pg192¶

In [2]:
import math
## initialization of variables
#find the value of x and length of the suspension arm and D
F=500. ##kg
k=25. ##kg/cm
dd=15. ##cm
ss=3500. ##kg/cm^2
L=2. ##m
G=8.*10**5 ##kg/cm^2
## calculations
x=math.sqrt(math.pi*G/(25.*L*32.*100.))
d=x*16.*(F+dd*k)/(ss*math.pi)
x2=x*d**2.
## results
print'%s %.2f %s'%('d=',d,' cm')
print'%s %.2f %s'%('\n x=',x,' cm')

## Text: not exact

d= 5.05  cm

x= 3.96  cm


## Ex11-pg201¶

In [7]:
import math
##initialization of variables
#find the horse power
d=5. ##cm
rpm1=300. ##rpm
rpm2=30000. ##rpm
s=1000. ##kg/cm^2
##calcuations
T=(d/2.)*math.pi*10**2*s/32.
hp1= 2*math.pi*rpm1*T/4500.
hp2=hp1*100.
## results
print'%s %.2f %s %.2f %s'%('Horse power at 300 rpm and 30000 rpm are respecively ',hp1/10,''and  '',hp2/10,' h.p.')


Horse power at 300 rpm and 30000 rpm are respecively  1028.08  102808.38  h.p.


## Ex12-pg200¶

In [3]:
import math
## initialization of variables
#selct solid transmits and diameter required find
hp=300. ##h.p.
N1=30. ##rpm
N2=30000. ##rpm
fs=600. ##kg/cm^2
## calculations
T1=4500.*hp*100./(2.*math.pi*N1)
T2=T1/1000.
D1=16.*T1/(math.pi*fs)
D1=D1**(1/3.)
D2=16.*T2/(math.pi*fs)
D2=D2**(1/3.)
## results
print'%s %.2f %s %.2f %s '%('Diameters required are ',D1,''and '',D2,'cm')

print('wrong calculations in the text')

Diameters required are  18.25  1.83 cm
wrong calculations in the text


## Ex13-pg202¶

In [9]:
import math
## initialization of variables
#find the strain energy per unit volume stored and the energy if the lenght 5cm
d=10. ##cm
t =1. ##mm
T= 100. ##kg-m
L=5. ##m
G=8*10**5 ##kg/cm^2

##calculations
r=d/2.
fs=T*r*100./(r**2*2*math.pi*L*t*10**-1)
U=fs**2/(2*G)
U1=U*(math.pi*L*100.)
## results
print'%s %.2f %s'%('Energy per unit volume = ',U,' kg-cm/cm^3')
print'%s %.2f %s'%('\n Total strain energy= ',U1,' kg-cm')

Energy per unit volume =  0.25  kg-cm/cm^3

Total strain energy=  397.89  kg-cm


## Ex14-pg206¶

In [10]:
import math
##initialization of variables
#find the actual deflection of closely coiled comperssion spring
D=10. ##cm
d= 1. ##cm
n=20.
P=60. ##kg
G=8*10**5 ##kg/cm^2
##calculations
n=n-0.75*2
delta=P*n*math.pi*D**3*32./(4.*math.pi*G)
## results
print'%s %.2f %s'%('The deflection is ',delta,' cm')

The deflection is  11.10  cm


## Ex15-pg206¶

In [11]:
import math
##initialization of variables
#find the shear stress in the wire
D=10. ##cm
d= 1. ##cm
n=20.
P=60. ##kg
G=8*10**5 ##kg/cm^2
## calculations
m=D/d
fs=8.*P*D/(d**3*math.pi)
fs1=fs*(1+0.615/m+3./(4.*m-4.))
## results
print'%s %.2f %s %.2f %s '%('The shear stress with and without correction facor are \n respectively ',fs,''and  '',fs1,'kg/cm^2')

The shear stress with and without correction facor are
respectively  1527.89  1749.18 kg/cm^2


## Ex16-pg214¶

In [12]:
import math
##initialization of variables
#find their angles of twist and maximum stresses

## circle
D=1. ##unit diameter
Ip=D**4/32.
Zp=D**3/16.

##Square
s=math.sqrt(math.pi/4.)*D
Is=0.886*D**4/32.
Zs=0.7383*D**3/16.

##Rectangle
a=math.sqrt(math.pi/2.)*D
b=math.sqrt(math.pi/8.)*D
Ir=0.719*D**4/32.
Zr=0.616*D**3/16.

## Trianle
t=math.sqrt(math.pi/math.sqrt(3))*D
It=0.725*D**4/32.
Zt=0.622*D**3/16.

##Ellipse
A=D/math.sqrt(2)
B=D/math.sqrt(8)
Ie=A**3*B**3/(A**2+B**2)
Ze=A*B**2/2.

##Normalization
Is=Is/Ip
Ie=Ie/Ip
It=It/Ip
Ir=Ir/Ip

Zs=Zs/Zp
Ze=Ze/Zp
Zt=Zt/Zp
Zr=Zr/Zp
Ip=1.
Zp=1.
##results
print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('Z:: Circle:Square:Ellipse:Triangle:Rectangle = ',Zp,'' and '',Zs,'' and '',Ze,'' and '',Zt,' 'and '',Zr,'')

print'%s %.2f %s %.2f %s %.2f %s %.2f %s %.2f %s '%('\n I:: Circle:Square:Ellipse:Triangle:Rectangle = ',Ip,'' and  '',Is,'' and '',Ie,'' and '',It,'' and '',Ir,'')

Z:: Circle:Square:Ellipse:Triangle:Rectangle =  1.00  0.74  0.71  0.62  0.62

I:: Circle:Square:Ellipse:Triangle:Rectangle =  1.00  0.89  0.80  0.72  0.72


## Ex17-pg215¶

In [13]:
import math
##initialization of variables
#find the maximum torque that can be transmitted without yeilding

yp=2450. ##kg/cm^2
d=0.4 ##cm
ys=4200. ##kg/cm^2
sa=1.6 ##mm
sb=7. ##mm
## calculations
sa=sa/10.
sb=sb/10.
T1=yp*math.pi*d**3/16.
T2=ys*0.303*sa**2*sb
## results
print'%s %.2f %s'%('The maximum torque that can be transitted by the screw-driver is ',T2,' kg-cm')

The maximum torque that can be transitted by the screw-driver is  22.80  kg-cm


## Ex18-pg216¶

In [14]:
import math
##initialization of variables
#find the maximum stress in the walls
b=5. ##cm
h=10. ##cm
tL=3. ##mm
tl=1.5 ##mm
T=100. ##kg-cm
## calculations
tl=tl/10.
fs=T*100./(2.*b*h*tl)
## results
print'%s %.2f %s'%('The maximum stress is ',fs,' kg/cm^2')

The maximum stress is  666.67  kg/cm^2


## Ex19-pg216¶

In [15]:
import math
##initialization of variables
#compare its strength with hollow circular shaft of same thickness
b=5. ##cm
h=10. ##cm
tL=3. ##mm
tl=1.5 ##mm
T=100. ##kg-cm
## calculations
D=2.*(b+h)/math.pi
AR=b*h
AC=math.pi*D**2/4.
r=AC/AR
## results
print'%s %.2f %s'%('The ratio is 1:',r,'')

The ratio is 1: 1.43


## Ex20-pg217¶

In [5]:
import math
##initialization of variables
#find the value of maximum shear stress and angle of twist
G=8*10**5 ##kg/cm^2
##part (a)
T =20. ##kg-m
t1=0.9 ##cm
t2=0.5 ##cm
b1=6.8 ##cm
b2=14.2 ##cm
I0=1/3.*(2.*b1*t1**3+b2*t2**3)
Zt=I0/max(t1,t2)
fs=T*100./Zt
Phi=T*100./(G*I0)
print('part (a)')
print'%s %.2f %s %.5f %s '%('\n The maximum shear stress and twist rate are respectively \n ',fs,' kg/cm^2'and'',Phi, ' radians/cm ')

##part (b)
t1=1. ##cm
t2=1. ##cm
b1=10. ##cm
b2=9. ##cm
I0=1/3.*(b1*t1**3+b2*t2**3)
Zt=I0/max(t1,t2)
fs=T*100./Zt
Phi=T*100/(G*I0)
print('\n part (b)')
print'%s %.2f %s %.5f %s '%('\n The maximum shear stress and twist rate are respectively \n ',fs,'kg/cm^2'and '',Phi,'radians/cm ')

##part (c)
t1=0.76 ##cm
t2=0.48 ##cm
b1=8. ##cm
b2=14.04 ##cm
I0=(1/3.)*(2*b1*t1**3+b2*t2**3)
Zt=I0/max(t1,t2)
fs=T*100./Zt
Phi=T*100./(G*I0)
print('\n part (c)')
print'%s %.2f %s %.5f %s ' %('\n The maximum shear stress and twist rate are respectively \n ',fs,' kg/cm^2'and '',Phi,'radians/cm ')

##part(d)
t=1 ##cm
b=19 ##cm
I0=1/3.*t**3*b
Zt=I0/t
fs=T*100./Zt
Phi=T*100./(G*I0)
print('\n part (d)')
print'%s %.2f %s %.5f %s '%('\n The maximum shear stress and twist rate are respectively \n ',fs,' kg/cm^2'and '',Phi,'radians/cm ')

print('Twist rate: answers differ by a scale of 10. wrong answers in the text')

part (a)

The maximum shear stress and twist rate are respectively

part (b)

The maximum shear stress and twist rate are respectively

part (c)

The maximum shear stress and twist rate are respectively

part (d)

The maximum shear stress and twist rate are respectively
Twist rate: answers differ by a scale of 10. wrong answers in the text


## Ex21-pg221¶

In [17]:
import math
## initialization of variables
#caclualte Maximum +ve residual stress occurs at r and'radius
D=5. ##cm
d=2. ##cm
t_y=3000. ##kg/cm^2
## calculations
R=D/2.
r=d/2.
Tep=2.*math.pi*R**3*t_y/3.-math.pi*r**3.*t_y/6.
t_er=2*Tep/(math.pi*R**3)
t_er1=t_er*r/R
prs=t_y-t_er1
nrs=t_er-t_y
## results
print'%s %.2f %s %.2f %s '%('Maximum +ve residual stress occurs at ',r,' cm' and'radius and is equal to \n ',prs,' kg/cm^2')
print'%s %.2f %s %.2f %s '%('\n Maximum -ve residual stress occurs at ',R,' cm'and' radius and is equal to \n ',-nrs,' kg/cm^2')

Maximum +ve residual stress occurs at  1.00 radius and is equal to
1425.60  kg/cm^2

Maximum -ve residual stress occurs at  2.50  radius and is equal to
-936.00  kg/cm^2