Is the strength of the magnetic field the same everywhere in the magnetic circuit? 
As shown in the figure above, is the magnetic field strength of each position in the transformer magnetic circuit the same?
If we use a magnet to attract a long iron rod, is the magnetic field strength inside the long iron rod the same? I think the magnetic field is stronger the closer the magnet is. I don’t know if this idea is wrong?
 A: Very roughly speaking, the magnetic field tends to fill the space it has been given. I.e. if you use a yoke that does not have everywhere the same cross-sectional area, for example it widens somewhere in the loop, the magnetic field lines will widen as well, and hence, the field strength will decrease accordingly. Especially at the corners of the rectangular yoke you have drawn, the cross-section cannot be considered the same as for the straight segments, and hence, the field strength will be different there. You could avoid that by using a toroidal yoke.
However, don't imagine the iron of a magnetic circuit to be something that strictly confines the magnetic field lines to its interior volume, like a conductor. The magnetic field lines may leave the iron if that releases stress on them (see also the electromagnetic stress tensor). It depends on magnetic permeability how easily the magnetic field lines may leave the yoke.
Especially if you have an iron rod approached by a magnet, most of the field lines will stay in the iron until its end (due to the high permeability of iron), but a few will leave it through the sides.
There is a free software called FEMM, which I have found very useful for exploring the behaviour of electric or magnetic fields in matter, for simple user-defined geometry, at least in 2D and for quasistatic fields. However, it requires a small learning curve.
