Another option for EN_settankdata fix

This commit is contained in:
Elad Salomons
2020-04-19 18:05:08 +03:00
parent 37a58a467c
commit 37342c70b1

View File

@@ -2629,7 +2629,7 @@ int DLLEXPORT EN_settankdata(EN_Project p, int index, double elev,
int i, j, n, curveIndex = 0;
double *Ucf = p->Ucf;
double area, elevation = elev / Ucf[ELEV];
double area;
Stank *Tank = net->Tank;
Scurve *curve;
@@ -2666,11 +2666,11 @@ int DLLEXPORT EN_settankdata(EN_Project p, int index, double elev,
else area = PI * diam * diam / 4.0;
// Assign parameters to tank object
net->Node[Tank[j].Node].El = elevation;
net->Node[Tank[j].Node].El = elev / Ucf[ELEV];
Tank[j].A = area / Ucf[ELEV] / Ucf[ELEV];
Tank[j].H0 = elevation + initlvl / Ucf[ELEV];
Tank[j].Hmin = elevation + minlvl / Ucf[ELEV];
Tank[j].Hmax = elevation + maxlvl / Ucf[ELEV];
Tank[j].H0 = (elev + initlvl) / Ucf[ELEV];
Tank[j].Hmin = (elev + minlvl) / Ucf[ELEV];
Tank[j].Hmax = (elev + maxlvl) / Ucf[ELEV];
Tank[j].Vcurve = curveIndex;
if (curveIndex == 0)
{