Add EN_PRESS_UNITS to EN_getoption & EN_setoption

This commit is contained in:
Luke Butler
2023-03-16 16:13:49 -04:00
parent ffe272462f
commit 4beebbd470
10 changed files with 123 additions and 8 deletions

View File

@@ -157,6 +157,10 @@ namespace EpanetCSharpLibrary
public const int EN_CMD = 9;
public const int EN_CMS = 10;
public const int EN_PSI = 0; //Pressure units types
public const int EN_KPA = 1;
public const int EN_METERS = 2;
public const int EN_DDA = 0; //Demand driven analysis
public const int EN_PDA = 1; //Pressure driven analysis
@@ -185,6 +189,7 @@ namespace EpanetCSharpLibrary
public const int EN_CONCENLIMIT = 22;
public const int EN_DEMANDPATTERN = 23;
public const int EN_EMITBACKFLOW = 24;
public const int EN_PRESS_UNITS = 25;
public const int EN_LOWLEVEL = 0; //Control types
public const int EN_HILEVEL = 1;

View File

@@ -154,6 +154,10 @@ Public Const EN_CMH = 8
Public Const EN_CMD = 9
Public Const EN_CMS = 10
Public Const EN_PSI = 0 ' Pressure units types
Public Const EN_KPA = 1
Public Const EN_METERS = 2
Public Const EN_DDA = 0 ' Demand driven analysis
Public Const EN_PDA = 1 ' Pressure driven analysis
@@ -182,6 +186,7 @@ Public Const EN_TANKORDER = 21
Public Const EN_CONCENLIMIT = 22
Public Const EN_DEMANDPATTERN = 23
Public Const EN_EMITBACKFLOW = 24
Public Const EN_PRESS_UNITS = 25
Public Const EN_LOWLEVEL = 0 ' Control types
Public Const EN_HILEVEL = 1

View File

@@ -149,6 +149,10 @@ Public Const EN_CMH = 8
Public Const EN_CMD = 9
Public Const EN_CMS = 10
Public Const EN_PSI = 0 ' Pressure units types
Public Const EN_KPA = 1
Public Const EN_METERS = 2
Public Const EN_DDA = 0 ' Demand driven analysis
Public Const EN_PDA = 1 ' Pressure driven analysis
@@ -177,6 +181,7 @@ Public Const EN_TANKORDER = 21
Public Const EN_CONCENLIMIT = 22
Public Const EN_DEMANDPATTERN = 23
Public Const EN_EMITBACKFLOW = 24
Public Const EN_PRESS_UNITS = 25
Public Const EN_LOWLEVEL = 0 ' Control types
Public Const EN_HILEVEL = 1

View File

@@ -291,6 +291,19 @@ typedef enum {
EN_CMS = 10 //!< Cubic meters per second
} EN_FlowUnits;
/// Pressure units
/**
The available choices for pressure units for the \b EN_PRESS_UNITS option in @ref EN_getoption
and @ref EN_setoption. For networks using US Customary units for flow ( \b EN_CFS through
\b EN_AFD ) pressure units can only be set as PSI. For network using metric units, you can
select either \b EN_MTR or \b EN_KPA.
*/
typedef enum {
EN_PSI = 0, //!< Pounds per square inch
EN_KPA = 1, //!< Kilopascals
EN_METERS = 2 //!< Meters
} EN_PressUnits;
/// Demand models
/**
These choices for modeling consumer demands are used with @ref EN_getdemandmodel
@@ -337,7 +350,8 @@ 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, //!< 1 if emitters can backflow, 0 if not
EN_PRESS_UNITS = 25 //!< Pressure units (see @ref EN_PressUnits)
} EN_Option;
/// Simple control types