Merge pull request #12 from sdteffen/pumpEN_MINORLOSS
Fix ENgetlinkvalue() for EN_MINORLOSS and pumps.
This commit is contained in:
@@ -1642,12 +1642,9 @@ int DLLEXPORT ENgetlinkvalue(int index, int code, float *value)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EN_MINORLOSS:
|
case EN_MINORLOSS:
|
||||||
if (Link[index].Type != PUMP)
|
|
||||||
{
|
|
||||||
v = Link[index].Km;
|
v = Link[index].Km;
|
||||||
|
if (Link[index].Type != PUMP)
|
||||||
v *= (SQR(Link[index].Diam)*SQR(Link[index].Diam)/0.02517);
|
v *= (SQR(Link[index].Diam)*SQR(Link[index].Diam)/0.02517);
|
||||||
}
|
|
||||||
else v = 0.0;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EN_INITSTATUS:
|
case EN_INITSTATUS:
|
||||||
|
|||||||
Reference in New Issue
Block a user