Compare the direction of the magnetic field inside a solenoid with that of the field there if the solenoid is replaced by its equivalent combination of north pole and south pole.



The magnetic field directions in both cases are the same. A current carrying solenoid is equivalent to a bar magnet.


In a magnet (or a combination of north pole and south pole), the magnetic poles would not change, if fixed once, and the direction of magnetic field is from South to North, internally.


In a current carrying solenoid, the magnetic field will be set up according to Ampere’s law, and the direction is determined by Right-hand thumb rule, as shown in the figure.



Similarly the direction of magnetic field in a bar magnet is as shown in figure.



In the later case, in the bar magnet, it can be seen that the magnetic field is from South to North at the inside of magnet, while it is North to South at the outside.


In the case of solenoid, the direction of magnetic field is determined by the direction of current. For the shown setup, with the direction of current as represented, the magnetic field inside the solenoid is from South to North. Even if we reverse the current, the direction of Magnetic field is unaltered but the imaginary South and North of the solenoid will interchange.


In both the cases, for bar magnet and for solenoid, the direction of magnetic field is from South to North in the inside and from North to South in the outside.


1
1