Fouling analysis of ultrafiltration and nanofiltration membranes