Field dynamics in superconducting magnets for particle accelerators