5.1.010 bug: hotstart files |
I'm a research assistant at Graz University of Technology and a frequent user of SWMM (currently using the newest version 5.1.010). Recently we discovered what we think is a bug that came up between the versions 5.1.007 and 5.1.010. It regards HOTSTART files in combination with models using pollutants. It occurred to us, that when using a HOTSTART file within a model that contains pollutants, the continuity error suddenly flies off the charts for a normally stable model. We cross-checked the problem with other models and found out that the problem can be reproduced. Deleting the pollutants and starting the result with a newly generated HOTSTART file creates in a normal result again.
Sorry for the delay in answering this email but I think we have identified the problem with the hot start file and water quality. It involves the routine readRouting which was modified in SWMM 5.1.008 to read and write the link setting. If you use water quality the setting is not read correctly. See below for a code movement suggestion for the section called read link states. The target setting was being set after the reading of the water quality status.
// --- read link states for (i = 0; i < Nobjects[LINK]; i++) { if (!readFloat(&x, f)) return; Link[i].newFlow = x; if (!readFloat(&x, f)) return; Link[i].newDepth = x; if (!readFloat(&x, f)) return; Link[i].setting = x; //// New code added to release 5.1.008. //// move these reads to before the pollutant reading - RED // these have to be set after the reading of the setting from the hot start file - RED // --- set link's target setting to saved setting Link[i].targetSetting = x; link_setTargetSetting(i); link_setSetting(i, 0.0); for (j = 0; j < Nobjects[POLLUT]; j++) { if (!readFloat(&x, f)) return; Link[i].newQual[j] = x; } //// New code added to release 5.1.008. //// //(5.1.008) // --- set link's target setting to saved setting - RED - delete or comment out the settting of the Target //Link[i].targetSetting = x; //link_setTargetSetting(i); //link_setSetting(i, 0.0); }