Flow analysis in a water purification system