## 4. Verification of numerical codeThe results of two specific tests performed to verify the numerical code are presented in this paper (see Huang 1995, for more details and other tests). The first test involves the comparison of analytical and numerical results. In the second test, the results from two independent numerical codes are compared. In these tests two slightly different versions (see below) of the single magnetic interface model introduced in Sect. 2 are used. The first test is to solve numerically an initial value problem for linear surface waves propagating along a single magnetic interface and compare the obtained results with the analytical solutions given by Lee & Roberts (1986). In their approach, a single magnetic interface is located in an incompressible and magnetized plasma. The interface separates the background medium into two regions of different magnetic fields, namely, for and for (see Fig. 1). Note that in the performed calculations both magnetic fields are normalized by , which is taken to be either or whichever is stronger. To satisfy the pressure balance across the interface, the temperature on both sides of the interface is assumed to be different but the density is the same. Lee and Roberts introduced the following surface wave type perturbation at time (see Fig. 1) where , , and is the location of the vorticity line (see Fig. 1), which is the only place in the computational domain where vorticity is initially non-zero.
To reproduce these analytical results with our numerical code, it was necessary to run the code with to account for incompressibility. We took and . The comparison between analytical (upper panel) and numerical (lower panel) results is given in Figs. 2 and 3. As , the number of points per wavelength of an Alfvén wave is given by , where is the number of points per acoustic wavelength. We had to choose to adequately resolve the Alfvén wave. With , grid points in the computational domain we have used a grid spacing of . The vorticity line is at . In Fig. 2, the velocity field at the location of the vorticity line and in its vicinity is shown. Fig. 3 shows the magnetic field perturbations at the interface and in its vicinity. It is clearly seen that the numerical results well reproduce the shape of the surface wave at the interface and the velocity and magnetic field patterns outside the interface. Some differences seen at the vorticity line can be explained by the effect of numerical viscosity and by the fact that the plasma in numerical simulations is finite, whereas in the analytical treatment is infinite.
The second test is to numerically solve an initial value problem for MHD surface waves and compare the results with those obtained earlier by another numerical method. Here, the comparison is made with the numerical results obtained by Wu et al. (1996) who used a different numerical code. These authors considered a single magnetic interface that separates the background medium, which is compressible, into two domains: one with the magnetic field and one without it. They assumed that the temperature is constant on both sides of the interface, which means that both domains must have different densities to satisfy the pressure balance across the interface. The numerical approach is limited to linear waves only. The comparison is made between the velocity field calculated by our code and that of Wu et al. (see Figs. 4 and 5). Here , , . The similarities in the overall pattern of the calculated velocity fields are clearly seen in these figures. The overall pattern of the computed magnetic field perturbations shows the same similarities and thus is not presented here. After testing the code against analytical and numerical solutions for linear MHD body and surface waves, we are now ready to investigate the behavior of nonlinear magnetic slab waves.
© European Southern Observatory (ESO) 1999 Online publication: December 22, 1998 |