import math
#Initilization of variables
D=0.8 #m #Diameter of Shell
L=3 #m #Length of shell
t=0.01 #m #thickness of metal
E=200*10**9 #Pa
p=2.5*10**6 #Pa #Internal Pressure
m=4 #Poisson's ratio
#Calculation
sigma_1=p*D*(2*t)**-1 #N/m**2 #Hoop stress
sigma_2=p*D*(4*t)**-1 #N/m**2 #Longitudinal stress
e_1=1*E**-1*(sigma_1-sigma_2*m**-1) #Hoop strain
e_2=1*E**-1*(sigma_2-sigma_1*m**-1) #Hoop strain
d=e_1*D*100 #cm #Increase in Diameter
l=e_2*L*100 #cm #Increase in Length
dell_v=2*e_1+e_2 #Volumetric strain
V=dell_v*pi*4**-1*D**2*L*10**6 #cm**3 #Increase in Volume
#Result
print"Change in Diameter is",round(d,3),"cm"
print"Change in Length is",round(l,3),"cm"
print"Change in Volume is",round(V,2),"cm**3"
import math
#Initilization of variables
D=0.8 #m #iameter of water main
h=100 #m #Pressure head
w=10*10**3 #N/m**3 #Weight of Water
sigma_t=20*10**6 #MPa #Permissible stress
#Calculation
p=w*h #N/m**2 #Pressure of inside the main
t=p*D*(2*sigma_t)**-1*100 #m #Thcikness of metal
#Result
print"The Thickness of metal is",round(t,2),"cm"
import math
#Initilization of variables
p=2*10**6 #MPa #Steam Pressure
t=0.02 #m #thickness of boiler plate
sigma_t=120*10**6 #MPa #Tensile stress
sigma_l=120*10**6 #MPa #Longitudinal stress
rho=0.90 #% #Efficiency of Longitudinal joint
rho_e=0.40 #% #Efficiency of circumferential joint
#Calculations
D_1=sigma_t*2*t*rho*p**-1 #Diameter of boiler
D_2=sigma_l*4*t*rho_e*p**-1 #Diameter of boiler
#Max diameter of boiler is equal to minimum value of diameter
#Result
print"Maximum diameter of boiler is",round(D_2,2),"m"
import math
#Initilization of variables
L=0.9 #m #Length of cyclindrical shell
D=0.2 #m #Internal Diameter
t=0.008 #m #thickness of metal
dV=20*10**-6 #m**3 #Additional volume
E=200*10**9 #Pa
m=1*0.3**-1 #Poissoin's ratio
#Calculations
V=pi*4**-1*D**2*L #Volume of cyclinder
#Let X=2*e_1+e_2
X=dV*V**-1 #Volumetric strain (Equation 1)
#e_1=p*D*(2*E*t)**-1*(1-1*(2*m)**-1) #Circumferential strain
#e_2=p*D*(2*E*t)**-1*(1*2**-1-1*(2*m)**-1) #Circumferential strain
#substituting above values in equation 1 we get
p=X*E*t*(D*((1-1*(2*m)**-1)+(1*4**-1-1*(2*m)**-1)))**-1*10**-3 #KN/m**2 #Pressure exerted by fluid
sigma_t=p*D*(2*t)**-1 #KN/m**2 #hoop stress
#Result
print"Pressure Exerted by Fluid on the cyclinder is",round(p,2),"KN/m**2"
print"Hoop stress is",round(sigma_t,2),"KN/m**2"
import math
#Initilization of variables
t=0.015 #m #Thickness of plate
sigma_t=120*10**6 #Pa #tensile stress
sigma_l=120*10**6 #Pa #Longitudinal stress
rho=0.7 #% #Efficiency of longitudinal joints
rho_l=0.3 #% #Efficiency of circumferential joints
p=2*10**6 #Pa #Internal pressure
D=1.5 #m #shell diameter
#Calculations (Part-1)
D_1=sigma_t*2*t*rho*p**-1 #m
D_2=sigma_l*4*t*rho_l*p**-1 #m
#Thus max diameter of shell is min of above two cases
#Calculations (Part-2)
p_1=sigma_t*2*t*rho*D**-1*10**-6 #MPa
p_2=sigma_l*4*t*rho_l*D**-1*10**-6 #MPa
#Thus Internal pressure is min of above two cases
#Result
print"Max Permissible Diameter of shell is",round(D_2,2),"m"
print"Max Permissible Internal Pressure is",round(p_2,2),"MPa"
import math
#Initilization of variables
L=3 #m #Length
D=1 #m #Internal Diameter
t=0.015 #m #thickness
p=1.5*10**6 #Pa #Internal pressure
E=200*10**9 #Pa
m=1*0.3**-1 #Poissoin's ratio
#Calculations
sigma_t=p*D*(2*t)**-1*10**-6 #MPa #Hoop stress
sigma_l=p*D*(4*t)**-1*10**-6 #MPa #Longitudinal stress
dD=(p*D**2*(2*t*E)**-1*(1-1*(2*m)**-1))*10**2 #cm #Change in Diameter
dL=p*D*L*(2*t*E)**-1*(1*2**-1-1*m**-1)*10**2 #cm #Change in Length
V=pi*4**-1*D**2*L #Volume
dV=p*D*(2*t*E)**-1*(5*2**-1-2*(m)**-1)*V*10**6 #cm #Change in Volume
#Result
print"The circumferential stresses induced is",round(sigma_t,2),"MPa"
print"The Longitudinal stresses induced is",round(sigma_l,2),"MPa"
print"The change in dimension are:D is",round(dD,3),"cm"
print" :L is",round(dL,4),"cm"
import math
#Initilization of variables
L=0.9 #m #Length of cyclinder
D=0.4 #m #Diameter
t=0.006 #m #thickness
p=5*10**6 #Pa #Pressure
E=100*10**9
m=3 #Poissoin's ratio
k=2.6*10**9 #Pa #Bulk modulus
#Calculations
#Let X=dV_1*V_1**-1
X=p*(0.4-2*0.006)*(2*t*E)**-1*(5*2**-1-2*m**-1) #Volumetric strain
dV_1=round(X,5)*pi*4**-1*0.388**2*L #cm**3 #Increase in volume of cyclinder
V_1=pi*4**-1*0.388**2*L #VOlume
dV_2=p*k**-1*V_1 #DEcrease in volume of oil due to increase in pressure
dV=(dV_1+dV_2)*10**6 #Resultant additional space
#Result
print"additional quantity of oil to be pumped is",round(dV,2),"cm**3"
import math
#Initilization of variables
A=1600*(3600)**-1 #Kg/sec #Amount of steam generated
v=0.24 #m**3/kg #specific volume of steam
sigma_t=4*10**6 #MPa #Tensile stress
V_1=30 #m/s #Velocity of steam
p=1*10**6 #Pa #Steam pressure
#Calculation
V=A*v #m**3/s #volume of steam
D=(V*(pi*4**-1*V_1)**-1)**0.5*100 #Diameter of pipe
t=p*D*(2*sigma_t)**-1 #Thicknes of pipe
#Result
print"Diameter of boiler is",round(D,2),"cm"
print"Thickness of steel plpe is",round(t,2),"cm"
import math
#Initilization of variables
P=14*10**3 #N #Axial pull
dL=0.0084 #cm #Elongation
L=0.25 #m #Length
p=7*10**6 #Internal pressure
dL_2=0.0034 #cm #Longation
d=0.0475 #m #Internal diameter
D=0.05 #m #External Diameter
m=0.25
#Calculation
t=(D-d)*2**-1 #thickness od tube
A=pi*4**-1*(D**2-d**2) #Area of tube
sigma=P*A**-1 #stress
e=dL*(L)**-1 #strain
E=sigma*e**-1 #Modulus of Elasticity
sigma_1=p*d*(2*t)**-1 #Hoop stress
sigma_2=p*d*(4*t)**-1 #Longitudinal stress
m=-(sigma_1*(dL_2*L**-1*E-sigma_2)**-1) #POissoin's ratio\
#Let X=1*m**-1
X=1*m**-1 #Poissoin's ratio
#Result
print"The value of Poissoin's ratio is",round(X,3)
import math
#Initilization of variables
D=0.8 #m #Diameter
t=0.01 #m #Thickness
p=5*10**6 #Pa #Pressure
m=1*0.25**-1
E=200*10**9 #Pa
#Calculations
sigma_1=5*10**6*0.8*(4*0.01)**-1 #stress
sigma_2=sigma_1
e_1=sigma_1*E**-1-sigma_2*(m*E)**-1 #strain
e_v=3*e_1
V=4*3**-1*pi*(D*2**-1)**3 #m**3 tress
dell_v=e_v*V*10**6 #cm**3
#Result
print"Volume of additional Fluid",round(dell_v,3),"cm**3"
d=0.3 #m #Diameter
D=0.003 #m #Diameter of steel wire
t=0.006 #m #thickness
sigma_w=8*10**6 #Pa #Stress
p=1*10**6 #Pa #Internal pressure
E_s=200*10**9 #Pa #Modulus of Elasticity for steel
E_c=100*10**9 #Pa #Modulus of Elasticity for cast iron
m=1*0.3**-1
#Calculations
sigma_p=(sigma_w*pi*2**-1*d)*(2*t)**-1 #compressive hoop stress
sigma_l=p*d*(4*t)**-1 #Longitudinal stress
#when internal presure is apllied Let sigma_w_1=Tensile in wire and sigma_p_1=tensile hoop in wire
#sigma_p_1*2*t+sigma_w_1*2*d**-1*pi*4**-1*d**2=p*D
#After substituting values and further simplifying we get
#1.2*sigma_p_1+0.471*sigma_w_1=3000 Equation 1
#1*E_c**-1(sigma_p_1-sigma_1*m**-1+sigma_p)=1*E_s**-1(sigma_w_1-sigma_w)
#After substituting values and further simplifying we get
#sigma_p_1-0.5*sigma_w_1=1.36*10**6
#sigma_p_1=0.5*sigma_w_1-3.39*10**6 Equation 2
#From Equation 2 substituting value of sigma_p_1 in Equation 1
sigma_w_1=(40.68*10**3+0.3*10**6)*(10.71238*10**-3)**-1
sigma_p_1=0.5*sigma_w_1-3.39*10**6
#Let X=sigma_p_1 and Y=sigma_w_1
X=sigma_p_1*10**-6 #MPa #Stresses in pipe
Y=sigma_w_1*10**-6 #MPa #Stresses in wire
#Result
print"Stress in the pipe is",round(X,2),"MN/m**2"
print"Stress in the wire is",round(Y,2),"MN/m**2"
import math
#Initilization of variables
D=0.038 #m #External Diameter
d=0.035 #m #Internal Diameter
d_1=0.0008 #m #Steel wire diameter
p=2*10**6 #pa #Pa #Internal Pressure
sigma_t_1=7*10**6 #Pa #Circumferential stress
#E_s=1.6*E_s
m=0.3
#Calculation
t=(D-d)*2**-1 #m Thickness
#sigma_t*2*t=pi*d*2**-1*sigma_w
#From Above equation we get
#sigma_t=0.419*sigma_w (Equation 1)
sigma_w_1=(p*d-sigma_t_1*2*t)*(2*d_1**-1*pi*4**-1*d_1**2)**-1 #stress in wire
sigma_l=p*d*(4*t)**-1 #Longitudinal stress in tube
#Now Equating equations of strain in tube and wire we get
sigma_w=-(1.6*(sigma_t_1-sigma_l*m)-sigma_w_1)*1.67**-1*10**-6
#Result
print"The Tension at which wire must have been wound is",round(sigma_w,2),"MPa"