We briefly present recent simulations of the internal magnetism of the Sun with the 3-D ASH code and with the 2-D STELEM code. The intense magnetism of the Sun is linked to local and global dynamo action within our star. We focus our study on how magnetohydrodynamical processes in stable (radiative) or unstable (convective) zones, nonlinearly interact to establish the solar differential rotation, meridional circulation, confine the tachocline, amplify and organise magnetic fields and how magnetic flux emerge to the surface. We also test the robustness of flux transport dynamo models to various profiles of circulation.