Numerical treatment of the quenching process in superconducting magnet systems