## Appendix A: the numerical methodIn this appendix, some details are presented about the numerical code that produced the results shown in the present paper. The semi-implicit predictor-corrector scheme is not new and has been applied to numerical simulations of three-dimensional time-dependent MHD phenomena before. In fact, our code is based on the code Biskamp & Welter:1987 used to study sawtooth disruptions in tokamaks. Yet, many variations on the semi-implicit algorithm are possible and we modified the scheme used by Biskamp and Welter. In this appendix, only the main features of the algorithm we used are given. More detailed information on the semi-implicit method can be found elsewhere (see e.g. Harned & Kerner 1985 , Harned & Kerner 1986 , Harned & Schnack 1986 , Lerbinger & Luciani 1991). ## A.1. Spatial discretisation
In the - and the The nonlinear terms in the MHD equations then need careful treatment because these terms are products in real space, which lead to convolution sums in Fourier space. These convolution sums are a CPU time consuming operation which is not vectorizable. For the spatial discretization of the radial direction, on the
other hand, finite differences are used. Due to the occurence of
resonances, the solutions can become extremely localized in the radial
direction excluding the possibility of using global expansion
functions for the spatial discretization in this direction. Two
staggered meshes are used. This is necessary to obtain a correct
representation of the linear MHD spectrum and to satisfy certain
vector identities identically, e.g. , in finite
different form so that can be implemented as an
initial condition on the magnetic field. The quantities
, ,
, and are defined on
the `integer' mesh , where
is the number of radial mesh points. The
quantities , ,
, ,
and These two additional mesh points are used to impose regularity conditions in and boundary conditions in for the variables which are defined on the half-integer mesh (see section A.3). The two staggered meshes do not need to be uniform. The mesh points can be accumulated whenever this is necessary, e.g. at the resonant layer and/or at the plasma boundary. ## A.2. Time advanceThe semi-implicit predictor-corrector scheme of Harned & Kerner 1985 is used. This scheme avoids both the overly restrictive CFL condition for the compressional fast magnetosonic waves on the time step in explicit schemes and the complexity and computational intensity of implicit schemes by treating the fast magnetosonic waves, and only these, implicitely in the linear phase. This is accomplished by adding and subtracting, at different time steps, a simple approximation of the term that yields the fast magnetosonic waves in the momentum equation. We use the same `semi-implicit' term as Harned and Kerner which involves only the velocity components in the plane: where is a constant. Notice that this term does not affect the solution as . However, the algorithm we use differs somewhat from the algorithm used by Harned & Kerner 1985 and by Biskamp & Welter 1987: the stabilizing semi-implicit term is applied both in the predictor step and in the corrector step and the Crank-Nicolson-type advance is applied to both V and B . The scheme then reads:
where , , and
denote the ideal parts of the right-hand-sides
of the MHD Eqs. (1), (2), and (3), respectively. A semi-implicit
resistive advance of B and ## A.3. Boundary conditions
When the physical variables are expanded in a Fourier series according
to Eq. A1, regularity conditions and single-valuedness at the
origin yield analytic conditions for the
various at for all modes, except for the driven mode, where at . Here,
© European Southern Observatory (ESO) 1997 Online publication: June 30, 1998 |