Skip to content

Commit

Permalink
Update foundationdesign.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kunle009 committed Aug 30, 2024
1 parent fb6007d commit b796bb0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions FoundationDesign/foundationdesign.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Main module that contains the main class for Pad foundation analysis
Main module that contains the main class for Pad foundation analysis
and auxillary class for Pad foundation design.
"""

Expand Down Expand Up @@ -1630,14 +1630,16 @@ def reinforcement_provision_flexure_X_dir(self, area_of_steel_provided=None):
bar_dia = steel_bars[1]
bar_spacing = steel_bars[2]
area_provided = steel_bars[3]

if area_of_steel_provided is not None:
try:
user_provided_area = float(area_of_steel_provided)
area_provided = user_provided_area
except ValueError:
print("Invalid input for user-provided area. Using the default calculated area.")

print(
"Invalid input for user-provided area. Using the default calculated area."
)

return {
"steel_label": steel_label,
"bar_diameter": bar_dia,
Expand Down Expand Up @@ -1712,7 +1714,9 @@ def reinforcement_provision_flexure_Y_dir(self, area_of_steel_provided=None):
user_provided_area = float(area_of_steel_provided)
area_provided = user_provided_area
except ValueError:
print("Invalid input for user-provided area. Using the default calculated area.")
print(
"Invalid input for user-provided area. Using the default calculated area."
)
return {
"steel_label": steel_label,
"bar_diameter": bar_dia,
Expand Down

0 comments on commit b796bb0

Please sign in to comment.