wntr.sim.hydraulics module

wntr.sim.hydraulics.create_hydraulic_model(wn, HW_approx='default')[source]
Parameters
  • wn (WaterNetworkModel) –

  • mode (str) –

  • HW_approx (str) – Specifies which Hazen-Williams headloss approximation to use. Options are ‘default’ and ‘piecewise’. Please see the WNTR documentation on hydraulics for details.

Returns

  • m (wntr.aml.Model)

  • model_updater (wntr.models.utils.ModelUpdater)

wntr.sim.hydraulics.update_model_for_controls(m, wn, model_updater, change_tracker)[source]
Parameters
Parameters
  • m (wntr.aml.Model) –

  • wn (wntr.network.WaterNetworkModel) –

  • model_updater (wntr.models.utils.ModelUpdater) –

  • prev_isolated_junctions (set) –

  • prev_isolated_links (set) –

  • isolated_junctions (set) –

  • isolated_links (set) –

wntr.sim.hydraulics.update_network_previous_values(wn)[source]
Parameters

wn (wntr.network.WaterNetworkModel) –

wntr.sim.hydraulics.update_tank_heads(wn)[source]
Parameters

wn (wntr.network.WaterNetworkModel) –

wntr.sim.hydraulics.initialize_results_dict(wn)[source]
Parameters

wn (wntr.network.WaterNetworkModel) –

Returns

res (dict)

wntr.sim.hydraulics.save_results(wn, node_res, link_res)[source]
Parameters
  • wn (wntr.network.WaterNetworkModel) –

  • node_res (OrderedDict) –

  • link_res (OrderedDict) –

wntr.sim.hydraulics.get_results(wn, results, node_res, link_res)[source]
Parameters
wntr.sim.hydraulics.store_results_in_network(wn, m)[source]
Parameters
  • wn (wntr.network.WaterNetworkModel) –

  • m (wntr.aml.Model) –