The model, as I downloaded it, needed to be broken before it could be fixed. First, I deleted the "/dt" from the outflow equation. Second, I changed the flush's if statement to be "if Use>0.995..." because I wasn't getting many flushes with the 0.999 threshold. Third, I deleted the seed from the random function ["RANDOM(0,1,14)" -> "RANDOM(0,1)"] in the parameter "use" to get different random flushings on each run. Doing that gives the following with dt = 0.5:
Q: Can you reformulate the model in such a way that the stock would be drained out properly under any computational method and any time step DT? As you may have noticed, when we switch to other methods, the outflow starts to deplete the stock, but then, apparently, does not have enough time to take it all out. How can this be fixed?
To get the tank to empty no matter what the dt, I just cranked up the outflow. Since tank is defined as a non-negative reservoir, this has no consequences. I made the outflow 1000 x tank, which should work up to a dt of 0.001. The result is: