We obtained self-similar solutions of relativistically expanding magnetic loops by assuming axisymmetry and a purely radial flow. The stellar rotation and the magnetic fields in the ambient plasma are neglected. We include the Newtonian gravity of the central star. These solutions are extended from those in our previous work by taking into account discontinuities such as the contact discontinuity and the shock. The global plasma flow consists of three regions, the outflowing region, the post-shocked region and the ambient plasma. They are divided by two discontinuities. The solutions are characterized by the radial velocity, which plays a role of the self-similar parameter in our solutions. The shock Lorentz factor gradually increases with radius. It can be approximately represented by the power of radius with the power-law index of 0.25.
We also carried out magnetohydrodynamic (MHD) simulations of the evolution of magnetic loops to study the stability and the generality of our analytical solutions. We used the analytical solutions as the initial condition and the inner boundary conditions. We confirmed that our solutions are stable over the simulation time and that numerical results nicely recover the analytical solutions. We then carried out numerical simulations to study the generality of our solutions by changing the power-law index δ of the ambient plasma density ρ0∝r−δ. We alter the power-law index δ from δ≃ 3.5 in the analytical solutions. The analytical solutions are used as the initial conditions inside the shock in all simulations. We observed that the shock Lorentz factor increases with time when the power-law index is larger than 3, while it decreases with time when the power-law index is smaller than 3. The shock Lorentz factor Γs can be expressed as Γs∝t(δ−3)/2 where δ is the power-law index of the ambient plasma. These results are consistent with the analytical studies by Shapiro.