Simulation of the operation of detention tanks