import math
#Given
#Variable declaration
L=6*1000 #Length in mm
W=50*1000 #Point load in N
I=78e6 #Moment of Inertia in mm^4
E=2.1e5 #Young's modulus in N/sq.mm
#Calculation
yc=round((W*L**3)/(48*E*I),3) #The deflection at the centre in mm
thetaB=round(math.degrees((W*L**2)/(16*E*I)),4) #The slope at the supports
#Result
print "Deflection at the centre =",yc,"mm"
print "NOTE:The answer given for slope at the support is wrong.The correct answer is,"
print "Slope at the support =",thetaB,"degree"
import math
#Given
#Variable declaration
L=4*1000 #Length in mm
#Calculation
thetaA=round(math.radians(1),5) #Slope at the ends in radians
yc=float(str(thetaA*(L/3))[:5]) #Deflection at the centre in mm
#Result
print "Deflection at the centre =",yc,"mm"
import math
#Given
#Variable declaration
L=3*1000 #Length in mm
#Calculation
thetaA=round(math.radians(1),5) #Slope at the ends in radians
yc=float(str(thetaA*(L/3))[:5]) #Deflection at the centre in mm
#Result
print "Deflection at the centre =",yc,"mm"
import math
#Given
#Variable declaration
L=5*1000 #Length in mm
W=5*1000 #Point load in N
a=3*1000 #Distance between point load and left end in mm
E=2e5 #Young's modulus in N/sq.mm
I=1e8 #Moment of Inertia in mm^4
#Calculation
b=L-a #Width in mm
#case(i):The slope at the left support
thetaA=-(W*a*b)/(6*E*I*L)*(a+2*b)
#case(iii): The deflection under the load
yc=(W*a**2*b**2)/(3*E*I*L)
#case(iii):The maximum deflection
y_max=round((W*b)/(9*math.sqrt(3)*E*I*L)*(((a**2)+(2*a*b))**(3/2)),4)
#Result
print"slope at the left support =",thetaA,"radians"
print"Deflection under the load =",yc,"mm"
print"Maximum deflection =",y_max,"mm"
from __future__ import division
import math
#Given
#Variable declaration
b=200 #Width in mm
d=300 #Depth in mm
L=5*1000 #Span in mm
L_star=5 #Span in m
w=9*1000 #Uniformly distributed load in N/m
E=1e4 #Young's modulus in N/sq.mm
#Calculation
W=w*L_star #Total load in N
I=b*d**3/12 #Moment of Inertia in mm^4
#case(i):the slope at the support
thetaA=round(-(W*(L**2))/(24*E*I),4)
#case(ii):maximum deflection
yc=str((W*L**3)/(E*I)*(5/384))[:5]
#Result
print"Slope at the support =",-thetaA,"radians"
print"Maximum deflection =",yc,"mm"
#Given
#Variable declaration
L=5*1000 #Length in mm
L_star=5 #Length in m
w=9 #Uniformly distributed load in kN/m
f=7 #Bending stress in N/sq.mm
E=1e4 #Young's modulus in N/sq.mm
yc=10 #Central deflection in mm
#Calculation
W=w*L_star*1e3 #Total load in N
bd3=((W*(L**3)*12*5)/(E*yc*384)) #width X depth^3 in mm^4
M=(W*L/8) #Maximum bending moment in Nmm
bd2=round(M*12/(f*2),2) #width X depth^2 in mm^3
d=round(bd3/bd2,2) #Depth of beam in mm
b=str(M*12/(f*2)/d**2)[:6] #Width of beam in mm
#Result
print "Depth of beam =",d,"mm"
print "Width of beam =",b,"mm"
#Given
#Variable declaration
L=5*1000 #Length in mm
f=8 #Bending stress in N/sq.mm
yc=10 #Central deflection in mm
E=1.2e4 #Young's modulus in N/sq.mm
#Calculation
d=round((5*L**2*(f*2*8))/(E*384*yc)*1e-1,2) #Depth of beam in cm
#Result
print "Depth of beam =",d,"cm"
#Given
#Variable declaration
L=6*1000 #Length in mm
W=40*1000 #Point load in N
a=4*1000 #Distance of point load from left support in mm
I=7.33e7 #Moment of Inertia in mm^4
E=2e5 #Young's modulus in sq.mm
#Calculation
b=L-a #Width of beam in mm
yc=round(-(W*a**2*b**2)/(3*E*I*L),1) #Deflection under the load in mm
#Result
print "Deflection under the load =",yc,"mm"