Update hydraul.c

This commit is contained in:
Lew Rossman
2025-04-19 14:39:12 -04:00
parent 47b474ff4c
commit ee9313aa24

View File

@@ -127,12 +127,18 @@ void inithyd(Project *pr, int initflag)
hyd->LinkStatus[i] = link->InitStatus; hyd->LinkStatus[i] = link->InitStatus;
hyd->LinkSetting[i] = link->InitSetting; hyd->LinkSetting[i] = link->InitSetting;
// Set runtime setting of non-ACTIVE valves to "MISSING" // Setting of non-ACTIVE FCV, PRV, PSV valves is "MISSING"
if (link->Type >= PRV && link->InitStatus != ACTIVE) switch (link->Type)
{
case FCV:
case PRV:
case PSV:
if (link->InitStatus != ACTIVE)
{ {
link->Kc = MISSING; link->Kc = MISSING;
hyd->LinkSetting[i] = MISSING; hyd->LinkSetting[i] = MISSING;
} }
}
// Compute flow resistance // Compute flow resistance
resistcoeff(pr, i); resistcoeff(pr, i);