Skip to content

Commit

Permalink
Merge pull request #354 from ImperialCollegeLondon/barneydobson-patch-2
Browse files Browse the repository at this point in the history
Update design_graphfcns.py
  • Loading branch information
barneydobson authored Dec 13, 2024
2 parents a7b598c + 5d83e07 commit 0b2c343
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/swmmanywhere/graphfcns/design_graphfcns.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ def process_successors(
hydraulic_design (parameters.HydraulicDesign): A HydraulicDesign parameter
object
"""
# Find contributing area with ancestors
# TODO - could do timearea here if i hated myself enough
anc = nx.ancestors(G, node).union([node])
tot = sum([G.nodes[anc_node]["contributing_area"] for anc_node in anc])
M3_PER_HR_TO_M3_PER_S = 1 / 60 / 60
Q = tot * hydraulic_design.precipitation * M3_PER_HR_TO_M3_PER_S

for ix, ds_node in enumerate(G.successors(node)):
edge = G.get_edge_data(node, ds_node, 0)
# Find contributing area with ancestors
# TODO - could do timearea here if i hated myself enough
anc = nx.ancestors(G, node).union([node])
tot = sum([G.nodes[anc_node]["contributing_area"] for anc_node in anc])

M3_PER_HR_TO_M3_PER_S = 1 / 60 / 60
Q = tot * hydraulic_design.precipitation * M3_PER_HR_TO_M3_PER_S

# Design the pipe to find the diameter and invert depth
diam, depth = design_pipe(
Expand Down

0 comments on commit 0b2c343

Please sign in to comment.