Modelling wastewater treatment in a submerged anaerobic membrane bioreactor