Closed samhatchett closed 6 years ago
more info here: https://www.drink-water-eng-sci.net/11/25/2018/
The modifications proposed in the referenced paper are quite extensive
A short-term strategy could be to add logic to check for mass imbalance as a halting condition - if such is found, then output the appropriate text into the report file, indicating that the quality timestep should be reduced.
My testing has shown that using the existing water quality solver with the nodes pre-sorted from upstream to downstream (i.e., processing them topologically instead of in the order they appear in the input file) eliminates the mass balance errors almost entirely. It will still tend to smear out very short term concentration spikes which the Davis/Janke/Taxon method will preserve, but will be faster to run. Plus since the latter method ignores dispersion, it's apparent higher numerical accuracy will not necessarily be what actually occurs.
@LRossman - i didn't know you were working to resolve this. Are you doing anything related to Tom Taxon's work? What is your approach? I'm excited!
@samhatchett see my May 22 comment above. It uses node sorting as in Taxon's approach but otherwise still keeps the same dynamic pipe volume segment methodology of the current EPANET. However the sequence of steps changes. In current EPANET it is:
The new sequence looks as follows:
This new approach gets around the problem of losing (or gaining) mass flow for links whose time of travel is less than the quality time step. I've already coded it in my private version of the C++ epanet-dev and tested it against the networks in the Davis/Taxon/Janke paper mentioned above.
@LRossman This sounds great! Curious if you are you going to compute the mass balance?
@michaeltryby yes, definitely -- that's the whole point of doing this. Only it's not possible to compare improvement in mass balance with current EPANET since that metric was never computed (my bad). I added that calculation to a private version of EPANET that I shared with Tom Taxon and Rob Janke when they were doing their work (although I think they moved on to using their own code) and that's how I discovered that for some network models it is indeed an issue. These tend to be the ones with short duration contaminant injections. EPS for continuous releases like for chlorine or source tracing tend to look much better.
discovered and documented by Rob Janke, USEPA
http://community.wateranalytics.org/t/mass-imbalances-in-epanet-water-quality-simulations/521