Decoupled pressure units from the flow unit system

Decoupled pressure units 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).
This commit is contained in:
lbutler
2025-07-03 08:30:43 -04:00
parent d2145a396f
commit f8f2d74bea
5 changed files with 215 additions and 15 deletions

View File

@@ -1411,8 +1411,6 @@ int DLLEXPORT EN_setoption(EN_Project p, int option, double value)
case EN_PRESS_UNITS:
unit = ROUND(value);
if (unit < 0 || unit > METERS) return 205;
if (p->parser.Unitsflag == US && unit > PSI) return 0;
if (p->parser.Unitsflag == SI && unit == PSI) return 0;
p->parser.Pressflag = unit;
dfactor = Ucf[DEMAND];