Simulation of operation of detention tanks