10 KiB
Release Notes for EPANET 2.3
This document describes the changes and updates that have been made in version 2.3 of EPANET.
New Features
-
A
EN_setcurvetypefunction was added to allow API clients to set a curve's type (e.g.,EN_PUMP_CURVE,EN_VOLUME_CURVE,etc.). -
A
EN_setvertexfunction was added to allow API clients to change the coordinates of a single link vertex. -
Support has been added for FAVAD (Fixed And Variable Area Discharge) modeling of pipe leaks:
- A new
[LEAKAGE]section has been added to the input file format where each line contains the ID name of a pipe, its leak area in sq. mm per 100 length units, and its leak expansion rate in sq. mm per unit of pressure head. EN_LEAK_AREAandEN_LEAK_EXPANcan be used with the functionsEN_getlinkvalueandEN_setlinkvalueto retrieve and assign values for a pipe's leak area and expansion properties.EN_LINK_LEAKAGEcan be used withEN_getlinkvalueto retrieve a pipe's leakage rate at a given point in time.EN_LEAKAGEFLOWcan be used withEN_getnodevalueto retrieve the leakage demand generated at a node from all its connecting pipes at a given point in time.EN_LEAKAGELOSScan be used withEN_getstatisticto retrieve the total leakage loss in the system at a given point in time as a percentage of total flow entering the system.
- A new
-
Support has been added for reading the
[TAGS]section of an EPANET input file. In addition:- A newly added
EN_settagfunction will assign a Tag to a node or link. - A newly added
EN_gettagfunction will retrieve a node or link's Tag. - The existing
EN_saveinpfilewill include saving all node and link tags to file.
- A newly added
-
A new Flow Balance Report has been added to the end of a simulation run's Status Report that lists the various components of the system's total inflow and outflow over the simulation period. It also displays the ratio of outflow to inflow as a check on flow continuity.
-
A new type of valve, a Positional Control Valve (PCV), was added. It uses a valve characteristic curve to relate its loss coefficient to a percentage open setting (parameter -
EN_PCV). -
EN_VALVE_CURVEcan now be used with theEN_getcurvetypeandEN_setcurvetypeto get or set the valve position curve. -
EN_VALVE_TYPEcan now be used withEN_getlinkvalueandEN_setlinkvalueto get and set a valve's type. This is the preferred way to change just a valve's type rather than usingEN_setlinktype. -
A new set of functions has been added to get information about upcoming time step events. Users will now see what type of event is going to cause the end of a time step to occur. See
EN_timetonextevent. -
A new set of functions has been added to allow users to set a reporting callback function. The user-supplied function will receive all output normally directed to the report file.
-
A
EN_EMITBACKFLOWoption was added that either allows emitters to have reverse flow through them (the default) or not. -
The functions
EN_getnodevalueandEN_getlinkvaluenow include the optionsEN_NODE_INCONTROLandEN_LINK_INCONTROLto determine whether a node or link appears in any simple or rule-based control. -
EN_SET_CLOSEDandEN_SET_OPENconstants were added that can be used withEN_setcontrolto fix the status of pipes and valves to completely closed or completely open. -
EN_STATUS_REPORTcan now be used withEN_getoptionandEN_setoptionto get or set the type of status report that EPANET will generate (EN_NO_REPORT,EN_NORMAL_REPORTorEN_FULL_REPORT). -
EN_PRESS_UNITScan now be used withEN_getoptionandEN_setoptionto get or set a project's pressure units. The choices are EN_PSI, EN_KPA, EN_METERS, EN_BAR, or EN_FEET. -
Pressure units have been decoupled from the flow unit system, allowing them to be set independently to support mixed-unit conventions (e.g., using LPS for flow and PSI for pressure).
-
The following constants can be used with EN_getnodevalue to retrieve the components of a node's total demand at a given point in time:
EN_FULLDEMAND- the consumer demand requestedEN_DEMANDFLOW- the consumer demand deliveredEN_DEMANDDEFICIT- the difference between the consumer demand requested and deliveredEN_EMITTERFLOW- the node's emitter flowEN_LEAKAGEFLOW- the node's leakage flowEN_DEMAND- the sum of the node's consumer demand, emitter flow, and leakage flow
-
Additional API functions for enabling/disabling controls and rules were added (
EN_getcontrolenabled,EN_setcontrolenabled,EN_getruleenabled,EN_setruleenabled). A new keywordDISABLEDis added to the end of a control or rule statement in an EPANET input file to indicate that the control is disabled. -
The
EN_openXfunction has been added to enable the opening of input files with formatting errors through the API. This allows users to continue using toolkit functions even when such errors are present. -
The
EN_getnodesvaluesandEN_getlinksvalueswere added to retrieve a property value for all nodes or links in the network. -
Support was added for cubic meters per second (
EN_CMS) flow units. -
A header file for binding C# to the Toolkit has been added.
-
Support was added for Conan dependency manager.
Feature Updates
-
The check for at least two nodes, one tank/reservoir and no unconnected junction nodes was moved from
EN_opentoEN_openHandEN_openQso that partial network data files could be opened by the toolkit. -
The indices of a General Purpose Valve (GPV) and a Positional Control Valve (PCV) were added to the list of editable Link Properties using the symbolic constant names
EN_GPV_CURVEandEN_PCV_CURVE, respectively. -
The
EN_getlinkvalueandEN_setlinkvaluefunctions were updated to get and set the values ofEN_GPV_CURVEandEN_PCV_CURVE. -
Negative pressure values for
EN_SETTINGare now permitted in theEN_setlinkvaluefunction. -
The
EN_STARTTIMEparameter was added into theEN_settimeparamfunction. -
A
EN_DEMANDPATTERNparameter was added as the index of the default time pattern used by demands with no specific pattern assigned. It can be set or retrieved with theEN_setoptionandEN_getoptionfunctions, respectively, and is saved to the file when theEN_saveinpfilefunction is called. -
The
EN_getaveragepatternvaluefunction will now accept a pattern index of zero which represents the constant pattern assigned to junction demands by default. -
Improved updating and convergence tests were added to pressure-dependent demand analysis.
-
Improved checks to prevent outflow from empty tanks or inflow to full (non-overflow) tanks, including the case where a link is connected to a pair of tanks, were added.
-
The
EN_INITSETTINGoption in functionEN_setlinkvaluewill now save the setting value so that if a new simulation is begun or ifEN_saveinpfileis called the saved initial setting will remain in effect rather than whatever setting a simulation may have ended with. -
A new error code
263 - node is not a tankis returned whenEN_settankdataorEN_setnodevalueattempts to set a tank-only parameter for a non-tank node. -
Errors in node and link vertex coordinates are now ignored when reading an EPANET input file.
-
Only non-zero demands are now included in the
[DEMANDS]section of the input file produced byEN_saveinpfile. -
Setting the demand multiplier within the
[DEMANDS]section of INP has been depreciated, please useDEMAND MULTIPLIERinside[OPTIONS]instead. -
Continuous barrier functions were added to constrain emitter flows to allowable values.
-
The CI regression test protocol was modified by:
- changing the absolute tolerance used to compare the closeness of test results to benchmark values from 0 to 0.0001
- dropping the "correct decimal digits" test
- dropping the check for identical status report content since it prevents accepting code changes that produce more accurate solutions in fewer iterations.
Bug Fixes
-
The adjustment of a tank's minimum volume (
Vmin) when its parameters are changed usingEN_setnodevalueorEN_settankdatahas been corrected. -
A pump whose status is set to CLOSED in the input file now also has its speed setting set to zero which allows a simple pressure control to activate the pump correctly.
-
A failure to raise an error condition for a non-positive pipe roughness in the input file has been fixed.
-
The calculation of head loss gradient for low flow conditions was corrected.
-
A possible loss of network connectivity when evaluating a Pressure Sustaining Valve was prevented.
-
Having the implied loss coefficient for an active Flow Control Valve be less than its fully opened value was prevented.
-
An incorrect tank elevation value set using
EN_settankdatawith SI units has been fixed. -
An error is no longer raised when a minor loss coefficient of zero is assigned in
EN_setlinkvalue(ph, index, EN_MINORLOSS, 0). -
The incorrect display of unconnected nodes has been fixed.
-
The function
EN_saveinpfilewas corrected for simple controls on GPV's by saving their status instead of the index of their head loss curve. -
The internal Qualflag variable is now adjusted when an EPANET input file has a QUALITY option not equal to NONE and a simulation duration of zero.
-
An EPANET input file with simple timer control that has more than 9 input tokens no longer results in an incorrect hour setting.
-
A possible parser error that could result in a Trace Node ID in an input file not being recognized was fixed.
-
Updated the internal function
getclosedlinkin report.c to use a loop instead of recursion to prevent a stack overflow during the analysis of very large disconnections. -
Fixed a bug in EN_setnodevalue with EN_EMITTER option that could cause NaN results.
-
A failure to close a temporary hydraulics file between successive simulations of an opened project was fixed.
-
Corrupting the index of a water quality Trace Node when adding or deleting a node was fixed.