# Internal magnetic field of dipole and bar magnet

I am approximating the magnetic field of a cylindrical permanent magnet using two fictitious magnetic monopoles with separation (magnetic length) of 2L. This model is analogous to an electric dipole, and so it seems like the direction of the magnetic field both inside and outside of the magnet are the same. This doesn't make sense to me since the magnetic field lines occur in "loops."

Is this just a limitation of this model? However, Wikipedia explains that the magnetic field due to a "magnetostatic dipole" looks like this (see image below), where field lines do in fact seem to occur in loops. I am quite confused.

That's not quite the correct approach. If the cylindrical permanent magnet has a constant magnetization directed along the axis of the cylinder, then the lateral surface will have an effective net bound surface current density. If the cylinder is long, $\mathbf{B}$ will be solenoid-like. If it's not long, $\mathbf{B}$ will be like what is produced by a current loop. In either case, you can calculate a net magnetic dipole moment that produces a dipole field that will well describe the magnetic field far from the cylinder.
The contribution of the end surfaces is to act as the source for the irrotational component in the Helmholtz decomposition of $\mathbf{H}$.