I have been performing an experiment at school in which I test the force on an iron surface from the magnetic field of an electromagnet. The electromagnet has a rectangular iron core. The theory predicts that the force increases linear with the surface area of the iron plate. This is because the volume between the plate and the magnet contains a certain amount of energy, which is equal to the force exerted on the plate times the distance between the plate and the magnet.
I found that the force does not increase linear with the surface. This is because of the divergence of the magnetic field of a bar magnet, which is what the core of the electromagnet essentially is. Researching the magnetic field of a bar magnet, I discovered that there is a higher density of field lines at the edges of the poles, and thus a stronger force on the plate. There are some images on this website, such as the one below.
I am curious as to why the field is stronger here. I know that the electric field is stronger at edges and corners because the electrons repel and end up at a higher concentration there, is it the same concept for magnetic fields?