Fixing conversion error in ENgetnodevalue EN_TANKDIAM

The Tank.A(area) is calculated as:
 Tank[j].A = PI*SQR(Tank[j].A/Ucf[ELEV])/4.0; //diameter is stored in Tank[j].A
so the right equation to get the diameter back is  sqrt(4.0/PI*Tank[index-Njuncs].A)*Ucf[ELEV];
This commit is contained in:
yuniersoad
2013-05-14 19:38:40 +00:00
parent 21de4d7ad9
commit e0582a8bff

View File

@@ -1460,7 +1460,7 @@ int DLLEXPORT ENgetnodevalue(int index, int code, float *value)
v = 0.0; v = 0.0;
if ( index > Njuncs ) if ( index > Njuncs )
{ {
v = 4.0/PI*sqrt(Tank[index-Njuncs].A)*Ucf[ELEV]; v = sqrt(4.0/PI*Tank[index-Njuncs].A)*Ucf[ELEV];
} }
break; break;