Add support for bar and feet as pressure units, fix psi or m for emitters

This commit is contained in:
lbutler
2025-07-04 16:10:01 -04:00
parent f8f2d74bea
commit 3d1d6496c9
12 changed files with 59 additions and 25 deletions

View File

@@ -166,6 +166,8 @@ 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_BAR = 3
Public Const EN_FEET = 4
Public Const EN_DDA = 0 ' Demand driven analysis
Public Const EN_PDA = 1 ' Pressure driven analysis

View File

@@ -170,6 +170,8 @@ namespace EpanetCSharpLibrary
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_BAR = 3;
public const int EN_FEET = 4;
public const int EN_DDA = 0; //Demand driven analysis
public const int EN_PDA = 1; //Pressure driven analysis

View File

@@ -174,6 +174,8 @@ const
EN_PSI = 0; { Pressure units types }
EN_KPA = 1;
EN_METERS = 2;
EN_BAR = 3;
EN_FEET = 4;
EN_DDA = 0; { Demand model types }
EN_PDA = 1;

View File

@@ -161,6 +161,8 @@ 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_BAR = 3
Public Const EN_FEET = 4
Public Const EN_DDA = 0 ' Demand driven analysis
Public Const EN_PDA = 1 ' Pressure driven analysis

View File

@@ -301,14 +301,14 @@ typedef enum {
/// Pressure units
/**
The available choices for pressure units for the `EN_PRESS_UNITS` option in @ref EN_getoption
and @ref EN_setoption. For networks using US Customary units for flow (`EN_CFS` through
`EN_AFD`) pressure units can only be set as PSI. For network using metric units, you can
select either `EN_METERS` or `EN_KPA`.
and @ref EN_setoption.
*/
typedef enum {
EN_PSI = 0, //!< Pounds per square inch
EN_KPA = 1, //!< Kilopascals
EN_METERS = 2 //!< Meters
EN_METERS = 2, //!< Meters
EN_BAR = 3, //!< Bar
EN_FEET = 4 //!< Feet
} EN_PressUnits;
/// Demand models