A simpler fix to EN_settankdata

Changes 1 line instead of 4.
This commit is contained in:
Lew Rossman
2020-04-19 09:16:08 -04:00
committed by GitHub
parent 3f515e7ad4
commit 99f09f1edb

View File

@@ -2628,7 +2628,7 @@ int DLLEXPORT EN_settankdata(EN_Project p, int index, double elev,
Network *net = &p->network;
int i, j, n, curveIndex = 0;
double area, elevation = elev;
double area, elevation = elev / Ucf[ELEV];
double *Ucf = p->Ucf;
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 / Ucf[ELEV];
net->Node[Tank[j].Node].El = elevation;
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 = elevation + initlvl / Ucf[ELEV];
Tank[j].Hmin = elevation + minlvl / Ucf[ELEV];
Tank[j].Hmax = elevation + maxlvl / Ucf[ELEV];
Tank[j].Vcurve = curveIndex;
if (curveIndex == 0)
{