Spaces:
Sleeping
Sleeping
Commit ·
770f1c9
1
Parent(s): 2dacb5f
Update app.py
Browse files395 unmodified lines39639739839940040114 unmodified lines416417418419420421422423424425426427428429430431432433434435436437395 unmodified linesimport streamlit as stdef main():st.title("Goda Horizontal Loading Calculator")# Display the image14 unmodified linesPmin = st.number_input("Non-Dimensional Pmin (For Suction Loads - from Graphs Above)", value=0.4)s = st.number_input("Non-Dimensional s (For Suction Loads - from Graphs Above)", value=0.5)p2_bottom = st.number_input("Non-Dimensional p2 (For Suction Loads - from Graphs Above)", value=0.55)Hmax = Hs*1.8 #design wave height, equal to the mean of the highest 1/250 of the wave heights [m].h = Still_Water_Level - Bottom_of_Wall #water depth [m]d = h #water depth in front of the caisson, on top of the foundation [m]h_acc = h #submerged depth of the caisson [m]hc = Top_of_Wall_Height - Still_Water_Level #height of the caisson above the water line [m]slope_foreshore = [1,100] #slope of the foreshore [rad]lambda_=[1,1,1]if st.button("Calculate"):result = goda(Case = Case_number, Hs=Hs, Hmax=Hmax, h=h, d=d, h_acc=h_acc, hc=hc, T=T,beta=beta, rho=rho, slope_foreshore=slope_foreshore, B = B, lambda_=lambda_,Still_Water_Level = Still_Water_Level, Top_of_Wall_Height= Top_of_Wall_Height,Bottom_of_Wall=Bottom_of_Wall, Pmin=Pmin, s=s, p2_bottom=p2_bottom )if __name__ == "__main__":395 unmodified lines39639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643714 unmodified lines452453454455456457458459460461462463464465466467468469470395 unmodified linesimport streamlit as st#def main():# st.title("Goda Horizontal Loading Calculator")# # Display the image# img = mpimg.imread('Goda_Suction.png')# st.image(img, use_column_width=True)# User Inputs# Case_number = st.number_input("Case Number", value=3, min_value=1, step=1)# B = st.number_input("Width of Wall", value=2.0, min_value=0.0)# Bottom_of_Wall = st.number_input("Bottom of Wall", value=-11.92)# Still_Water_Level = st.number_input("Stillwater Level", value=0.0)# Top_of_Wall_Height = st.number_input("Top of Wall Height", value=7.27)# Hs = st.number_input("Hs", value=4.5)# T = st.number_input("T", value=7.0)# beta = st.number_input("Beta", value=0.0)# rho = st.number_input("Rho", value=2.0)# Pmin = st.number_input("Non-Dimensional Pmin (For Suction Loads - from Graphs Above)", value=0.4)# s = st.number_input("Non-Dimensional s (For Suction Loads - from Graphs Above)", value=0.5)# p2_bottom = st.number_input("Non-Dimensional p2 (For Suction Loads - from Graphs Above)", value=0.55)# Hmax = Hs*1.8 #design wave height, equal to the mean of the highest 1/250 of the wave heights [m].# h = Still_Water_Level - Bottom_of_Wall #water depth [m]# d = h #water depth in front of the caisson, on top of the foundation [m]# h_acc = h #submerged depth of the caisson [m]# hc = Top_of_Wall_Height - Still_Water_Level #height of the caisson above the water line [m]# slope_foreshore = [1,100] #slope of the foreshore [rad]# lambda_=[1,1,1]# if st.button("Calculate"):# result = goda(Case = Case_number, Hs=Hs, Hmax=Hmax, h=h, d=d, h_acc=h_acc, hc=hc, T=T,# beta=beta, rho=rho, slope_foreshore=slope_foreshore, B = B, lambda_=lambda_,# Still_Water_Level = Still_Water_Level, Top_of_Wall_Height= Top_of_Wall_Height,# Bottom_of_Wall=Bottom_of_Wall, Pmin=Pmin, s=s, p2_bottom=p2_bottom )def main():st.title("Goda Horizontal Loading Calculator")# Display the image14 unmodified linesPmin = st.number_input("Non-Dimensional Pmin (For Suction Loads - from Graphs Above)", value=0.4)s = st.number_input("Non-Dimensional s (For Suction Loads - from Graphs Above)", value=0.5)p2_bottom = st.number_input("Non-Dimensional p2 (For Suction Loads - from Graphs Above)", value=0.55)if st.button("Run Dispersion"):dispersion_result = dispersion(Hs, T, beta)st.write("Dispersion Result:")st.write("Wave Length:", dispersion_result["wave_length"])if st.button("Run Goda"):goda_result = goda(Case=Case_number, Hs=Hs, Hmax=Hmax, h=h, d=d, h_acc=h_acc, hc=hc, T=T,beta=beta, rho=rho, slope_foreshore=slope_foreshore, B=B, lambda_=lambda_,Still_Water_Level=Still_Water_Level, Top_of_Wall_Height=Top_of_Wall_Height,Bottom_of_Wall=Bottom_of_Wall, Pmin=Pmin, s=s, p2_bottom=p2_bottom)st.write("Goda Result:")st.write("Output:", goda_result)if __name__ == "__main__":
app.py+48-15