Skip to content

Commit

Permalink
Update design_graphfcns.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobson committed Dec 12, 2024
1 parent a7b598c commit 9918113
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/swmmanywhere/graphfcns/design_graphfcns.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ def process_successors(
hydraulic_design (parameters.HydraulicDesign): A HydraulicDesign parameter
object
"""
anc = nx.ancestors(G, node).union([node])
tot = sum([G.nodes[anc_node]["contributing_area"] for anc_node in anc])

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
Expand Down

0 comments on commit 9918113

Please sign in to comment.