you might want to start by looking at the models by the International Water Association (london) IWA.
Then progress to dynamic modeling. There are probably 50 models or more available depending upon what you want so you have to be specific.
drop me a line if you need more help.