Breaking News

Program to draw the IL of a Deck Girder Bridge



#This program is built to find an Influence Line diagram of a Deck Girder bridge at several intervals for HS loading Conditions. ( According to the required graphs for CE 3214: RCC-II lab)


#You must have installed the matplotlib module in python.

The code is as follows:

# Made by Arafat
""" This program is built to find IL diagram of a bridge at several intervals
for HS loading Condition.
"""
from matplotlib import pyplot as plt
import numpy as np

def IL_HS_bridge():
"""
You will get the unit as you input. If you wanna get other units,
just change the notations in code.
"""

# Define and input the length of the bridge.
L = float(input("Enter the total length of bridge in ft: "))

# Define and input the HS-20 or HS-15 loading containing three wheel on the bridge
load1 = float(input("Enter the weight of first or second (as same) wheel in kip: "))
load2 = float(input("Enter the weight of third wheel in kip: "))

# Define and input the S/5 wheel load ratio on wheel of vehicle.
factor = float(input("Enter the factor of wheel loads: "))

# Define and input gaps between the wheels of the vehicle.
w1 = float(input("Enter the gap between first and second wheel in ft : "))
w2 = float(input("Enter the gap between second and third wheel in ft: "))


# Arranging the condition for the program.

l1 = 0.1 * L
l2 = 0.2 * L
l3 = 0.3 * L
l4 = 0.4 * L
l5 = 0.5 * L
list = [l1, l2, l3, l4, l5]
f1 = load1 * factor
f2 = load2 * factor
length = len(list)


# Programming the necessary required values and then plotting them as
# graphs using matplotlib.

for i in range(length):

l_fact = list[i]
t = L - l_fact

# Building the IL line for Moment as well as the Influenced Moment value diagrams
# and plotting them in individual graphs.

IL_moment = (l_fact * t)/L
BM = (((f1 * (t + (t - w1))) + (f2 * (t-w1-w2)))) * ((l_fact * t)/(L * t))
Bent_Moment = round(BM, 2)
xpoints1 = np.array([0, l_fact, L])
ypoints1 = np.array([0, IL_moment, 0])

plt.plot([0, L], [0, 0])
plt.plot(xpoints1, ypoints1, marker='o', c='black', mfc='c')
plt.title("Live Load Moment Influence Line")
plt.xlabel("Length in ft")
plt.ylabel("Influence factor")
plt.show()


xpoints2 = np.array([0, l_fact, L])
ypoints2 = np.array([0, BM, 0])

plt.plot([0, L], [0, 0])
plt.plot(xpoints2, ypoints2, marker='D', c='r', mfc='g')
plt.title("Live Load Influenced Moment Diagram")
plt.xlabel("Length in ft")
plt.ylabel("Live Load Moment in kip-ft")
plt.show()
print("The influenced moment at " + str(l_fact) + "ft : "+ str(Bent_Moment) +\
" k-ft ")


# Building the IL line for shear as well as the Influenced shear value diagrams
# and plotting them in individual graphs.
IL_shear = t/L
IL_shear_neg = l_fact/L
IL_shear_pos = t/L
LLS = (f1 + f1 + f2) - (((f1 * (l_fact + l_fact + w1)) + (f2 * (l_fact+w1+w2)))\
*(IL_shear / t))
Shear = round(LLS, 2)
xpoints3 = np.array([0, l_fact, l_fact, L])
ypoints3 = np.array([0, -IL_shear_neg, IL_shear_pos, 0])


plt.plot([0, L], [0, 0])
plt.plot(xpoints3, ypoints3, marker='o', c='black', mfc='b' )
plt.title("Live load Shear Influence Line")
plt.xlabel("Length in ft")
plt.ylabel("Influence factor")
plt.show()

xpoints4 = np.array([0, l_fact, L])
ypoints4 = np.array([0, Shear, 0])

""""
plt.plot([0, L], [0, 0])
plt.plot(xpoints4, ypoints4, marker='D', c='green', mfc='r')
plt.title("influenced live Load Shear Diagram")
plt.xlabel("Length in ft")
plt.ylabel("Live Load Shear in kip")
plt.show()
"""
print("The influenced shear at " + str(l_fact) + "ft : " + str(Shear) + " kip ")

# Running the program
IL_HS_bridge()







No comments