Solution (source code)

= Solution

Resolve the uniform upstream field into components normal and tangential to the spherical shock:
$$
B_{0r}=B_0\cos\theta,
\qquad
B_{0\theta}=-B_0\sin\theta,
\qquad
B_{0\phi}=0.
$$
The <ideal magnetohydrodynamic shock conditions> leave the normal field continuous and multiply the tangential field by the gas compression ratio $\chi$. Therefore
$$
\boxed{
\mathbf B_{\rm ps}
=B_0\cos\theta\,\mathbf e_r
-\chi B_0\sin\theta\,\mathbf e_\theta,
\qquad
\chi=\frac{\gamma+1}{\gamma-1}}.
$$