Adds tank overflow feature

This commit is contained in:
Lew Rossman
2019-06-17 09:16:04 -04:00
parent fe92a99554
commit 9669742ab3
7 changed files with 151 additions and 7 deletions

View File

@@ -441,7 +441,7 @@ void tankstatus(Project *pr, int k, int n1, int n2)
h = hyd->NodeHead[n1] - hyd->NodeHead[n2];
// If tank is full, then prevent flow into it
if (hyd->NodeHead[n1] >= tank->Hmax - hyd->Htol)
if (hyd->NodeHead[n1] >= tank->Hmax - hyd->Htol && !tank->CanOverflow)
{
// Case 1: Link is a pump discharging into tank
if (link->Type == PUMP)