Modeling recycled systems for biological nitrification and denitrification