PotentialityFlowRouter: Find flow directions and accumulation using potential-field theory#
- class PotentialityFlowRouter(*args, **kwds)[source]#
Bases:
Component
Multidirectional flow routing using a novel method.
This class implements Voller, Hobley, and Paola’s experimental matrix solutions for flow routing. The method works by solving for a potential field at all nodes on the grid, which enforces both mass conservation and flow downhill along topographic gradients. It is order n and highly efficient, but does not return any information about flow connectivity.
Options are permitted to allow “abstract” routing (flow enforced downslope, but no particular assumptions are made about the governing equations), or routing according to the Chezy or Manning equations. This routine assumes that water is distributed evenly over the surface of the cell in deriving the depth, and does not assume channelization. You will need to back- calculate channel depths for yourself using known widths at each node if that is what you want.
It is VITAL you initialize this component AFTER setting boundary conditions.
If Manning or Chezy specified, the surface_water__depth is the depth of flow in the cell, calculated assuming flow occurs over the whole surface.
Note that this component offers the property discharges_at_links. This returns the discharges at all links. If method==’D8’, this list will include diagonal links after the orthogonal links, which is why this information is not returned as a field.
Discharges at nodes are recorded as the outgoing total discharge (i.e., including any contribution from ‘water__unit_flux_in’).
The primary method of this class is
run_one_step
.Notes
This is a “research grade” component, and is subject to dramatic change with little warning. No guarantees are made regarding its accuracy or utility. It is not recommended for user use yet!
Examples
>>> from landlab import HexModelGrid >>> import numpy as np >>> mg = HexModelGrid( ... (4, 6), spacing=2.0, node_layout="rect", orientation="vertical" ... ) >>> z = mg.add_zeros("topographic__elevation", at="node") >>> Q_in = mg.add_ones("water__unit_flux_in", at="node") >>> z += mg.node_y.copy() >>> potfr = PotentialityFlowRouter(mg) >>> potfr.run_one_step() >>> mg.at_node["surface_water__discharge"][mg.core_nodes] array([ 11.70706863, 11.5709712 , 10.41329927, 9.24959728, 6.65448576, 6.39262702, 5.71410162, 5.04743495])
References
Required Software Citation(s) Specific to this Component
None Listed
Additional References
None Listed
- Parameters:
grid (ModelGrid) – A grid.
method ({'D8', 'D4'}, optional) – Routing method (‘D8’ is the default). This keyword has no effect for a Voronoi-based grid.
flow_equation ({'default', 'Manning', 'Chezy'}, optional) – If Manning or Chezy, flow is routed according to the Manning or Chezy equation; discharge is allocated to multiple downslope nodes proportional to the square root of discharge; and a water__depth field is returned. If default, flow is allocated to multiple nodes linearly with slope; and the water__depth field is not calculated.
Chezys_C (float (optional)) – Required if flow_equation == ‘Chezy’.
Mannings_n (float (optional)) – Required if flow_equation == ‘Manning’.
- __init__(grid, method='D8', flow_equation='default', Chezys_C=30.0, Mannings_n=0.03)[source]#
- Parameters:
grid (ModelGrid) – A grid.
method ({'D8', 'D4'}, optional) – Routing method (‘D8’ is the default). This keyword has no effect for a Voronoi-based grid.
flow_equation ({'default', 'Manning', 'Chezy'}, optional) – If Manning or Chezy, flow is routed according to the Manning or Chezy equation; discharge is allocated to multiple downslope nodes proportional to the square root of discharge; and a water__depth field is returned. If default, flow is allocated to multiple nodes linearly with slope; and the water__depth field is not calculated.
Chezys_C (float (optional)) – Required if flow_equation == ‘Chezy’.
Mannings_n (float (optional)) – Required if flow_equation == ‘Manning’.
- property discharges_at_links#
Return the discharges at links.
Note that if diagonal routing, this will return number_of_d8. Otherwise, it will be number_of_links.