Chapter No.8:Thin And Thick Cyclinders And Spheres

Example 8.8.1,Page No.322

In [1]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L=3000 #mm #Length
d1=1000 #mm #Internal diameter
t=15 #mm #Thickness
P=1.5 #N/mm**2 #Fluid Pressure
E=2*10**5 #n/mm**2 #Modulus of elasticity
mu=0.3 #Poissoin's ratio

#Calculations

#Hoop stress
f1=P*d1*(2*t)**-1 #N/mm**2

#Longitudinal Stress
f2=P*d1*(4*t)**-1 #N/mm**2

#Max shear stress
q_max=(f1-f2)*2**-1 #N/mm**2

#Diametrical Strain
#Let e1=dell_d*d**-1  .....................(1)
e1=(f1-mu*f2)*E**-1 

#Sub values in equation 1 and further simplifying we get
dell_d=e1*d1 #mm

#Longitudinal strain
#e2=dell_L*L**-1      ......................(2)
e2=(f2-mu*f1)*E**-1 

#Sub values in equation 2 and further simplifying we get
dell_L=e2*L #mm

#Change in Volume 
#Let Z=dell_V*V**-1      ................(3)
Z=2*e1+e2

#Sub values in equation 3 and further simplifying we get
dell_V=Z*pi*4**-1*d1**2*L

#Result
print"Max Intensity of shear stress",round(q_max,2),"N/mm**2"
print"Change in the Dimensions of the shell is:dell_d",round(dell_d,2),"mm"
print"                                        :dell_L",round(dell_L,2),"mm"
print"                                        :dell_V",round(dell_V,2),"mm**3"
Max Intensity of shear stress 12.5 N/mm**2
Change in the Dimensions of the shell is:dell_d 0.21 mm
                                        :dell_L 0.15 mm
                                        :dell_V 1119192.38 mm**3

Example 8.8.2,Page No.323

In [2]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L=2000 #mm #Length
d=200 #mm # diameter
t=10 #mm #Thickness
dell_V=25000 #mm**3 #Additional volume
E=2*10**5 #n/mm**2 #Modulus of elasticity
mu=0.3 #Poissoin's ratio

#Calculations

#Let p be the pressure developed

#Circumferential Stress

#f1=p*d*(2*t)**-1 #N/mm**2
#After sub values and further simplifying
#f1=10*p

#f1=p*d*(4*t)**-1 #N/mm**2
#After sub values and further simplifying
#f1=5*p

#Diameterical strain = Circumferential stress
#Let X=dell_d*d**-1     ................................(1)
#X=e1=(f1-mu*f2)*E**-1 
#After sub values and further simplifying
#e1=8.5*p*E**-1

#Longitudinal strain
#Let Y=dell_L*L**-1    ......................................(2)
#Y=e2=(f2-mu*f1)*E**-1 
#After sub values and further simplifying
#e2=2*p*E**-1

#Volumetric strain
#Let X=dell_V*V**-1    
#X=2*e1+e2
#After sub values and further simplifying
#X=19*p*E**-1
#After further simplifying we get
p=dell_V*(pi*4**-1*d**2*L)**-1*E*19**-1 #N/mm**2

#Hoop Stress
f1=p*d*(2*t)**-1

X=e1=8.5*p*E**-1
#Sub value of X in equation 1 we get
dell_d=8.5*p*E**-1*d

Y=e2=2*p*E**-1
#Sub value of Y in equation 2 we get
dell_L=2*p*E**-1*L

#Result
print"Pressure Developed is",round(p,2),"N/mm**2"
print"Hoop stress Developed is",round(f1,2),"N/mm**2"
print"Change in diameter is",round(dell_d,2),"mm"
print"Change in Length is",round(dell_L,2),"mm"
Pressure Developed is 4.19 N/mm**2
Hoop stress Developed is 41.88 N/mm**2
Change in diameter is 0.04 mm
Change in Length is 0.08 mm

Example 8.8.3,Page No.324

In [3]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d=750 #mm #Diameter of water supply pipes
h=50*10**3 #mm #Water head
sigma=20 #N/mm**2 #Permissible stress
rho=9810*10**-9 #N/mm**3

#Calculations

#Pressure of water
P=rho*h #N/mm**2

#Stress
#sigma=p*d*(2*t)**-1
#After further simplifying
t=P*d*(2*sigma)**-1 #mm 

#Result
print"Thickness of seamless pipe is",round(t,3),"mm"
Thickness of seamless pipe is 9.197 mm

Example 8.8.4,Page No.326

In [4]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d=2500 #mm #Diameter of riveted boiler
P=1 #N/mm**2 #Pressure
rho1=0.7 #Percent efficiency
rho2=0.4 #Circumferential joints
sigma=150 #N/mm**2 #Permissible stress

#Calculations

#Equating Bursting force to longitudinal joint strength ,we get
#p*d*L=rho1*2*t*L*sigma
#After rearranging and further simplifying we get
t=P*d*(2*sigma*rho1)**-1 #mm

#Considering Longitudinal force
#pi*d**2*4**-1*P=rho2*pi*d*t*sigma
#After rearranging and further simplifying we get
t2=P*d*(4*sigma*rho2)**-1

#Result
print"Thickness of plate required is",round(t,2),"mm"
Thickness of plate required is 11.9 mm

Example 8.8.5,Page No.326

In [5]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

#Boiler Dimensions
t=16 #mm #Thickness
p=2 #N/mm**2 #internal pressure
f=150 #N/mm**2 #Permissible stress
rho1=0.75 #Longitudinal joints
rho2=0.45 #circumferential joints

#Calculations

#Equating Bursting force to longitudinal joint strength ,we get
d1=rho1*2*t*f*p**-1 #mm

#Considering circumferential strength 
d2=4*rho2*t*f*p**-1 #mm

#Result
print"Largest diameter of Boiler is",round(d1,2),"mm"
Largest diameter of Boiler is 1800.0 mm

Example 8.8.6,Page No.329

In [6]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d=250 #mm #Diameter iron pipe
t=10 #mm #Thickness
d2=6 #mm #Diameter of steel
p=80 #N/mm**2 #stress
P=3 #N/mm**2 #Pressure
E_c=1*10**5 #N/mm**2
mu=0.3 #poissoin's ratio
E_s=2*10**5 #N/mm**2
n=1 #No.of wires

#Calculations

L=6 #mm #Length of cyclinder

#Force Exerted by steel wire at diameterical section
F=p*2*pi*d2**2*1*4**-1 #N

#Initial stress in cyclinder
f_c=F*(2*t*d2)**-1 #N/mm**2

#LEt due to fluid pressure alone stresses developed in steel wire be F_w and in cyclinder f1 and f2
f2=P*d*(4*t)**-1 #N/mm**2

#Considering the equilibrium of half the cyclinder, 6mm long we get
#F_w*2*pi*4**-1*d2**2*n+f1*2*t*d2=P*d*d2
#After further simplifying we get
#F_w+2.122*f1=79.58        . ......................................(1)

#Equating strain in wire to circumferential strain in cyclinder 
#F_w=(f1-mu*f2)*E_s*E_c**-1 #N/mm**2
#After further simplifying we get
#F_w=2*f1-11.25    ....................................(2)

#Sub in equation in1 we get
f1=(79.58+11.25)*(4.122)**-1 #N/mm**2
F_w=2*f1-11.25  #N/mm**2

#Final stresses
#1) In steel Wire
sigma=F_w+p #N/mm**2

#2) In Cyclinder
sigma2=f1-f_c

#Result
print"Final Stresses developed in:cyclinder is",round(sigma,2),"N/mm**2"
print"                           :Steel is",round(sigma2,2),"N/mm**2"   
Final Stresses developed in:cyclinder is 112.82 N/mm**2
                           :Steel is -15.66 N/mm**2

Example 8.8.7,Page No.332

In [7]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d=750 #mm #Diameter of shell
t=8 #mm #THickness
p=2.5 #N/mm**2
E=2*10**5 #N/mm**2
mu=0.25 #Poissoin's ratio

#Calculations

#Hoop stress
f1=f2=p*d*(4*t)**-1 #N/mm**2

#Change in Diameter
dell_d=d*p*d*(1-mu)*(4*t*E)**-1 #mm

#Change in Volume
dell_V=3*p*d*(1-mu)*(4*t*E)**-1*pi*6**-1*d**3

#Answer for Change in diameter is incorrect in book

#Result
print"Stress introduced is",round(f1,2),"N/mm**2"
print"Change in Diameter is",round(dell_d,2),"N/mm**2"
print"Change in Volume is",round(dell_V,2),"mm**3"
Stress introduced is 58.59 N/mm**2
Change in Diameter is 0.16 N/mm**2
Change in Volume is 145608.33 mm**3

Example 8.8.8,Page No.333

In [8]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d=600 #mm #Diameter of sherical shell
t=10 #mm #Thickness
f=80 #N/mm**2 #Permissible stress
rho=0.75 #Efficiency joint

#Calculations

#Max Pressure
p=f*4*t*rho*d**-1 #N/mm**2

#Result
print"Max Pressure is",round(p,2),"N/mm**2"
Max Pressure is 4.0 N/mm**2

Example 8.8.9,Page No.333

In [9]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L=1000 #mm #Length of shell
d=200 #mm #Diameter
t=6 #mm #Thickness
p=1.5 #N/mm**2 #Internal Pressure
E=2*10**5 #N/mm**2
mu=0.25 #Poissoin's Ratio

#Calculations

#Change in Volume of sphere
dell_V_s=3*p*d*(1-mu)*(4*t*E)**-1*pi*6**-1*d**3

#Hoop stress
f1=p*d*(2*t)**-1 #N/mm**2

#Longitudinal stress
f2=p*d*(4*t)**-1 #N/mm**2

#Principal strain
e1=(f1-mu*f2)*E**-1
e2=(f2-mu*f1)*E**-1

V_c=1000 #mm**3

#Change in Volume of cyclinder
dell_V_c=(2*e1+e2)*pi*4**-1*d**2*L

#Total Change in Diameter
dell_V=dell_V_s+dell_V_c #mm**3

#Result
print"Change in Volume is",round(dell_V,2),"mm**3"
Change in Volume is 8443.03 mm**3

Example 8.8.10,Page No.337

In [10]:
import math
from math import sin, cos, tan, pi, radians
import matplotlib.pyplot as plt

#Initilization of Variables

d1=400 #mm #Internal Diameter
t=100 #mm #Thickness
p=80 #N/mm**2 #Fluid pressure


#Calculations

#Internal Radius
r1=d1*2**-1 #mm

#Outer Radius
r_o=r1+t #mm

p1=80 #N/mm**2
p2=0

#Now From Lame's Euation
#p_x=b*(x**2)**-1-a
#at x=200 #mm 
p_x=80 #N/mm**2
#80=b*(200**2)**-1-a     ..........................(1)

#at x=300 #mm
#p_x2=0
#0=b*(300**2)**-1-a       ...........................(2)

#Sub equation 2 from 1
#80=b*(200**2)**-1-b*(300**2)**-1
#After Further simplifying we get
b=(50000)**-1*(200**2*300**2*80)

#From equation 2 we get
a=b*(300**2)**-1

#Variation of radial pressure p_x;
#p_x=b*(x**2)**-1-a
#After sub values and further simplifying we get

#Radial pressure Variation
#At 
x=200 #mm
p_x=b*(x**2)**-1-a #N/mm**2

#At
x2=250 #mm
p_x2=b*(x2**2)**-1-a #N/mm**2

#At 
x3=300 #mm
p_x3=b*(x3**2)**-1-a #N/mm**2


#Hoop stress Distribution
#Variation of F_x

#At 
x=200 #mm
F_x=b*(x**2)**-1+a #N/mm**2

#At
x2=250 #mm
F_x2=b*(x2**2)**-1+a #N/mm**2

#At
x3=300 #mm
F_x3=b*(x3**2)**-1+a #N/mm**2

#Result
print"Max Hoop stress is",round(F_x,2),"N/mm**2"
print"Min Hoop stress is",round(F_x3,2),"N/mm**2"
print"Plot of Hoop stress"

#Plotting Variation of hoop stress

X1=[x,x2,x3]
Y1=[p_x,p_x2,p_x3]
Y2=[-F_x,-F_x2,-F_x3]
Z1=[0,0,0]
plt.plot(X1,Y1,X1,Y2,X1,Z1)
plt.xlabel("Length x in mm")
plt.ylabel("Radial Stress Distribution & Hoop Stress Distribution in N/mm**2")
plt.show()
Max Hoop stress is 208.0 N/mm**2
Min Hoop stress is 128.0 N/mm**2
Plot of Hoop stress

Example 8.8.11,Page No.338

In [11]:
import math
from math import sin, cos, tan, pi, radians
import matplotlib.pyplot as plt

#Initilization of Variables

d_o=300 #mm #Outside diameter 
d2=200 #mm #Internal Diameter
p=14 #N/mm**2 #internal Fluid pressure
t=50 #mm #Thickness
r_o=150 #mm #Outside Diameter
r2=100 #mm #Internal Diameter

#Calculations

#From Lame's Equation
#p_x=b*(x**2)**-1-a #N/mm**2    ...................(1)
#F_x=b*(x**2)**-1+a #N/mm**2   ...................(2)

#At 
x=r2=100 #mm
p_x=14 #N/mm**2

#Sub value of p_x in equation 1 we get
#14=(100)**-1*b-a    ............................(3)

#At
x2=r_o=150 #mm
p_x2=0 #N/mm**2

#Sub value in equation 1 we get
#0=b*(150**2)**-1-a   ......................(4)

#From Equations 3 and 4 we get
#14=b*(100**2)**-1-b*(100**2)**-1
#After sub values and further simplifying we get
b=14*100**2*150**2*(150**2-100**2)**-1

#From equation 4 we get
a=b*(150**2)**-1

#Hoop Stress
#F_x=b*(x**2)**-1+a #N/mm**2

#At 
x=100 #mm
F_x=b*(x**2)**-1+a #N/mm**2

#At
x2=125 #mm
F_x2=b*(x2**2)**-1+a #N/mm**2

#At
x3=150 #mm
F_x3=b*(x3**2)**-1+a #N/mm**2

#If thin Cyclindrical shell theory is used,hoop stress is uniform and is given by
F=p*d2*(2*t)**-1 #N/mm**2

#Percentage error in estimating max hoop tension
E=(F_x-F)*F_x**-1*100 #%

#Result
print"Max Hoop Stress Developed in the cross-section is",round(F,2),"N/mm**2"
print"Plot of Variation of hoop stress"

#Plotting Variation of hoop stress

X1=[x,x2,x3]
Y1=[F_x,F_x2,F_x3]
Z1=[0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in mm")
plt.ylabel("Radial Stress Distribution & Hoop Stress Distribution in N/mm**2")
plt.show()
Max Hoop Stress Developed in the cross-section is 28.0 N/mm**2
Plot of Variation of hoop stress

Example 8.8.12,Page No.339

In [12]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d_o=300 #mm #Outside diameter 
d2=200 #mm #Internal Diameter
p=12 #N/mm**2 #internal Fluid pressure
F_max=16 #N/mm**2 #Tensile stress
r_o=150 #mm #Outside Diameter
r2=100 #mm #Internal Diameter

#Calculations

#Let p_o be the External Pressure applied.
#From LLame's theorem
#p_x=b*(x**2)**-1-a   ..............(1)
#F_x=b*(x**2)**-1+a   ...........................(2)

#Now At
x=100 #mm
p_x=12 #N/mm**2
#sub in equation 1 we get
#12=b*(100**2)**-1-a    . ..................(3)

#The Max Hoop stress occurs at least value of x where
x=r1=100 #mm
#16=b*(100**2)**-1+a      .......................(4)

#From Equations 1 and 2 we get
#28=b*(100**2)**-1+b*(100**2)**-1
#After furhter Simplifying we get
b=28*100**2*2**-1

#sub in equation 1 we get
a=-(12-(b*(100**2)**-1))

#Thus At
x2=150 #mm
p_o=b*(x2**2)**-1-a

#Result
print"Minimum External applied is",round(p_o,2),"N/mm**2"
Minimum External applied is 4.22 N/mm**2

Example 8.8.13,Page No.340

In [13]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d1=160 #mm #Internal Diameter 
r1=80 #mm #External Diameter
p1=40 #N/mm**2 #Internal Diameter
P_max=120 #N/mm**2 #Allowable stress

#Calculations

#From Lame's Equation we have
#p_x=b*(x**2)**-1-a       ..........................(1)
#F_x=b*(x**2)**-1+a      ...........................(2)

#At 
x=r1=80 #N/mm**2 
#Sub in equation 1 we get
#120=b*(80**2)**-1+a     ........................(3)

#The hoop tension at inner edge is max stress
#Hence
#120=b*(80**2)**-1+a    .............................(4)

#From Equation 3 and 4 we get
b=160*80**2*2**-1 

#Sub in equation 3 we get
a=-(40-(b*(80**2)**-1))

#Let External radius be r_o.Since at External Surface is Zero,we get
#0=b*(r_o)**-1-a
#After Further simplifying we get
r_o=(b*a**-1)**0.5

#Thickness of Cyclinder 
t=r_o-r1 #mm

#Result
print"Thickness Required is",round(t,2),"mm"
Thickness Required is 33.14 mm

Example 8.8.14,Page No.341

In [14]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d_o=300 #mm #Outside diameter 
d1=180 #mm #Internal Diameter
p=12 #N/mm**2 #internal Fluid pressure
p_o=6 #N/mm**2 #External Pressure
r_o=150 #mm #Outside Diameter
r=90 #mm #Internal Diameter


#Calculations

#From Lame's Equation we have
#p_x=b*(x**2)**-1-a       ..........................(1)
#F_x=b*(x**2)**-1+a      ...........................(2)

#At 
x=r1=90 #N/mm**2 
p=42 #N/mm**2
#Sub in equation 1 we get
#42=b*(90**2)**-1-a       ..............................(3)

#At 
x=r_o=150 #mm
p2=6 #N/mm**2
#sub in equation 1 we get
#6=b*(150**2)**-1-a   ..............................(4)

#From equations 3 and 4  weget
#36=b*(90**2)**-1-b2(150**2)**-1
#After further simplifying we get
b=36*90**2*150**2*(150**2-90**2)**-1

#Sub value of b in equation 4 we get
a=b*(150**2)**-1-p_o

#At 
x=r1=90 #mm
F_x=b*(x**2)**-1+a #N/mm**2

#At 
x2=r_o=150 #mm 
F_x2=b*(x2**2)**-1+a  #N/mm**2

#Now if External pressure is doubled i.e p_o2=12 #N/mm**2 We have
p_o2=12 #N/mm**2
#sub in equation 4 we get
#12=b2*(150**2)**-1-a2                    ..........................(5)

#Max Hoop stress is to be 70.5 #N/mm**2,which occurs at x=r1=90 #mm
#Sub in equation 4 we get
#70.5=b*(90**2)**-1+a2           ................................(6)

#Adding equation 5 and 6
#82.5=b2*(150**2)**-1+b*(90**2)**-1
#After furhter simplifying we get
b2=82.5*150**2*90**2*(150**2+90**2)**-1

#Sub in equation 5 we get
a2=b2*(150**2)**-1-12 

#If p_i is the internal pressure required then from Lame's theorem
p_i=b2*(r1**2)**-1-a2

#Result
print"Stresses int the material are:F_x",round(F_x,2),"N/mm**2"
print"                             :F_x2",round(F_x2,2),"N/mm**2"
print"Internal Pressure that can be maintained is",round(p_i,2),"N/mm**2"
Stresses int the material are:F_x 70.5 N/mm**2
                             :F_x2 34.5 N/mm**2
Internal Pressure that can be maintained is 50.82 N/mm**2

Example 8.8.15,Page No.344

In [15]:
import math
from math import sin, cos, tan, pi, radians
import matplotlib.pyplot as plt

#Initilization of Variables

r1=200 #mm #Inner Radius
r2=250 #mm #Radius at common surface
r3=300 #mm #Outer radius
p=6 #N/mm**2 #Inital pressure
p2=80 #N/mm**2 #Pressure

#Calculations

#Inner Cyclinder:

#From Lame's Equation we have
#p_x=b*(x**2)**-1-a       ..........................(1)
#F_x=b*(x**2)**-1+a      ...........................(2)

#At 
x=r1=200 #mm
p_x=0
#0=b1*(250**2)**-1-a1   .................(3)

#At x=r2=250 #mm
p_x2=6 #N/mm**2
#6=b1*(250**2)-a1    ...................(4)

#From Equation 3 and 4 we get
b1=6*200**2*250**2*(200**2-250**2)**-1

#From equation 3 we get
a1=b1*(200**2)**-1

F_200=b1*(200**2)**-1+a1
F_250=b1*(250**2)**-1+a1

#For outer cyclinder 
#From Lame's Equation we have
#p_x2=b2*(x**2)**-1-a2       ..........................(5)
#F_x2=b2*(x**2)**-1+a2      ...........................(6)


#At 
x2=r2=250 #mm
p_x2=6 #N/mm**2
#6=b2*(250**2)**-1-a2     ...........................(7)      

#At
x3=300 #mm
#p_x2=0
#0=b2**2*(300**2)**-1-a2     .................................(8)

#from equation 7 and 8 we get
b2=6*250**2*300**2*(300**2-250**2)**-1

#sub in equation 8 we get
a2=b2*(300**2)**-1

F_250_2=b2*(250**2)**-1+a2
F_300_2=b2*(300**2)**-1+a2

#When Fluid is admitted
#Let Lame's equation be
#p_x3=b3*(x**2)**-1-a3       ..........................(5)
#F_x3=b3*(x**2)**-1+a3      ...........................(6)


#At x=200
p_x3=80 #N/mm**2
#80=b3*(200**2)**-1-a3    ................................(7)

#At x=300 #mm
#p_x=0
#0=b3*(300**2)**-1-a3     ..............................(8)

#from Equation 7 and 8 we get
b3=80*200**2*300**2*(300**2-200**2)**-1

#From Equation 8 we get
a3=b3*(300**2)**-1

#Hoop stresses 
F_200_3=b3*(200**2)**-1+a3 #N/mm**2
F_250_3=b3*(250**2)**-1+a3 #N/mm**2
F_300_3=b3*(300**2)**-1+a3 #N/mm**2

#Pressure at common surface
p_250=b3*(250**2)**-1-a3 #N/mm**2

#final stress
f_200=F_200+F_200_3 #N/mm**2
f_250=F_250+F_250_3 #N/mm**2
f_300=F_250_2+F_250_3 #N/mm**2
f_300_2=F_300_2+F_300_3 #N/mm**2

#Result
print"final Hoop stress are:f_200",round(f_200,2),"N/mm**2"
print"                     :f_250",round(f_250,2),"N/mm**2"
print"                     :f_300",round(f_300,2),"N/mm**2"
print"                     :f_300_2",round(f_300_2,2),"N/mm**2"
print"Variation of Hoop stress and Radial stress"

#Final stresses
#Variation of hoop stress 
 
X1=[x,x2,x3,x3]
Y1=[f_200,f_250,f_300,f_300_2]
Z1=[0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in mm")
plt.ylabel("Hoop Stress Distribution in N/mm**2")
plt.show()

#Due to Fluid
#Variation of hoop stress 
 
X1=[x,x2,x3]
Y1=[F_200_3,F_250_3,F_300_3]
Z1=[0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in mm")
plt.ylabel("Hoop Stress Distribution in N/mm**2")
plt.show()
final Hoop stress are:f_200 174.67 N/mm**2
                     :f_250 128.83 N/mm**2
                     :f_300 189.43 N/mm**2
                     :f_300_2 155.27 N/mm**2
Variation of Hoop stress and Radial stress

Example 8.8.16,Page No.348

In [16]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

do=200 #mm #Inner Diameter
r_o=100 #mm #Inner radius
d1=300 #mm #outer diameter
r1=150 #mm #Outer radius
d2=250 #mm #Junction Diameter
r2=125 #mm #Junction radius
E=2*10**5 #N/mm**2 #Modulus of Elasticity
p=30 #N/mm**2 #radial pressure

#Calculations

#from Lame's Equation we get
#p_x=b*(x**2)**-1-a       ..........................(1)
#F_x=b*(x**2)**-1+a      ...........................(2)

#Then from Boundary condition 
#p_x=0 at x=100 #mm
#0=b1*(100**2)**-1-a1     .....................(3)

#p_x2=30 #N/mm**2 at x2=125 #mm
#30=b1*(125**2)**-1-a1    ................................(4)

#From equation 3 and 4 we get
b1=30*125**2*100**2*(100**2-125**2)**-1

#From Equation 3 we get
a1=b1*(100**2)**-1

#therefore Hoop stress in inner cyclinder at junction
F_2_1=b1*(125**2)**-1+a1 #N/mm**2

#Outer Cyclinder
#p_x=b*(x**2)**-1-a       ..........................(5)
#F_x=b*(x**2)**-1+a      ...........................(6)

#Now at x=125 #mm
#p_x3=30 #N/mm**2
#30=b2*(125**2)**-1-a2     ..................................(7)

#At x=150 #mm
#p_x4=0
#0=b2*(150**2)**-1-a2     ...................................(8)

#From equations 7 and 8
b2=30*150**2*125**2*(150**2-125**2)**-1

#From eqauation 8 we get
a2=b2*(150**2)**-1

#Hoop stress at junction 
F_2_0=b2*(125**2)**-1+a2 #N/mm**2

rho_r=(F_2_0-F_2_1)*E**-1*r2

#Result
print"Shrinkage Allowance is",round(rho_r,3),"mm"
Shrinkage Allowance is 0.189 mm

Example 8.8.17,Page No.350

In [17]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

d_o=500 #mm #Outer Diameter
r_o=250 #mm #Outer Radius
d1=300 #mm #Inner Diameter
r1=150 #mm #Inner Radius
d2=400 #mm #Junction Diameter
E=2*10**5 #N/mm**2 #Modulus ofElasticity
alpha=12*10**-6 #Per degree celsius
dell_d=0.2 #mm
dell_r=0.1 #mm

#Calculations

#Let p be the radial pressure developed at junction
#Let Lame's Equation for internal cyclinder be
#p_x=b*(x**2)**-1-a   ................................(1)
#F_x=b*(x**2)**-1+a     ...............................(2)

#At 
x=150 #mm 
p_x=0
#Sub in equation 1 we get
#0=b*(150**2)**-1-a    .........................(3)

#At 
x2=200 #mm
#p_x2=p
#p=b*(200**2)**-1-a    ......................(4)
  
#From Equation 3 and 4
#p=b*(200**2)**-1-b(150**2)**-1
#after further simplifying we get
#b=-51428.571*p

#sub in equation 3 we get
#a1=-2.2857*p

#therefore hoop stress at junction is
#F_2_1=-21428.571*p*(200**2)**-1-2.2857*p
#after Further simplifying we geet
#F_2_1=3.5714*p

#Let Lame's Equation for cyclinder be 
#p_x=b*(x**2)**-1-a    .........................5
#F_x=b*(x**2)**-1+a   .............................6

#At 
x=200 #mm
#p_x=p2
#p2=b2*(20**2)**-1-a2    ...................7

#At
x2=200 #mm
p_x2=0
#0=b2*(250**2)**-1-a2    ....................8

#from equation 7 and 8 we get
#p2=b2*(200**2)**-1-b2*(250**2)**-1
#After further simplifying we get
#p2=b2*(250**2-200**2)*(200**2*250**2)**-1
#b2=111111.11*p

#from equation 7
#a2=b2*(250**2)**-1
#further simplifying we get
#a2=1.778*p

#At the junctionhoop stress in outer cyclinder 
#F_2_0=b2*(200**2)**-1+a2
#After further simplifying we get
#F_2_0=4.5556*p

#Considering circumferential strain,the compatibility condition
#rho_r*r2**-1=1*E**-1*(F_2_1+F_2_0)
#where F_2_1 is compressive and F_2_0 is tensile
#furter simplifying we get
p=0.1*200**-1*2*10**5*(3.5714+4.5556)**-1

#Let T be the rise in temperature required
#dell_d=d*alpha*T
#After sub values and further simplifying we get
d=250 #mm
T=dell_d*(d*alpha)**-1 #Per degree celsius

#Result
print"Radial Pressure Developed at junction",round(p,2),"N/mm**2"
print"Min Temperatureto outer cyclinder",round(T,2),"Per degree Celsius"
Radial Pressure Developed at junction 12.3 N/mm**2
Min Temperatureto outer cyclinder 66.67 Per degree Celsius

Example 8.8.18,Page No.355

In [1]:
import math
from math import sin, cos, tan, pi, radians
import matplotlib.pyplot as plt

#Initilization of Variables

d_o=400 #mm #Outer Diameter
r_o=200 #mm #Outer radius
t=50 #mm #Thickness
r1=150 #mm #Internal Radius
p=50 #N/mm**2 #Internal Pressure

#Calculations

#The Radial Pressure and hoop stress at any radial distance x are given by
#p_x=b*(x**2)**-1-a       ..........................(1)
#F_x=b*(x**2)**-1+a      ...........................(2)

#Now at
x=150 #N/mm**2
p_x1=50 #N/mm**2
#Sub in equation 1 we get
#50=2*b*(150**3)**-1-a    ...........................(3)

#At x=200 #mm
p_x2=0
#0=2*b*(200**2)**-1-a     ....................(4)

#From equation 3 and 4 we get
#50=2*b*(150**3)**-1-2*b*(200**3)**-1
#After further simplifying we get
b=50*150**3*200**3*(200**3-150**3)**-1*2**-1

#Sub in equation 3 we get
a=b*(200**3)**-1

#Now At
x=150 #mm
F_x=b*(x**3)**-1+a

#Now At
x2=160 #mm
F_x2=b*(x2**3)**-1+a

#Now At
x3=170 #mm
F_x3=b*(x3**3)**-1+a

#Now At
x4=180 #mm
F_x4=b*(x4**3)**-1+a

#Now At
x5=190 #mm
F_x5=b*(x5**3)**-1+a

#Now At
x6=200 #mm
F_x6=b*(x6**3)**-1+a

#Result
print"Plot of Variation of hoop stress"

#Plotting Variation of hoop stress

X1=[x,x2,x3,x4,x5,x6]
Y1=[F_x,F_x2,F_x3,F_x4,F_x5,F_x6]
Z1=[0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in mm")
plt.ylabel("Hoop Stress Distribution in N/mm**2")
plt.show()
Plot of Variation of hoop stress