In [7]:

```
#Given
offset = 0.2 #
a_x = 0.0016 #in/in
a_y = 50 #ksi
#Calculations
#Modulus of Elasticity
E = a_y/(a_x*10**3) #E is the slope in GPa.
#Yield Strength
sigma_ys = 68 #ksi, Graphically, for a strain of 0.0016 mm/mm
#Ultimate Stress
sigma_u = 108 #ksi B is the peak of stress strain graph.
#Fracture Stress
ep_f = 0.23 #in/in
sigma_f = 90 #ksi from the graph.
#Display
print"The Modulus of Elasticity is ",E,"ksi"
print"The Yield Strength from the graph ",sigma_ys,"ksi"
print"The Ultimate Stress from the graph is ",sigma_u,"ksi"
print"The Fracture Stress from the graph is ",sigma_f,"ksi"
```

In [11]:

```
#Given
stress_b = 600 #MPa, stress
strain_b = 0.023 #mm/mm, strain
stress_a = 450 #Mpa, stress
strain_a = 0.006 #mm/mm, strain
#Calculations
#Permanent Strain
E = stress_a/strain_a
strain_cd = stress_b/E #The recovered elastic strain
perm_strain = strain_b - strain_cd #mm/mm
#Modulus of Resilience
ur_initial = (0.5*stress_a*strain_a)
ur_final = (0.5*stress_b*strain_cd)
#Display
print"The Permanent Strain is =",perm_strain,"mm/mm"
print"The Initial Modulus of Resilience is = ",ur_initial,"MJ/mm**3"
print"The Final Modulus of Resilience is = ",ur_final,"MJ/mm**3"
```

In [13]:

```
#Given
p = 10000 #N, load
E_al = 70*(10**3) #MPa,pressure
#The given dimension are
l_ab = 600.0 #mm
d_ab = 20.0 #mm
l_bc = 400.0 #mm
d_bc = 15.0 #mm
#Calculations
import math
a_ab = (math.pi/4.0)*(d_ab**2) # Area of AB
a_bc = (math.pi/4.0)*(d_bc**2)
stress_ab = p/a_ab
stress_bc = p/a_bc
e_ab = stress_ab/E_al
e_bc = 0.045 #mm/mm . From the graph for stress_bc
elongation = (l_ab*e_ab)+ (l_bc*e_bc)
strain_rec = stress_bc/E_al
e_og = e_bc-strain_rec
rod_elong = e_og*l_bc
#Display
print"The elongation of the rod when load is applied is",round(elongation,1),"mm"
```

In [19]:

```
#Given
P = 80 #kN load
#Dimensions are
l_z = 1.5 #m
l_y = 0.05 #m
l_x = 0.1 #m
#Calculations
Aa= l_x*l_y
normal_stress_z = (P*(10**3))/Aa
Est = 200 #GPa - from the tables.
strain_z = (normal_stress_z)/(Est*(10**9))
axial_elong = strain_z*l_z #elongation in the y direction
nu_st = 0.32 #Poisson's Ratio - from the tables.
strain_x = -(nu_st)*(strain_z) #strain in the x direction.
strain_y = strain_x
#Elongations
delta_x = strain_x*l_x
delta_y = strain_y*l_y
#Display
print"The change in the length (z direction) =",axial_elong*10**6,"micrometer"
print"The change in the cross section (x direction)=",delta_x*10**6,"micrometer"
print"The change in the cross section (y direction)=",delta_y*10**6,"micrometer"
```

In [23]:

```
#Given
#Refer to the graph of shear stress-strain of titanium alloy.
x_A = 0.008 #rad - x co-ordinate of A
y_A = 52 #MPa - y co-ordinate of A
height = 2 #mm
l = 3.0 #mm
b = 4.0 #mm
#Calculations
#Shear Modulus
G = y_A/x_A
#Proportional Limit
tou_pl = 52 #ksi Point A
#Ultimate Stresss
tou_u = 73 #ksi - Max shear stress at B
#Maximum Elastic Displacement
tanA= x_A # tan theta is approximated as theta.
d = tanA*height
#Shear Force
A = l*b
V = tou_pl*A
#Display
print"The Shear Modulus = ",G,"ksi"
print"The Proportional Limit = ",tou_pl,"ksi"
print"The Ultimate Shear Stress = ",tou_u,"ksi"
print"The Maximum Elastic Displacement = ",d,"inch"
print"The Shear Force = ",V,"kip"
```

In [2]:

```
#Given
d_o = 0.025 #m, outside diameter
l_o =0.25 #m
F =165 #kN, load
delta = 1.2 #mm
G_al = 26 #GPa
sigma_y = 440 #MPa
#Calculations
import math
#Modulus of Elasticity
A = (math.pi/4)*(d_o**2)
avg_normal_stress = (F*10**3)/A
avg_normal_strain = delta/l_o
E_al = avg_normal_stress/ avg_normal_strain
E_al = E_al/10**6
#Contraction of Diameter
nu = (E_al/(2*G_al))-1
strain_lat = nu*(avg_normal_strain)
d_contraction = strain_lat* d_o
#Display
print"The Modulus of Elasticity is = ",round(E_al,0),"GPa"
print"The contraction in diameter due to the force = ",round(d_contraction,4),"mm"
```