Adding Pipe Leakage Modeling

This commit is contained in:
Lew Rossman
2024-06-26 11:34:19 -04:00
parent cc9105fda6
commit 037ca41af6
25 changed files with 1365 additions and 221 deletions

View File

@@ -7,7 +7,7 @@
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 03/29/2023
Last Updated: 06/15/2024
******************************************************************************
*/
@@ -310,6 +310,7 @@ void matrixcoeffs(Project *pr)
linkcoeffs(pr);
emittercoeffs(pr);
demandcoeffs(pr);
if (hyd->HasLeakage) leakagecoeffs(pr);
// Update nodal flow balances with demands and add onto r.h.s. coeffs.
nodecoeffs(pr);
@@ -606,7 +607,7 @@ void demandheadloss(Project *pr, int i, double dp, double n,
Hydraul *hyd = &pr->hydraul;
double d = hyd->DemandFlow[i];
double dfull = hyd->NodeDemand[i];
double dfull = hyd->FullDemand[i];
double r = d / dfull;
// Evaluate inverted demand function