Accretion onto a neutron star compresses the magnetosphere and enhances the magnetic field. The compression stops when the magnetic field is strong enough to balance the ram pressure of the accreted material. The radius at which this happens is called the Alfven radius $ R_A $, and is given by

$ B^2 \left(\frac{R}{R_A}\right)^6 \approx \rho \left(R_A\right) v\left(R_A\right)^2 $

where $ B $ is the magnetic field on the surface of the neutron star, $ R $ is the radius of the neutron star, $ v \left(r\right) \approx \sqrt{\frac{G M}{r}} $ is the free fall velocity, $ G $ is the gravitational constant, $ M $ is the mass of the neutron star, $ \rho\left(r\right) \approx \frac{\dot{M}}{r^2 v \left(r\right)} $ is the density of the infalling material and $ \dot{M} $ is the mass accretion rate. The minimum value of the Alfven radius is the radius of the neutron star $ R = R_A $. In this case the magnetic field is given by

$ B^2 \approx \frac{\dot{M} \sqrt{G M}}{R^{5/4}} $

This is the minimal magnetic field that can support the inflow.