HydraulicOptions#

module wntr.network.options

class HydraulicOptions[source]#

Bases: _OptionsBase

Options related to hydraulic model. These options are named according to the settings in the EPANET “[OPTIONS]” section. Unless specified, these options are valid for both EPANET 2.0 and 2.2.

Parameters:
  • headloss (str) – Formula to use for computing head loss through a pipe. Options are “H-W”, “D-W”, and “C-M”, by default “H-W”.

  • hydraulics (str) – Indicates if a hydraulics file should be read in or saved; options are None, “USE” and “SAVE”, by default None.

  • hydraulics_filename (str) – Filename to use if hydraulics is not None, by default None.

  • viscosity (float) – Kinematic viscosity of the fluid, by default 1.0.

  • specific_gravity (float) – Specific gravity of the fluid, by default 1.0.

  • pattern (str) – Name of the default pattern for junction demands. By default, the default pattern is the pattern named “1”. If this is set to None (or if pattern “1” does not exist), then junctions with demands but without patterns will be held constant.

  • demand_multiplier (float) – The demand multiplier adjusts the values of baseline demands for all junctions, by default 1.0.

  • emitter_exponent (float) – The exponent used when computing flow from an emitter, by default 0.5.

  • minimum_pressure (float) – (EPANET 2.2 only) The global minimum nodal pressure, by default 0.0.

  • required_pressure (float) – (EPANET 2.2 only) The required nodal pressure, by default 0.07 (m H2O)

  • pressure_exponent (float) – (EPANET 2.2 only) The pressure exponent, by default 0.5.

  • trials (int) – Maximum number of trials used to solve network hydraulics, by default 200.

  • accuracy (float) – Convergence criteria for hydraulic solutions, by default 0.001.

  • headerror (float) – (EPANET 2.2 only) Augments the accuracy option by adjusting the head error convergence limit, by default 0 (off).

  • flowchange (float) – (EPANET 2.2 only) Augments the accuracy option by adjusting the flow change convergence limit, by default 0 (off).

  • unbalanced (str) – Indicate what happens if a hydraulic solution cannot be reached. Options are “STOP” and “CONTINUE”, by default “STOP”.

  • unbalanced_value (int) – Number of additional trials if unbalanced == "CONTINUE", by default None.

  • checkfreq (int) – Number of solution trials that pass between status checks, by default 2.

  • maxcheck (int) – Number of solution trials that pass between status check, by default 10.

  • damplimit (float) – Accuracy value at which solution damping begins, by default 0 (no damping).

  • demand_model (str) – Demand model for EPANET 2.2; acceptable values are “DD” and “PDD”, by default “DD”. EPANET 2.0 only contains demand driven analysis, and will issue a warning if this option is not set to DD.

  • inpfile_units (str) – Units for the INP file; options are “CFS”, “GPM”, “MGD”, “IMGD”, “AFD”, “LPS”, “LPM”, “MLD”, “CMH”, and “CMD”. This only changes the units used in generating the INP file – it has no impact on the units used in WNTR, which are always SI units (m, kg, s).

  • inpfile_pressure_units (str) – Pressure units for the INP file, by default None (uses pressure units from inpfile_units)


__init__(headloss='H-W', hydraulics=None, hydraulics_filename=None, viscosity=1.0, specific_gravity=1.0, pattern='1', demand_multiplier=1.0, demand_model='DD', minimum_pressure=0.0, required_pressure=0.07, pressure_exponent=0.5, emitter_exponent=0.5, trials=200, accuracy=0.001, unbalanced='STOP', unbalanced_value=None, checkfreq=2, maxcheck=10, damplimit=0, headerror=0, flowchange=0, inpfile_units='GPM', inpfile_pressure_units=None)[source]#
classmethod factory(val)#

Create an options object based on passing in an instance of the object, a dict, or a tuple