diff --git a/ReleaseNotes2_3.md b/ReleaseNotes2_3.md index 3e3f924..7042988 100644 --- a/ReleaseNotes2_3.md +++ b/ReleaseNotes2_3.md @@ -22,6 +22,8 @@ This document describes the changes and updates that have been made in version 2 - changing the absolute tolerance used to compare the closeness of test results to benchmark values from 0 to 0.0001 - dropping the "correct decimal digits" test - dropping the check for identical status report content since it prevents accepting code changes that produce more accurate solutions in fewer iterations. + - A possible loss of network connectivity when evaluating a Pressure Sustaining Valve was prevented. + - Having the implied loss coefficient for an active Flow Control Valve be less than its fully opened value was prevented. diff --git a/src/hydstatus.c b/src/hydstatus.c index 4013ec9..d0f1d02 100644 --- a/src/hydstatus.c +++ b/src/hydstatus.c @@ -7,7 +7,7 @@ Description: updates hydraulic status of network elements Authors: see AUTHORS Copyright: see AUTHORS License: see LICENSE -Last Updated: 05/15/2019 +Last Updated: 08/08/2022 ****************************************************************************** */ @@ -394,6 +394,15 @@ StatusType fcvstatus(Project *pr, int k, StatusType s, double h1, double h2) { status = ACTIVE; } + + // Active valve's loss coeff. can't be < fully open loss coeff. + else if (status == ACTIVE) + { + if ((h1 - h2) / SQR(hyd->LinkFlow[k] < pr->network.Link[k].Km) + { + status = XFCV; + } + } return status; }