Merge branch 'OpenWaterAnalytics:dev' into dev

This commit is contained in:
Luke Butler
2025-07-09 23:44:57 -04:00
committed by GitHub
4 changed files with 30 additions and 29 deletions

View File

@@ -440,7 +440,7 @@ typedef struct Project *EN_Project;
/**
@brief Opens a project's water quality solver.
@param ph n EPANET project handle.
@param ph an EPANET project handle.
@return an error code.
Call ::EN_openQ prior to running the first water quality analysis using an
@@ -502,7 +502,7 @@ typedef struct Project *EN_Project;
time step determined by when the next hydraulic event occurs. Use ::EN_stepQ instead
if you wish to generate results over each water quality time step.
The value of `tStep` is determined from information produced by the hydraulic analysis
The value of `out_tStep` is determined from information produced by the hydraulic analysis
that preceded the water quality analysis. Treat it as a read-only variable.
<b>Example:</b>
@@ -533,8 +533,8 @@ typedef struct Project *EN_Project;
quality time step of the simulation, rather than over each hydraulic event period
as with ::EN_nextQ.
Use the argument `timeLeft` to determine when no more calls to ::EN_runQ are needed
because the end of the simulation period has been reached (i.e., when `timeLeft` = 0).
Use the argument `out_timeLeft` to determine when no more calls to ::EN_runQ are needed
because the end of the simulation period has been reached (i.e., when `out_timeLeft` = 0).
*/
int DLLEXPORT EN_stepQ(EN_Project ph, long *out_timeLeft);
@@ -1020,7 +1020,7 @@ typedef struct Project *EN_Project;
@param[out] out_pexp Pressure exponent in demand function.
@return an error code.
Parameters `pmin`, `preq`, and `pexp` are only used when the demand model is `EN_PDA`.
Parameters `out_pmin`, `out_preq`, and `out_pexp` are only used when the demand model is `EN_PDA`.
*/
int DLLEXPORT EN_getdemandmodel(EN_Project ph, int *out_type, double *out_pmin,
double *out_preq, double *out_pexp);
@@ -1036,7 +1036,7 @@ typedef struct Project *EN_Project;
Set `type` to `EN_DDA` for a traditional demand driven analysis (in which case the
remaining three parameter values are ignored) or to `EN_PDA` for a pressure driven
analysis. In the latter case a node's demand is computed as:\n
analysis. In the latter case a node's demand is 0 when pressure is below `pmin`, is at full demand when pressure is above `preq`, or is otherwise computed as:\n
`Dfull * [ (P - pmin) / (preq - pmin) ] ^ pexp`\n
where `Dfull` is the full demand and `P` is the current pressure.
@@ -1147,7 +1147,7 @@ typedef struct Project *EN_Project;
@param[out] out_demandName The name of the selected category.
@return an error code.
`demandName` must be sized to contain at least @ref EN_SizeLimits "EN_MAXID+1" characters.
`out_demandName` must be sized to contain at least @ref EN_SizeLimits "EN_MAXID+1" characters.
*/
int DLLEXPORT EN_getdemandname(EN_Project ph, int nodeIndex, int demandIndex, char *out_demandName);
@@ -1738,7 +1738,7 @@ typedef struct Project *EN_Project;
@brief Gets the enabled status of a simple control.
@param ph an EPANET project handle.
@param index the control's index (starting from 1).
@param out_enabled the control will be either EN_TRUE=enabled or EN_FALSE=disabled.
@param out_enabled `EN_TRUE` (= 1) if the control is enabled or `EN_FALSE` (= 0) if it is disabled.
@return an error code.
*/
int DLLEXPORT EN_getcontrolenabled(EN_Project ph, int index, int *out_enabled);
@@ -1747,7 +1747,7 @@ typedef struct Project *EN_Project;
@brief Sets the enabled status of a simple control.
@param ph an EPANET project handle.
@param index the control's index (starting from 1).
@param enabled set the control to either EN_TRUE=enabled or EN_FALSE=disabled.
@param enabled `EN_TRUE` (= 1) sets the control to enabled, `EN_FALSE` (= 0) sets it to disabled.
@return an error code.
*/
int DLLEXPORT EN_setcontrolenabled(EN_Project ph, int index, int enabled);

View File

@@ -60,9 +60,9 @@ typedef enum {
EN_TANK_KBULK = 23, //!< Tank bulk decay coefficient
EN_TANKVOLUME = 24, //!< Current computed tank volume (read only)
EN_MAXVOLUME = 25, //!< Tank maximum volume (read only)
EN_CANOVERFLOW = 26, //!< Tank can overflow (= 1) or not (= 0)
EN_CANOVERFLOW = 26, //!< `EN_TRUE` (= 1) if the Tank can overflow, `EN_FALSE` (= 0) if it cannot
EN_DEMANDDEFICIT = 27,//!< Amount that full demand is reduced under PDA (read only)
EN_NODE_INCONTROL = 28, //!< Is present in any simple or rule-based control (= 1) or not (= 0)
EN_NODE_INCONTROL = 28, //!< `EN_TRUE` (= 1) if the node appears in any control, `EN_FALSE` (= 0) if not
EN_EMITTERFLOW = 29, //!< Current emitter flow (read only)
EN_LEAKAGEFLOW = 30, //!< Current leakage flow (read only)
EN_DEMANDFLOW = 31, //!< Current consumer demand delivered (read only)
@@ -81,7 +81,7 @@ typedef enum {
EN_MINORLOSS = 3, //!< Pipe/valve minor loss coefficient
EN_INITSTATUS = 4, //!< Initial status (see @ref EN_LinkStatusType)
EN_INITSETTING = 5, //!< Initial pump speed or valve setting
EN_KBULK = 6, //!< Bulk chemical reaction coefficient
EN_KBULK = 6, //!< Bulk flow chemical reaction coefficient
EN_KWALL = 7, //!< Pipe wall chemical reaction coefficient
EN_FLOW = 8, //!< Current computed flow rate (read only)
EN_VELOCITY = 9, //!< Current computed flow velocity (read only)
@@ -100,7 +100,7 @@ typedef enum {
EN_PUMP_EPAT = 22, //!< Pump energy price time pattern index
EN_LINK_INCONTROL = 23, //!< Is present in any simple or rule-based control (= 1) or not (= 0)
EN_GPV_CURVE = 24, //!< GPV head loss v. flow curve index
EN_PCV_CURVE = 25, //!< PCV loss coeff. curve index
EN_PCV_CURVE = 25, //!< PCV characteristic curve index
EN_LEAK_AREA = 26, //!< Pipe leak area (sq mm per 100 length units)
EN_LEAK_EXPAN = 27, //!< Leak expansion rate (sq mm per unit of pressure head)
EN_LINK_LEAKAGE = 28, //!< Current leakage rate (read only)
@@ -222,8 +222,8 @@ initial status (`EN_INITSTATUS`) or its current status (`EN_STATUS`). These opti
also used with @ref EN_setlinkvalue to set values for these same properties.
*/
typedef enum {
EN_CLOSED = 0,
EN_OPEN = 1
EN_CLOSED = 0, //!< Link is closed and cannot convey any flow
EN_OPEN = 1 //!< Link is open and is able to convey flow
} EN_LinkStatusType;
/// Pump states
@@ -357,7 +357,7 @@ typedef enum {
EN_TANKORDER = 21, //!< Bulk water reaction order for tanks
EN_CONCENLIMIT = 22, //!< Limiting concentration for growth reactions
EN_DEMANDPATTERN = 23, //!< Name of default demand pattern
EN_EMITBACKFLOW = 24, //!< 1 if emitters can backflow, 0 if not
EN_EMITBACKFLOW = 24, //!< `EN_TRUE` (= 1) if emitters can backflow, `EN_FALSE` (= 0) if not
EN_PRESS_UNITS = 25, //!< Pressure units (see @ref EN_PressUnits)
EN_STATUS_REPORT = 26 //!< Type of status report to produce (see @ref EN_StatusReport)
} EN_Option;