Mechanistic modeling of heavy metal biosorption in batch and membrane reactor systems