  We have studied numerically the evolution of magnetic fields in barotropic
neutron stars, by performing nonlinear magnetohydrodynamical simulations with
the code PLUTO. For both initially predominantly poloidal and toroidal fields,
with varying strengths, we find that the field settles down to a mixed
poloidal-toroidal configuration, where the toroidal component contributes
between 10% and 20% of the total magnetic energy. This is, however, not a
strict equilibrium, as the instability leads to the development of turbulence,
which in turn gives rise to an inverse helicity cascade, which determines the
final 'twisted torus' setup. The final field configuration is thus dictated by
the non-linear saturation of the instability and is not stationary. The average
energy of the poloidal and toroidal components, however, is approximately
stable in our simulations, and a complex multipolar structure emerges at the
surface, while the magnetic field is dipolar at the exterior boundary, outside
the star.
