# Chapter 9:Stress Transformation¶

## Example 9.1 Page no 440¶

In [2]:
#Given
import math
tou = 25		 #MPa, shear stress
sigma1 = 50 		#MPa, stress
sigma2 = 80 		#MPa
phi = 30*(math.pi/180.0)

# Calculations
sigma_x1 = (sigma1*math.cos(phi)*math.cos(phi))- (tou*math.cos(phi)*math.sin(phi)) - (sigma2*math.sin(phi)*math.sin(phi))- (tou*math.sin(phi)*math.cos(phi))
tou1 = (sigma1*math.cos(phi)*math.sin(phi))+ (tou*math.cos(phi)*math.cos(phi)) + (sigma2*math.sin(phi)*math.cos(phi))- (tou*math.sin(phi)*math.sin(phi))
sigma_x2 = (tou*math.cos(phi)*math.sin(phi))- (sigma2*math.cos(phi)*math.cos(phi)) + (tou*math.sin(phi)*math.cos(phi))+ (sigma1*math.sin(phi)*math.sin(phi))
tou2 = (tou*math.cos(phi)*math.cos(phi))+ (sigma2*math.cos(phi)*math.sin(phi)) - (tou*math.sin(phi)*math.sin(phi))+ (sigma1*math.sin(phi)*math.cos(phi))

#Display
print"The normal stress component in the x diection is     = ",round(sigma_x1,1),"MPa"
print"  The shear stress component in the x diection is    = ",round(tou1,1),"MPa"
print"  The normal stress component in the y diection is   = ",round(sigma_x2,1),"MPa"
print"  The shear stress component in the y diection is    = ",round(tou2,1),"MPa"

The normal stress component in the x diection is     =  -4.2 MPa
The shear stress component in the x diection is    =  68.8 MPa
The normal stress component in the y diection is   =  -25.8 MPa
The shear stress component in the y diection is    =  68.8 MPa


## Example 9.2 Page no 444¶

In [5]:
#Given
import math
phi = -30*(math.pi/180)    #angle
theta = 60*(math.pi/180)
sigma_x = -80              #MPa
sigma_y = 50               #MPa
tou_xy = -25               #MPa

#Plane CD
sigma_x1 = (sigma_x+sigma_y)/2 + ((sigma_x-sigma_y)*math.cos(2*phi))/2 + (tou_xy*math.sin(2*phi)) #Eqn 9.1
tou_xy1 = ((-(sigma_x - sigma_y)*math.sin(2*phi))/2) + (tou_xy*math.cos(2*phi)) #Eqn 9.2

#Plane BC
sigma_x2 = (sigma_x+sigma_y)/2 + ((sigma_x-sigma_y)*math.cos(2*theta))/2 + (tou_xy*math.sin(2*theta)) #Eqn 9.1
tou_xy2 = (-(sigma_x - sigma_y)*math.sin(2*theta))/2 + tou_xy*math.cos(2*theta) #Eqn 9.2

#Display
print'The normal stress of plane CD inclined at 30 degrees    = ',round(sigma_x1,1),"MPa"
print'The shear stress of plane CD inclined at 30 degrees     = ',round(tou_xy1,1),"MPa"
print'The normal stress of plane BC inclined at 60 degrees    = ',round(sigma_x2,1),"MPa"
print'The shear stress of plane BC inclined at 60 degrees     = ',round(tou_xy2,1),"MPa"

The normal stress of plane CD inclined at 30 degrees    =  -25.8 MPa
The shear stress of plane CD inclined at 30 degrees     =  -68.8 MPa
The normal stress of plane BC inclined at 60 degrees    =  -4.2 MPa
The shear stress of plane BC inclined at 60 degrees     =  68.8 MPa


## Example 9.3 Page no 448¶

In [11]:
#Given
sigma_x = -20   #MPa, stress
sigma_y = 90    #MPa
tou_xy = 60     #MPa

#Orientation of Element
import math
theta_p2 = math.atan((2*tou_xy)/(sigma_x - sigma_y))
theta_p2 = theta_p2/2.0
theta_p1 = (180+2*theta_p2)/2.0

#Principal Stresses

sigma1 = ((sigma_x+sigma_y)/2.0)+(math.sqrt(((sigma_x - sigma_y)/2.0)**2 + tou_xy**2))
sigma2 = ((sigma_x+sigma_y)/2.0)- math.sqrt(((sigma_x-sigma_y)/2.0)**2 + tou_xy**2)
sigma_x2 = ((sigma_x+sigma_y)/2.0)+ (((sigma_x-sigma_y)/2.0)*math.cos(2*theta_p2)) + (tou_xy*math.sin(2*theta_p2))

#Display
print"The first principal stress is                       = ",round(sigma1,1),"MPa"
print"The second principal stress is                      = ",round(sigma2,1),"MPa"
print'The normal stress acting on the 23.7 degrees plane  = ',round(sigma_x2,1),"MPa"

The first principal stress is                       =  116.4 MPa
The second principal stress is                      =  -46.4 MPa
The normal stress acting on the 23.7 degrees plane  =  -43.3 MPa


## Example 9.4 Page no 449¶

In [26]:
#Given
sigma_x = -20.0 #MPa, stress along x
sigma_y  = 90.0 #MPa  stress along y
tou_xy =60.0    #Mpa, shear stress

#Calculation
#Orientation of Element
import math
theta_s2 = math.atan(-(sigma_x - sigma_y)/(2*tou_xy))
theta_s2 = theta_s2/2.0
theta_s1 = math.pi + 2*theta_s2
theta_s1 = theta_s1/2.0

#Maximum in plane Shear Stress
tou_max = (math.sqrt(((sigma_x - sigma_y)/2.0)**2 + tou_xy**2))
tou_xy1 = -(sigma_x - sigma_y)*(math.sin(2*theta_s2))/2.0 + (tou_xy*math.cos(2*theta_s2))
#Average Normal Stress
sigma_avg = (sigma_x+sigma_y)/2

#Display
print"The maximum in-plane shear stress is   = ",round(tou_xy1,1),"MPa"
print"The average normal stress is        = ",round(sigma_avg,0),"MPa"

The maximum in-plane shear stress is   =  81.4 MPa
The average normal stress is        =  35.0 MPa


## Example 9.7 Page no 465¶

In [31]:
#Given
sigma_x = -12  #ksi, stress along x
sigma_y = 0
tou_xy = -6    #ksi, stress along xy

#Calculation
#Construction of the circle
import math
sigma_avg = (sigma_x+sigma_y)/2.0
R = sqrt((-sigma_x+sigma_avg)**2 + (tou_xy)**2)
#Principal Stresses
sigma2 = -R+sigma_avg
sigma1 = R+sigma_avg
theta_p2 = math.atan((-tou_xy)/(-sigma_x+sigma_avg))
theta_p2 = theta_p2/2*(180/math.pi)

#Display
print'The first principal stress is            = ',round(sigma1,2),"ksi"
print'The second principal stress is           = ',round(sigma2,2),"ksi"
print'The direction of the principal plane is  = ',theta_p2,"degree"

The first principal stress is            =  2.49 ksi
The second principal stress is           =  -14.49 ksi
The direction of the principal plane is  =  22.5 degree


## Example 9.8 Page no 466¶

In [38]:
#Given
sigma_x = -20.0 #MPa
sigma_y = 90.0 #MPa
tou_xy = 60.0  #MPa

#Construction of the circle
import math
sigma_avg = (sigma_x+sigma_y)/2
R = math.sqrt(((sigma_x-sigma_avg))**2 + (tou_xy)**2)
#Maximum In plane Shear Stress
tou_max = R
theta_s1 = math.atan(-(sigma_x - sigma_avg)/(tou_xy))
theta_s1 = theta_s1/2.0*(180/math.pi)

#Display
print'The maximum in-plane shear stresses are   = ',round(tou_max,1),"MPa"
print'The second principal stress  = ',sigma_avg,"MPa"
print'The orientation of the element is         = ',round(theta_s1,1),"degree"

The maximum in-plane shear stresses are   =  81.4 MPa
The second principal stress  =  35.0 MPa
The orientation of the element is         =  21.3 degree


## Example 9.9 Page no 467¶

In [43]:
#Calculate normal stress and shear stress

#Given
sigma_x  = -8.0    #MPa
sigma_y = 12.0    #MPa
tou_xy = -6.0     #Mpa

#Construction of the circle
import math
sigma_avg = (sigma_x+sigma_y)/2.0
R = math.sqrt( 10**2 + tou_xy**2)
#Stresses on 30 degree element
phi = math.atan(6/10.0)
psi = (math.pi/3.0) - phi
#On face BD
sigma_x1 = 2 - (R*math.cos(psi))
tou_xy1 = (R*math.sin(psi))
#On face DE
sigma_x2 = 2 + (R*math.cos(psi))
tou_xy2 = -(R*math.sin(psi))

#Display
print'The normal stress on plane BD inclined at 30 degrees is   = ',round(sigma_x1,1),"ksi"
print'The normal stress on plane DE inclined at 60 degrees is   = ',round(sigma_x2,1),"ksi"
print'The shear stress is     = ',round(tou_xy1,1),"ksi"
print'The shear stress is     = ',round(tou_xy2,1),"ksi"

The normal stress on plane BD inclined at 30 degrees is   =  -8.2 ksi
The normal stress on plane DE inclined at 60 degrees is   =  12.2 ksi
The shear stress is     =  5.7 ksi
The shear stress is     =  -5.7 ksi


## Example 9.10 Page no 476¶

In [49]:
#Given
sigma_max = 32 #MPa
sigma_min = 0 #MPa
sigma_int = 16 #MPa

#Calculation
tou_max = (sigma_max - sigma_min)/2
sigma_avg = (sigma_max + sigma_min)/2
tou_in_plane = (sigma_max - sigma_int)/2
sigma_avg2 = sigma_avg + (tou_in_plane)

#Display
print 'The normal shears tress is', sigma_avg,"MPa"
print'The maximum absolute shear stress   = ',tou_max,"MPa"

The normal shears tress is 16 MPa
The maximum absolute shear stress   =  16 MPa


## Example 9.11 Page no 477¶

In [56]:
#Given
tou = 40       #psi
sigma = -20     #psi

#Calculation
#Principal Stresses
import math
sigma_avg = sigma/2
R = sqrt( (-sigma + sigma_avg)**2 + tou**2)
sigma_max = sigma_avg + R
sigma_min = sigma_avg - R
theta = math.atan(tou/(-sigma+sigma_avg))
theta = theta/2
#Absolute Maximum Shear Stress
tou_max = (sigma_max - sigma_min)/2
sigma_avg = (sigma_max + sigma_min)/2

#Display
print'The prinicpal stresses at the point are ',round(sigma_max,2),"psi   and",round(sigma_min,1),"psi"
print'The absolute maximum shear stress at the point  ',round(tou_max,1),"psi"

The prinicpal stresses at the point are  31.23 psi   and -51.2 psi
The absolute maximum shear stress at the point   41.2 psi