import math
#Variable Decleration
W=24*10**3 #Load in kips
E=29*10**6 #Youngs Modulus in psi
L=72 #length in inches
theta=30 #Angle in degrees
#Calculations
L_ab=L/np.sin(theta*pi*180**-1) #Length of AB in inches
L_ac=L/np.sin((90-theta)*pi*180**-1) #Length of AC in inches
#Applying the forces in x and y sum to zero
#Applying the Starin energy formula
#Applying Castiglinos theorem
delta_A=91.16*W*E**-1 #Displacement in inches
#Result
print "The displacement of point A is",round(delta_A,4),"in"
import math
from scipy.integrate import quad
#We will directly compute the integral as function cannot be declared
#Calculations
#Part 1
def integrand(x):
return (800*x-400*x**2)*(4-0.5*x)
I = quad(integrand, 0, 2)
delta=I[0] #Deflection in horizontal direction in N.m^3
#Part 2
def inte1(x):
return x**2
I1=quad(inte1,0,4)
I2=quad(inte1,0,3)
def inte2(x):
return (4-0.5*x)*(4-0.5*x)
I3=quad(inte2,0,2)
Q=-delta/(I1[0]+I2[0]+I3[0]) #Horizontal reaction in N
#Result
print "The Horizontal deflection is",round(delta),"N.m^3"
print "The Horizontal reaction is",round(Q,1),"N"
import math
import numpy as np
#NOTE:The figure mentions the unit of length as ft which is incorrect
#Variable Decleration
L=30 #Length in m
m=2000 #Mass in kg
v=2 #Velocity in m/s
E=10**5 #Youngs Modulus in MPa
A=600 #Area in mm^2
g=9.81 #Acceleration due to gravity in m/s^2
#Calculations
k=E*A*L**-1 #Stifness of the cable in N/m
#Applying the Work-Energy principle
delta_max=np.sqrt((0.5*m*v**2)*(0.5*k)**-1) #Maximum Displacement in m
P_max=k*delta_max+m*g #Maximum force in N
#Result
print "The maximum force is",round(P_max*10**-3,1),"kN"
import math
#Variable Decleration
b=0.060 #Breadth of the section in mm
d=0.03 #Depth of the section in mm
L=1.2 #Length in m
m=80 #Mass in kg
g=9.81 #Acceleration due to gravity in m/s^2
E=200*10**9 #Youngs Modulus in Pa
e=0.015
h=0.01 #height in m
#Calculations
#Part 1
I=b*d**3*12**-1 #Moment of Inertia in m^4
delta_st=m*g*L**3/(48*E*I) #Mid-span Displacement in m
n=1+np.sqrt(1+(2*h/delta_st)) #Impact Factor
#Part 2
P_max=n*m*g #Maximum dynamic load in N at midspan
M_max=P_max*0.5*L*0.5 #Maximum moment in N.m
sigma_max=M_max*e/I #Maximum dynamic Bending Stress in Pa
#Result
print "The impact factor is",round(n,3)
print "The maximum dynamic Bending Moment is",round(sigma_max*10**-6,1),"MPa"
import math
#Variable decleration
M=2.21 #Applied moment in kip.ft
d=3 #Diameter of the bar in inches
sigma_y=40 #Yield strength of the of steel in ksi
#Calculations
#Part 1
sigma=32*M*12*(pi*d**3)**-1 #Maximum Bending Stress in ksi
T1=np.sqrt((sigma_y*0.5)**2-5**2)/(12*0.18863) #Maximum Allowable torque in kip.ft
#Part 2
R=np.sqrt((sigma_y**2-5**2)*3**-1) #Maximum shear stress in ksi
T2=np.sqrt(R**2-5**2)/(12*0.18863) #Maximum safe torque in kpi.ft
#Result
print "Using the maximum shear stress theory T=",round(T1,2),"kip.ft"
print "Using the maximum sitrotion energy theory T=",round(T2,2),"kip.ft"
import math
#Variable Decleration
D=250 #Wideness in mm
b=20 #Thickness of the plate in mm
r=50 #Radius of the hole in mm
e=50 #Eccentricity in mm
sigma_max=150 #Maximum normal stress at the hole in MPa
kb=2 #Stress Concentraion factor
#Calculations
A=b*(D-2*r)*10**-6 #Area in m^2
I=10**-12*(b*D**3*12**-1-(b*2**3*r**3*12**-1)) #Moment of inertia in m^4
#Simplfying computation
a=2*r*D**-1
kt=3-3.13*a+3.66*a**2-1.53*a**3 #Stress Concentration factor
#Simplfying computation
b=kt*A**-1
c=kb*r*r*10**-6*I**-1
P=10**3*sigma_max*(b+c)**-1 #Maximum Load in N
#Result
print "The maximum value of P is",round(P,1),"kN"