I have many meshes like the one shown below which have some faces/vertices that are not connected to the main mesh. I use these meshes for physics simulation. As result of these weird parts of the meshes the physics simulation results becomes very different than what it is supposed to be. I wonder, what would be an effective solution to remove such parts?
I have tried "Delete Loose" in Edit Mode but it doesn't do the job. I was also thinking of writing a script to calculate the average of the faces and then remove the vertices that are further from that "average face" but I don't think this would work well based on my prior experience on doing a similar thing before.