Dynamic modeling and simulation of a three-phase fluidized bed batch process for wastewater treatment