Add more analysis options to the API (issue #425)

This commit is contained in:
Lew Rossman
2019-04-03 21:17:28 -04:00
parent f63df92e52
commit 3e733f5a2a
5 changed files with 140 additions and 20 deletions

View File

@@ -140,7 +140,7 @@ Public Const EN_CMD = 9
Public Const EN_DDA = 0 ' Demand driven analysis
Public Const EN_PDA = 1 ' Pressure driven analysis
Public Const EN_TRIALS = 0 ' Hydraulic options
Public Const EN_TRIALS = 0 ' Simulation options
Public Const EN_ACCURACY = 1
Public Const EN_TOLERANCE = 2
Public Const EN_EMITEXPON = 3
@@ -152,6 +152,17 @@ Public Const EN_GLOBALEFFIC = 8
Public Const EN_GLOBALPRICE = 9
Public Const EN_GLOBALPATTERN = 10
Public Const EN_DEMANDCHARGE = 11
Public Const EN_SP_GRAVITY = 12
Public Const EN_SP_VISCOS = 13
Public Const EN_UNBALANCED = 14
Public Const EN_CHECKFREQ = 15
Public Const EN_MAXCHECK = 16
Public Const EN_DAMPLIMIT = 17
Public Const EN_SP_DIFFUS = 18
Public Const EN_BULKORDER = 19
Public Const EN_WALLORDER = 20
Public Const EN_TANKORDER = 21
Public Const EN_CONCENLIMIT = 22
Public Const EN_LOWLEVEL = 0 ' Control types
Public Const EN_HILEVEL = 1

View File

@@ -145,7 +145,7 @@ Public Const EN_CMD = 9
Public Const EN_DDA = 0 ' Demand driven analysis
Public Const EN_PDA = 1 ' Pressure driven analysis
Public Const EN_TRIALS = 0 ' Hydraulic options
Public Const EN_TRIALS = 0 ' Simulation options
Public Const EN_ACCURACY = 1
Public Const EN_TOLERANCE = 2
Public Const EN_EMITEXPON = 3
@@ -157,6 +157,17 @@ Public Const EN_GLOBALEFFIC = 8
Public Const EN_GLOBALPRICE = 9
Public Const EN_GLOBALPATTERN = 10
Public Const EN_DEMANDCHARGE = 11
Public Const EN_SP_GRAVITY = 12
Public Const EN_SP_VISCOS = 13
Public Const EN_UNBALANCED = 14
Public Const EN_CHECKFREQ = 15
Public Const EN_MAXCHECK = 16
Public Const EN_DAMPLIMIT = 17
Public Const EN_SP_DIFFUS = 18
Public Const EN_BULKORDER = 19
Public Const EN_WALLORDER = 20
Public Const EN_TANKORDER = 21
Public Const EN_CONCENLIMIT = 22
Public Const EN_LOWLEVEL = 0 ' Control types
Public Const EN_HILEVEL = 1

View File

@@ -282,13 +282,13 @@ typedef enum {
/// Simulation options
/**
These options specify hydraulic convergence criteria, choice of head loss formula, and
several other parameters applied on a network-wide basis. They are accessed using the
These constants identify the hydraulic and water quality simulation options
that are applied on a network-wide basis. They are accessed using the
@ref EN_getoption and @ref EN_setoption functions.
*/
typedef enum {
EN_TRIALS = 0, //!< Maximum hydraulic trials allowed
EN_ACCURACY = 1, //!< Maximum total relative flow change for hydraulic convergence
EN_TRIALS = 0, //!< Maximum hydraulic trials allowed for hydraulic convergence
EN_ACCURACY = 1, //!< Total normalized flow change for hydraulic convergence
EN_TOLERANCE = 2, //!< Water quality tolerance
EN_EMITEXPON = 3, //!< Exponent in emitter discharge formula
EN_DEMANDMULT = 4, //!< Global demand multiplier
@@ -299,6 +299,17 @@ typedef enum {
EN_GLOBALPRICE = 9, //!< Global energy price per KWH
EN_GLOBALPATTERN = 10, //!< Index of a global energy price pattern
EN_DEMANDCHARGE = 11 //!< Energy charge per max. KW usage
EN_SP_GRAVITY = 12, //!< Specific gravity
EN_SP_VISCOS = 13, //!< Specific viscosity (relative to water at 20 deg C)
EN_UNBALANCED = 14, //!< Extra trials allowed if hydraulics don't converge
EN_CHECKFREQ = 15, //!< Frequency of hydraulic status checks
EN_MAXCHECK = 16, //!< Maximum trials for status checking
EN_DAMPLIMIT = 17, //!< Accuracy level where solution damping begins
EN_SP_DIFFUS = 18, //!< Specific diffusivity (relative to chlorine at 20 deg C)
EN_BULKORDER = 19, //!< Bulk water reaction order for pipes
EN_WALLORDER = 20, //!< Wall reaction order for pipes (either 0 or 1)
EN_TANKORDER = 21, //!< Bulk water reaction order for tanks
EN_CONCENLIMIT = 22 //!< Limiting concentration for growth reactions
} EN_Option;
/// Types of simple controls