Network validity checks added to openhyd()
Checks on illegal valve connections made whenever API creates a new link, changes its end nodes, or changes its type.
This commit is contained in:
@@ -771,11 +771,19 @@ void pumpcoeff(Project *pr, int k)
|
||||
return;
|
||||
}
|
||||
|
||||
// Obtain reference to pump object & its speed setting
|
||||
// Obtain reference to pump object
|
||||
q = ABS(hyd->LinkFlow[k]);
|
||||
p = findpump(&pr->network, k);
|
||||
pump = &pr->network.Pump[p];
|
||||
|
||||
// If no pump curve treat pump as an open valve
|
||||
if (pump->Ptype == NOCURVE)
|
||||
{
|
||||
hyd->P[k] = 1.0 / CSMALL;
|
||||
hyd->Y[k] = hyd->LinkFlow[k];
|
||||
return;
|
||||
}
|
||||
|
||||
// Get pump curve coefficients for custom pump curve
|
||||
// (Other pump types have pre-determined coeffs.)
|
||||
if (pump->Ptype == CUSTOM)
|
||||
|
||||
Reference in New Issue
Block a user