Fix for FCV problem

This update prevents a solution where the computed loss coefficient for a FCV at its flow setting would be less than the user supplied fully opened coefficient.
This commit is contained in:
Lew Rossman
2022-08-08 18:08:45 -04:00
parent bed2fdca21
commit 2d783041a4
2 changed files with 12 additions and 1 deletions

View File

@@ -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.

View File

@@ -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;
}