I can find equations to give the force of an electromagnet on a piece of iron when the iron touches the electromagnet.
But what about when the iron is some distance from the electromagnet? Presumably the force depends on the shape/size of the iron piece as well as the location of the piece away from the magnet.
If anybody can tell me how to calculate this, even if I have to write a numerical calculation routine, I would appreciate any direction on this.