Treatment of waste water for removing heavy metals by membrane distillation