A non-linear MHD code, named JOREK, is under development with the aim of
studying the non-linear evolution of the MHD instabilities thought to be
responsible for edge localized modes (ELMs): external kink (peeling) and
medium-n ballooning modes. The full toroidal X-point geometry is taken
into account including the separatrix, open and closed field lines.
Analysis of the influence of the separatrix shows a strong stabilization
of the ideal and resistive MHD external kink/peeling modes. One
instability remains unstable in the presence of the X-point,
characterized by a combination of a tearing and a peeling mode. The
so-called peeling-tearing mode shows a much weaker dependence on
the edge q. Non-linearly the n = 1 peeling-tearing mode saturates
at a constant amplitude yielding a mostly kink-like perturbation of the
boundary with an island-like structure close to the X-point. The
non-linear evolution of a medium-n ballooning mode shows the formation
of density filaments. The density filaments are sheared off from the
main plasma by an n = 0 flow non-linearly induced by the Maxwell stress.
The amplitude of the ballooning mode is limited by this n = 0 flow and
multiple (in time) density filaments can develop to bring the plasma
below the stability boundary