Chapter 1. Basic Elasticity

Example 1.1, Pg. No.13

In [1]:
import math
# variable declaration
p = 1.5;         #pressure inside vessel (N/mm^2)
d = 2*10**3;     #diameter of vessel (mm)
t = 20;          #thickness of plate (mm)
theta = 60;        #plane's inclination to axis of vessel (degree)
load = 2500*10**3;       #axial tensile load (N)

# Longitudinal stress
sigma_x=p*d/4/t;
print "\nLongitudinal stress due to internal pressure = %5.2f N/mm^2" %(sigma_x)

#circumferential stress
sigma_y=p*d/2/t;
print "\nCircumferential stress due to internal pressure =  %5.2f N/mm^2" %(sigma_y)

#axial load
sigma_x_axial=load/(math.pi*d*t);
print "\ndirect stress due to axial load = %5.2f N/mm^2"%(sigma_x_axial)

sigma_x=sigma_x+sigma_x_axial;                #total longitudinal stress

#direct stress and shear stress on inclined plane AB
#reference Fig 1.9 pg no14, equation 1.8,1.9 pg no 13

sigma_n=sigma_x*math.pow(math.cos(math.radians(90-theta)),2)+sigma_y*math.pow(math.sin(math.radians(90-theta)),2)
print "\ndirect stress on inclined plane AB = %5.2f N/mm^2"%(sigma_n)

tau=(sigma_x-sigma_y)/2*math.sin(math.radians(2*(90-theta)))
print "\nshear stress on plane AB = %5.2f N/mm^2"%(tau)

#maximumm shear stress (theta=45 degree)
theta=45
tau=(sigma_x-sigma_y)/2*math.sin(math.radians(2*(90-theta)))
print "\nmaximum shear stress on plane AB = %5.2f N/mm^2"%(tau)
Longitudinal stress due to internal pressure = 37.50 N/mm^2

Circumferential stress due to internal pressure =  75.00 N/mm^2

direct stress due to axial load = 19.89 N/mm^2

direct stress on inclined plane AB = 61.80 N/mm^2

shear stress on plane AB = -7.62 N/mm^2

maximum shear stress on plane AB = -8.80 N/mm^2

Example 1.2, Pg. No.14

In [95]:
import math

#variable declaration
load=50*10**3         #axial load (N)
d=60                   #diameter (mm)
t=1.5                  #offset distance from center (mm)
T=1200*10**3                 #torque applied on a point (N.mm)
theta=60               #angle made by plane wrt axis of cylinder(degree)

#compressive stress due to axial load
area=math.pi*math.pow(d/2,2)        #cross section area
sigma_x_a=load/area
print "\ncompressive stress due to axial load = %5.1f N/mm^2"%sigma_x_a

#compressive stress due to bending moment
#area moment of inertia
M=load*t
I=math.pi*d**4/64

sigma_x_b=M*d/2*(1/I)
print "\ncompressive stress due to bending moment = %5.1f N/mm^2" %sigma_x_b

#total compressive stress
sigma_x=sigma_x_a+sigma_x_b

#shear stress due to torque Ref example 3.1 equation (iv) pg no 73
# tau=Tr/J
J=math.pi*d**4/32    #torsion constant
tau_xy=T*d/2/J
print "\nshear stress due to torque = %5.1f N/mm^2" %tau_xy

#direct and shear on inclined plane, ref eq 1.8,1.9
sigma_y=0
sigma_n=-sigma_x*math.pow(math.cos(math.radians(90-theta)),2)-tau_xy*math.sin(math.radians(2*(90-theta)))
print "\ndirect stress on inclined plane = %3.1f N/mm^2"%sigma_n

tau=-sigma_x/2*math.sin(math.radians(2*(90-theta)))+tau_xy*math.cos(math.radians(2*(90-theta)))
print "\nshear stress on inclined plane = %3.1f N/mm^2"%tau
compressive stress due to axial load =  17.7 N/mm^2

compressive stress due to bending moment =   3.5 N/mm^2

shear stress due to torque =  28.3 N/mm^2

direct stress on inclined plane = -40.4 N/mm^2

shear stress on inclined plane = 5.0 N/mm^2

Example 1.3, Pg. No.20

In [141]:
#import numpy
import math
#import matplotlib
%pylab inline
#from pylab import *          #change comment to above line to see undocked graph, all values will be visible as mouse-pointer moves
#variable declaration
sigma_x=160          #stress in x direction (N/mm^2)
sigma_y=-120          #stress in y direction (N/mm^2)
sigma=200             #stress on inclined plane (N/mm^2)

tau_xy=((sigma-sigma_x)*(sigma-sigma_y))**0.5
print "\nallowable shear stress, tau_xy = %4.1f N/mm^2 "%tau_xy

coeff=[1,-(sigma_x+sigma_y),sigma_x*sigma_y-tau_xy**2]
sigma=numpy.roots(coeff)
print "\nprincipal stresses, sigma_I = %3.0f N/mm^2  sigma_II = %3.0f N/mm^2"%(sigma[0],sigma[1])

tau_max=(abs(sigma[0])+abs(sigma[1]))/2
print "\nmaximum shear stress, tau_max = %3.0f N/mm^2"%tau_max

#plotting Mohr circle
x_cent=(sigma_x+sigma_y)/2
y_cent=0

X1=(sigma_x,tau_xy)
X2=(sigma_y,-tau_xy)

radius=(math.hypot(X2[0]-X1[0], X2[1] - X1[1]))/2

cir=linspace(0,2*pi,100)
plot(radius*cos(cir)+x_cent,radius*sin(cir)+y_cent,'r')
plot(sigma_x,tau_xy,'ro',sigma_y,-tau_xy,'ro',x_cent,y_cent,'b+',sigma[0],0,'bo',sigma[1],0,'bo',20,tau_max,'go')
text(sigma_x+10,tau_xy,'Q1')
text(sigma_y+10,-tau_xy,'Q2')
text(20,tau_max+10,r'$\tau_{max}$')
text(-150,0,r'$\sigma_2$')
text(200,10,r'$\sigma_1$')
text(-20,+10,'O')
text(30,-20,'C')
#plot([sigma_y,tau_xy],[sigma_x,-tau_xy],'r-')
xlabel(r'$\sigma$')
ylabel(r'$\tau$')
title('Mohr Cirle')
axis('equal')
grid(True)
show()
Populating the interactive namespace from numpy and matplotlib

allowable shear stress, tau_xy = 113.1 N/mm^2 

principal stresses, sigma_I = 200 N/mm^2  sigma_II = -160 N/mm^2

maximum shear stress, tau_max = 180 N/mm^2

Example 1.4, Pg. No.33

In [111]:
import math
#variable declaration
sigma_x=83       # stress in x direction (N/mm^2)
sigma_y=65       # stress in y direction (N/mm^2)
E=200000         # Young's Modulus (N/mm^2)
v=0.3           # poisson's ratio

# strains in x,y and z directions
epsln_x=1.0/E*(sigma_x-v*sigma_y)
epsln_y=1.0/E*(sigma_y-v*sigma_x)
epsln_z=-v/E*(sigma_x+sigma_y)
print "\nstrain in x direction, epsln_x = %5.3e"%epsln_x
print "\nstrain in y direction, epsln_y = %5.3e"%epsln_y
print "\nstrain in z direction, epsln_z = %5.3e"%epsln_z

tau_max=(sigma_x-sigma_y)/2
print "\nmaximum shear stress, tau_max = %2.2f N/mm^2"%tau_max

gama_max=2*(1+v)*tau_max/E
print "\nmaximum shear strain, y_max = %2.2e " %gama_max
strain in x direction, epsln_x = 3.175e-04

strain in y direction, epsln_y = 2.005e-04

strain in z direction, epsln_z = -2.220e-04

maximum shear stress, tau_max = 9.00 N/mm^2

maximum shear strain, y_max = 1.17e-04 

Example 1.5, Pg. No.33

In [185]:
import math
#import matplotlib.pyplot as plt
%pylab inline
#variable declaration
sigma_x=60            #stress in x direction (N/mm^2)
sigma_y=-40           #stress in y direction (N/mm^2)
tau_xy=50             #shear stress (N/mm^2)
E=2*10**5             #Young's Modulus (N/mm^2)
v=0.3                #poisson's ratio

#strains in x and y direction
epsln_x=1.0/E*(sigma_x-v*sigma_y)
epsln_y=1.0/E*(sigma_y-v*sigma_x)
print "\nstrains in x and y directions, epsi_x =%4.1e  epsi_y =%4.1e "%(epsln_x,epsln_y)     

G=E/2/(1+v)
print "\nshear modulus, G = %6.1f"%G

gama_xy=tau_xy/G
print "\nshear strain, gama_xy = %4.1e"%gama_xy

#principal strains
epsln_I=(epsln_x+epsln_y)/2+1.0/2*((epsln_x-epsln_y)**2+gama_xy**2)**0.5
epsln_II=(epsln_x+epsln_y)/2-1.0/2*((epsln_x-epsln_y)**2+gama_xy**2)**0.5
print "\nprincipal strains, epsln_I = %4.2e  epsln_II = %4.2e"%(epsln_I,epsln_II)

#inclination
theta=1.0/2*math.atan(gama_xy/(epsln_x-epsln_y))
print "\ninclination to the plane on which sigma_x acts, theta = %4.1f or %4.1f"%(theta*180/math.pi,theta*180/math.pi+90)

#plotting Mohr circle
x_cent=(epsln_x+epsln_y)/2
y_cent=0

X1=(epsln_x,gama_xy/2)
X2=(epsln_y,-gama_xy/2)

radius=(math.hypot(X2[0]-X1[0], X2[1] - X1[1]))/2
print radius
cir=linspace(0,2*pi,100)
plot(radius*cos(cir)+x_cent,radius*sin(cir),'r')
plot(epsln_x,gama_xy/2,'ro',epsln_y,-gama_xy/2,'ro',x_cent,y_cent,'b+',epsln_II,0,'go',epsln_I,0,'go')
text(epsln_x,gama_xy/2,'Q1')
text(epsln_y,-gama_xy/2,'Q2')
text(-0.00050,0,r'$\epsilon_2$')
text(.00050,0,r'$\epsilon_1$')
text(-.000060,0.00002,'O')
text(0,0,'C')
xlabel(r'$\epsilon$')
ylabel(r'$\gamma$')
title('Mohr Cirle')
axis('equal')
grid(True)
show()
Populating the interactive namespace from numpy and matplotlib

strains in x and y directions, epsi_x =3.6e-04  epsi_y =-2.9e-04 

shear modulus, G = 76923.1

shear strain, gama_xy = 6.5e-04

principal strains, epsln_I = 4.95e-04  epsln_II = -4.25e-04

inclination to the plane on which sigma_x acts, theta = 22.5 or 112.5
0.000459619407771

Example 1.7, Pg. No.40

In [2]:
import math
#variable declaration
epsln_a=1000*10**(-6)     #readings of strain gauges 
epsln_b=-200*10**(-6)     #straing gauges 'a'  and 'c' are
epsln_c=-300*10**(-6)     #in line and perpendicular to axis of bar
d=50                      #diameter of bar (mm)
E=70000                   #Young's modulus (N/mm^2)
v=0.3                     #poisson's ratio

#principal strains
epsln_I=1.0/2*(epsln_a+epsln_c)+(1.0/2**0.5)*((epsln_a-epsln_b)**2+(epsln_c-epsln_b)**2)**0.5
epsln_II=1.0/2*(epsln_a+epsln_c)-(1.0/2**0.5)*((epsln_a-epsln_b)**2+(epsln_c-epsln_b)**2)**0.5
print "\nfirst principal strain, epsln_I = %4.3e"%epsln_I
print "\nsecond principal strain, epsln_II = %4.3e"%epsln_II

#principal stresses
sigma_I=E/(1-v**2)*(epsln_I+v*epsln_II)
sigma_II=E/(1-v**2)*(v*epsln_I+epsln_II)
print "\nfirst principal stress, sigma_I= %4.1f N/mm^2"%sigma_I #mistake in book
print "\nsecond principal stress, sigma_II= %4.1f N/mm^2"%sigma_II

sigma_x=sigma_I+sigma_II
print "\nstress in x direction,sigma_x = %4.1f N/mm^2"%sigma_x

#axial tensile load calculation
A=math.pi*d**2/4
P=sigma_x*A
print "\naxial load, P = %4.1f kN"%(P/1000)

tau_xy=1.0/2*((sigma_x/2-sigma_II)**2*4-sigma_x**2)**0.5
print "\nshear stress, tau_xy = %4.1f N/mm^2"%tau_xy

#torque calculation
J=math.pi*d**4/32
T=tau_xy*J/d*2
print "\ntorque applied on circular bar, T = %4.1f kNm"%(T/10**6)

sigma_x=E*epsln_a
print "\naxial stress from classical stress strain relationship, sigma_x =%4.0f N/mm^2"%sigma_x
first principal strain, epsln_I = 1.201e-03

second principal strain, epsln_II = -5.015e-04

first principal stress, sigma_I= 80.8 N/mm^2

second principal stress, sigma_II= -10.8 N/mm^2

stress in x direction,sigma_x = 70.0 N/mm^2

axial load, P = 137.4 kN

shear stress, tau_xy = 29.6 N/mm^2

torque applied on circular bar, T =  0.7 kNm

axial stress from classical stress strain relationship, sigma_x =  70 N/mm^2
In [ ]: