fake data was being written to the binary file. if a link element is nominally closed, even if there's actually flow calculated there, the flow is disregarded upon writing results. so when the flow is read back in, it's zero -- which is different than it would have been if it had stayed in memory. i wonder what that does to mass balance?

this version works, at least with Net3, simplenet, and SampleTown -- but the results are non-canonical, as the current workaround for the issue above writes tiny flow values to the binary file for closed elements. presumably we should check for closed status in the transport() function.
This commit is contained in:
sam hatchett
2013-03-09 09:46:12 -05:00
parent 992866e602
commit bd62f399f9
8 changed files with 197 additions and 54 deletions

View File

@@ -258,6 +258,9 @@ int nexthyd(long *tstep)
else
{
Htime++; /* Force completion of analysis */
if (OpenQflag) {
Qtime++; // force completion of wq analysis too
}
}
*tstep = hydstep;
return(errcode);
@@ -1049,13 +1052,8 @@ void tanklevels(long tstep)
/* Update the tank's volume & water elevation */
n = Tank[i].Node;
// only adjust tank volume if we're in sequential mode.
// otherwise, the tankmixing function will do it for us.
if (!OpenQflag) {
dv = D[n]*tstep;
Tank[i].V += dv;
}
dv = D[n]*tstep;
Tank[i].V += dv;
/*** Updated 6/24/02 ***/
/* Check if tank full/empty within next second */