A B S T R A C T Axisymmetric incompressible modes of the magnetorotational instability (MRI) with a vertical wavenumber are exact solutions of the non-linear local equations of motion for a disc (shearing box). They are referred to as 'channel solutions'. Here, we generalize a class of these solutions to include energy losses, viscous, and resistive effects. In the limit of zero shear, we recover the result that torsional Alfve´n waves are exact solutions of the non-linear equations. Our method allows the extension of these solutions into the dissipative regime. These new solutions serve as benchmarks for simulations including dissipation and energy loss, and to calibrate numerical viscosity and resistivity in the ZEUS3D code. We quantify the anisotropy of numerical dissipation and compute its scaling with time and space resolution. We find a strong dependence of the dissipation on the mean magnetic field that may affect the saturation state of the MRI as computed with ZEUS3D. It is also shown that elongated grid cells generally preclude isotropic dissipation and that a Courant time-step smaller than that which is commonly used should be taken to avoid spurious anti-diffusion of magnetic field.

1 I N T R O D U C T I O N non-linear term is the total pressure gradient (magnetic plus kinetic), and we establish a condition for it to vanish (Section 2). In the next two sections, we investigate less-general cases without viscosity (Section 3) or without shear (Section 4), for which we can give extended families of analytic solutions. In Section 5, we provide methods for finding isolated solutions under more general assumptions. We then present two applications of our results: in Section 6, we benchmark a new version of the ZEUS3D code with a conservative scheme for total energy; in Section 7, we use our solutions to compute the numerical resistivity and the numerical viscosity in the ZEUS3D code. We discuss our results and conclude in Sections 8 and 9. 2 G E N E R A L M E T H O D

The shearing sheet system results from a local first-order expansion of the dynamical equations of motion, with the inverse radius serving as the small parameter. This approach dates back to a celestial mechanics calculation of Hill (1878). The frame of reference rotates at a circular angular velocity . Radial, azimuthal and vertical directions are labelled by local Cartesian coordinates x, y and z. The origin of the frame follows an unperturbed fluid element moving in a circular orbit. The radial logarithmic derivative of is

1 d A = 2 d ln R x=0 and characterizes the local shear.

The fundamental dynamical equations in this rotating frame are the mass-continuity equation ?? ?t + ?·(?v) = 0, where ? is the mass density of the gas and v is its velocity, and the Navier?Stokes equation with a kinematic viscosity ?V is given by ??vt + (v·?)v + 2 z? × v + ?(2 A x 2) + ?1 ? p + B22 ? ?1 (B·?)B = ?1 ?·(??V ?), where p is the thermal pressure, B is the magnetic field (divided by 2??) and ?i j = 21 (?i v j + ? j vi ) ? 31 ?k vk ?i j is the stress tensor. The vertical gravity is neglected. The induction equation is ?B ?t = ?×(v×B ? ?B J), (3) where J ? ? × B and ?B is the resistivity. Finally, we adopt an ideal gas equation of state with adiabatic index ? so that the internal energy equation reads

p D ln( p??? ) ? ? 1 Dt = ?B J 2 + ??V ?: ?v ? , (4) where is the net cooling function.

Equations (

We seek solutions that are in a single Fourier mode with vertical wavenumber k and a constant vertical magnetic field B0 superimposed on the background shear. The solutions have the form v = 2 Ax y? + u

B = B0z? + b with u = ?u est+ikz

b = ?b est+ikz .

We assume ?u ? z? and ?b ? z?. It is understood that the physical solutions are obtained by taking the real part of equations (5). (In particular, note that the ? amplitudes may be complex.)

For this form of solution, the mass-continuity equation states that the Lagrangian derivative of ? is zero; hence, the density remains constant along the trajectories of the fluid elements. Thus, ? is constant in time and space, provided that it was uniform initially, which we will assume.

We further assume that the pressure p is initially a function of z only. This property is also conserved in time for our particular flow. Substituting equations (5) and (6) into equation (2), we obtain

1 1 su + 2 Aux y? + 2? × u + ? z? ?z p + ? ? B0ikb = ??V k2u, (7) ( [b])2

2 where we assume that ?V is uniform and we use the symbols [z] and [z] to denote the real and imaginary parts of a complex number z. Note that this equation makes sense only if the z? pressure gradient terms vanish, a key point to which we will return below.

Finally, assuming a uniform resistivity ?B, the induction equation becomes
sb ? 2 Abx y? ? B0iku = ??B k2b.
(

A where I is the identity matrix and k2v2A = B02k2/?, where vA is the Alfve´n speed. s is therefore a root of the determinant (det) polynomial which is precisely the MRI dispersion relation.

We need to compute directly only the restricted case P0,?(s) for ? = 0, since the full linear problem with parameters (s, ?, ?) is equivalent to the one with (s + ?, 0, ? ? ?). Hence, P?,?(s) = P0,??? (s + ?): P0,?(s) = (? + s)2(?2 + s2) + 2 [2 A + s(s + ?)] k2vA2 + (kvA)4 = 0 (14) and in a developed form P0,?(s) = s4 + 2?s3 +

?2 + 2k2vA2 + ?2 s2 + 2? k2vA2 + ?2 s + ?2?2 + 4 A k2vA2 + (kvA)4, with ?2 = 4 (A + ) which is identical to the form given by equation (12) in Fleming, Stone & Hawley (2000). The general dispersion relation may then be obtained by replacing s by s + ? and ? by ? ? ? in equation (14): P?,?(s) = (? + s)2[?2 + (? + s)2] + 2 [2 A

+ (s + ?)(s + ?)] k2vA2 + (kvA)4 = 0.

For the solutions whose form is of the previous section, the internal energy equation becomes ? p ?t = (? ? 1)[?( [b])2 + ??( [u])2 ? ].

Note that the v · ?p term vanishes because v has components only along x? and y? whereas ?p is along z?. The above equation may be rewritten as an equation for the total gas plus magnetic pressure: ? ?t

( [b])2 p + 2 = [sb]· [b] + (? ? 1)(?( [b])2 + ??( [u])2 ? ). (18) From here on, we restrict the cooling function to be of the form = ? + ?p with and ? constant. Since ? is a constant, this is equivalent to taking to be a linear function of temperature. (In effect, this is just the leading Taylor series expansion of (T) around an arbitrary point in temperature.) The effect of may be absorbed into ptot by adding a linear function of time with no spatial dependence, and without loss of generality, we may set = 0. We rewrite the time-evolution equation for the total pressure accordingly:

? [sb]· [b] + (? ? 1) ?( [b])2 + ??( [u])2 + 2 [b]· [b] . E = with F = Fb = B0iku 2( s + ? ?2 + A) s + ?

, s + ? ?2 A

0 s + ?

.

P?,?(s) = det EF + k2vA2I , (10) (11) (12) (13) (15) (16) (17) (19) The right-hand side of equation (19) must be independent of position for a self-consistent solution. Formally, these terms may be expressed as a spatially constant term plus a term of the form [a exp (2st + 2ikz)], with the complex amplitude a constant in both time and space: a =

? s ? (? ? 1) ? ? 2

, where we remind the reader that ?bx, ?by, ?ux and ?uy are complex numbers. Our task therefore is to investigate the conditions under which a vanishes. If this can be done, the full set of equations is reduced to the linear problem of the previous section plus equation (19), which now reads

The above is a solution of the non-linear problem if and only if the total pressure gradient term vanishes, hence if and only if a = 0. In the case with shear, this condition can be recast in the form of a fifth-order polynomial Q(s) = 0. To see this, we first express the components of ?b and ?u in terms of ? bx only. The first row of equation (13) gives ?by as a function of ?bx: f ? ??bbxy = (s + ?)(s +2 ?()s++4?A) + k2vA2 .

Note that this is valid only when is non-zero. If below).

Equation (11) now allows us to express ?u in terms of ?b and hence ?bx:

1 ?ux = ik B0 (s + ?)?bx and

1 ?u y = ik B0 [?2 A + (s + ?) f ] ?bx . a can now be rewritten as

? a = ?bx2 s ? (? ? 1) ? ? 2

12 (1 + f 2) + ?bx2 (? ? 1)? 2k12vA2 [(s + ?)2 + (?2 A + (s + ?) f )2].

Finally, we substitute f, thanks to equation (25), and gather quantities over the same denominator: a = ? ?2 1 (sQ+(s?))2 ?bx 2, where Q(s) is the following polynomial in s: Q(s) =

1 ? 1 ? ? 1 s ? ? + 2 (s + ?)2 + 4 2 (s + ?)(s + ?) + 4 A

? 1 + k2vA2 (s + ?)2 (s + ?)2 + 4 2 (s + ?)(s + ?) + k2v2 2 .

A + k2v2 2

A = A = 0, then ?bx and ?by are independent (see the case without shear in Section 4 The homogeneity condition a = 0 is therefore satisfied if s is a root of Q. Henceforth, we refer to Q as the homogeneity polynomial. Note that it is generally of the order of 5.

The parameters of the system are hence and A for the shear, kvA (which actually combines B0, k and ?) for the magnetic field, and ?, ?, ? and ? (or ) for the properties of the gas. For a given set of these parameters, we now want to find a growth rate s which satisfies the dispersion relation (16) and for which the total pressure gradient vanishes, that is, P(s) = 0 and Q(s) = 0.

We will first restrict our analysis to real roots s in simple cases, although we treat the case with no shear exhaustively (see Section 4) . Most of the solutions presented are therefore standing wave solutions, except in the case without shear. There we find circularly polarized waves and other propagating disturbances.

The final solution is then simply given by the expressions (5), (6) and (22). From equation (32) with ? = 0, we immediately see that s = (? ? 1)? is required for a uniform total pressure. Using this in the relation P(s) = 0, we obtain a quadratic equation for ?2: ? 2(? ? 1)2?4 + 2? (? ? 1)k2vA2 + 2 ? ( + A) ?2 + k2vA2 4 A + k2v2

A = 0.

Alternatively, this can also be viewed as a quadratic equation for k2v2 :

A (kvA)4 + [4 A + 2(? ? 1)? ?2]k2vA2 + ? 2?2[4 ( A + ) + (? ? 1)2?2] = 0. ?2 <

Either of these equations allows a determination of the set of parameters (?, kvA) for which there exists a solution. For example, in the case where ?2 = 4 ( + A) > 0, equation (34) has a real root for k2v2A, provided that

A2 ? ( A + ? ) which sets an upper limit on the resistivity. The request that this root be positive sets up the additional constraint ?2 < ?2 A

? (? ? 1) which forces A > 0 and sets an additional upper limit on the resistivity. The final condition (an upper limit on resistivity) is ?2 < ??A min ? ?2 1 , A ?+ A? . 3.3 ? = ? = 0, adiabatic In this case, condition (34) simply becomes kvA = 2?? A , so A < 0 for such a solution to exist. The growth rate is then s = 0, a marginally stable mode of the MRI. The dispersion relation has only real roots, s = 0 (double root) and s = ±2? ( ? A), but the growing and decaying modes do not fulfill the homogeneity condition. (As mentioned above, this solution is also valid when the constant is non-zero, which is not, strictly speaking, adiabatic.) 4 N O N - R O TAT I N G F L OW Here, we set A = = 0 and drop the assumption that s is real. Without rotation and shear, x? is no longer a special direction; the direction z? is still defined by the mean field B0. The system is now invariant under the rotation of axis z? and the eigenvectors of the linear system now depend on two independent variables, say, ?bx and ?by. The effective dispersion relation becomes P(s) = R(s)2 = 0 with R(s) = (s + ?)(s + ?) + k2v2 .

A

Without shear, the homogeneity condition a = 0 with definition (20) becomes a ? s ? ?bx2 + ?b2y ? ? 1 = 2 ? ? + ? ? 1 + k2vA2 (s + ?)2 2 = 0.

This can be achieved if either ?bx2 + ?by2 = 0, or if the factor inside the brackets vanishes. (33) (34) (35) (36) (37) (38) (39) (40) 4.1 Torsional Alfve´n waves s± = ? ? + ? 2 ± ? ? ? 2 2

If ?bx2 + ?by2 is non-zero, then we need to find the common roots of P and the simple quadratic

? s ? Q(s) = 2 ? ? + ? ? 1 + k2vA2 (s + ?)2 which is the factor inside the brackets of equation (40). Since P = R2, finding a common root of P and Q means to find a common root of Q and R. For simplicity, we assume that ? = 5/3, but it is not much more difficult to do without this assumption.

We detail our analysis of the common roots of P and R in Appendix A for complex roots and Appendix B for real roots. Here, we simply summarize our result that ? > ?6|kvA| is a necessary and sufficient condition for the existence of common complex roots, that is, the existence of propagating disturbances as solutions. We are also able to give an expression for kvA in terms of the other parameters of the problem in the case when there exists a common real root, that is, when a standing wave is a solution of the problem. 5 S O L U T I O N S W I T H S H E A R , R E S I S T I V I T Y, V I S C O S I T Y A N D C O O L I N G In general, one may not be interested in the complete range of parameters for which a solution exists. A benchmark calculation only needs one set of parameters. In that case, we may simply pick a growth rate and treat P = 0 and Q = 0 as equations for k2v2A (both quadratic). The process of finding a set of parameters that yield a solution is then greatly simplified. As an illustration, we set = 1, A = ?3/2, ? = 1/5 and ? = 1/10 and seek k2v2A and ? as functions of s. P = 0 implies that k2vA2 = 510 [74 ? 5s(3 + 10s) ± 5 218 ? 10s(11 + 40s)]. (43) The equation Q = 0 is then linear in the variable ?. For example, if we now seek a standing wave solution with the growth rate s = 1/2, we find k2vA2 = 54 +5105?7 and from Q(1/2) = 0

1.874 899 569 + 13 560?7 ? = ? 597 490 ?1.566.

Here, we have an example of an explicit benchmark with viscosity, resistivity and heating in a shearing box. 6 N U M E R I C A L B E N C H M A R K S The original ZEUS3D code (see Stone & Norman 1992a,b) is not written in a fully conservative form. In particular, equation (4) is used to compute the evolution of internal energy. In general, this scheme leads to significant loss of total energy. For example, if discretization errors lead to kinetic or magnetic energy losses, this artificial dissipation is not reflected in viscous heating or Ohmic heating and the total energy decreases. This energy is effectively ?radiated? away.

However, when viscous and/or resistive terms are included in the code, part or all of the total energy loss is recovered as heat and the total energy loss is reduced. As an illustration, we ran torsional Alfve´n tests with the original ZEUS3D code, and with a total energy-conserving scheme (see below). Fig. 1(a) shows that the total energy scheme performs much better in a case without explicit resistive and viscous terms: the internal energy scheme heavily distorts the wave profile (this was already noted by Turner et al. 2003). On the other hand, Fig. 1(b) shows that the internal energy scheme with some resistivity and viscosity is indistinguishable from the total energy scheme. Because of the finite resolution (32 zones), there is still some numerical dissipation and the numerical results are slightly damped compared to the analytical solution. The difference between the analytical solution and the actual simulations disappears on the scale of these graphs at a resolution of 128 zones for both these tests.

In principle, grid-based schemes cannot avoid numerical dissipation. However, it is possible to make numerical dissipation look more like physical dissipation by using a conservative form for the evolution equations. For example, we can evolve the total energy, and deduce (41) (42) (44) (45)

1 1 2 E = e + 2 ?v2 + 2 b + ? , the internal energy as the remainder of the mechanical (kinetic, magnetic plus potential) energy subtracted from the total energy. In this case, we write the total energy equation as ?E where F = v = 2A x2 is the tidal potential energy, e is the internal energy and the total energy flux is

1 p + e + 2 ?v2 + ? + (B×v)×B + ?B J×B ? ??V ?·v.

We have implemented this in the ZEUS3D code. This is similar to the work of Turner et al. (2003) and Hirose, Krolik & Stone (2006), but we also include Ohmic stresses ?B J × B and tidal potential energy flux v? . The question arises at what stage of the calculation each term of the total energy flux F should be evaluated. We ran various benchmarks (torsional Alfve´n waves and standing-mode solutions presented in the previous sections) and varied the order with which the fluxes were computed. We noted that it is crucial to compute each flux term simultaneously with its corresponding source or transport term. In particular, it is critical to compute (B×v)×B using the time-centred values for B and v computed with the method of characteristics (MOCs, see Stone & Norman 1992b). On the other hand, the kinetic energy flux should not be directionally split the way the momentum transport step is.

Finally, it is much better to join the tidal flux to the density transport term and not to the tidal force source term. We now illustrate how we used our analytical solutions to prove this last point (see Fig. 2). We used our code with two slightly different versions in order to reproduce the analytical solution presented in Section 5. The first version (dotted lines in Fig. 2) would compute the tidal potential flux ? v at the same time as the tidal source term. The second version (dashed lines in Fig. 2) would compute this flux jointly with the transport step. In the first version, the resulting total pressure gradient is not flat and the magnetic energy loses its low-z/high-z symmetry. The second version retains the correct symmetry and displays a flat pressure profile. Note, however, that in both computations the average total pressure and the magnetic pressure are slightly lower than the analytical solution. Both simulations shown are for cubic boxes of 32 zones aside and higher resolution improves the magnetic pressure more efficiently than the total pressure.

The final scheme we adopted was to compute F in the following five distinct steps. (i) v p is first computed using an upwinded pressure computed at the same time as the pressure gradient source; (ii) the viscous term is computed at the same time as the viscous forces; (iii) the remainder of the flux v(e + 21 ?v2 + ? ) is added after the hydrodynamical transport term; (iv) the resistive term is computed along with the resistive electromotive force; and (v) the (B×v)×B term is finally computed with the MOC advanced v and B which are used for the constrained transport of B.

Along this process, we evolve the internal energy e, thanks to equation (4). In particular, this provides an advanced estimate for e in the flux term v (e + . . .). At the end of these steps, we compute E ? with the updated values of all variables. We then use equation (46) with = 0 to advance the total energy to its new value E . If the internal energy scheme was perfect, we would have E ? = E . However, this is almost never the case and a correction E ? E ? needs to be applied to e in order to conserve total energy. We deduce the rate of correction of internal energy e? = (E ? E ?)/ t , where t is the length of the time-step. The internal energy is finally updated with = 0 and e?, thanks to an isochore heating/cooling step. 7 N U M E R I C A L V I S C O S I T Y A N D R E S I S T I V I T Y In Appendix C, we present a method to estimate the numerical resistivity and viscosity in a code. The idea is to probe the numerical dissipation in the absence of explicit resistivity and viscosity, and to determine the effective numerical dissipation coefficients by fitting results to our analytical solutions that include viscosity and resistivity. In the following, we write for short ?N and ?N for the numerical resistivity and viscosity. As explained in Appendix C, we measure directly (?N + ?N)k2 and (?N ? ?N)k2, respectively, to a second and first order in (?N ? ?N)k/vA. We then deduce the values for ?N and ?N. We used this method mainly on the internal energy scheme version of the ZEUS3D code, since it is the version that is generally used in published applications.

Our method provides a direct estimate for the numerical dissipation in a code. Therefore, it gives the numerical floor for the physical viscosity and resistivity in a given code. For codes devoid of a viscous or resistive term, it also allows to compute the effective Reynolds and Prandtl numbers. We now investigate general trends of the numerical dissipation.

We first examine wavenumbers along the vertical direction. In Fig. 3, we examine the dependence of ?N and ?N with various parameters. The Courant number (or Courant coefficient) is a parameter that controls the time-step of a code. In the ZEUS3D code, it is defined as t C = x max v2 + c2 + vA2 , (49) where v, c and vA are the local speed, sound speed and Alfve´n speed in the fluid, x is the size of a zone, t is the size of a time-step and the maximum is taken over all grid zones. We measured the dependence on resolution, wavenumber, perturbation amplitude and mean field amplitude for three different Courant numbers: 0.01, 0.1 and 0.5. We display the results only for a Courant number of 0.1 and we discuss the differences when applicable. We first ran a standard run with parameters ? = 2/B20 = 400, k = 2 ?, an amplitude of |?bx | = 0.001, ? = 1, a Courant coefficient of C = 0.1 and a spatial resolution of 32 zones in all three directions (hence x = 1/32, since we use a physical length of 1 for the size of the box). We then varied each parameter in turn away from these values.

Figs 3(a) and (b) show that ?N and ?N scale linearly with the size of the time-step and as the square of the size of a grid cell. An interpretation of these trends is that our scheme is of first order in time but of second order in space. Note that at a Courant coefficient of 0.5, the numerical ?N changes sign. As a whole, the numerical scheme remains stable in the sense that ?N + ?N is always positive. However, ?N or ?N individually could be negative. ?N < 0 indicates that the MHD part of the time-step behaves like anti-diffusion. Anti-diffusivity in ZEUS was already noted by Falle (2002) who also pointed out that lower Courant numbers lower anti-diffusion. More recently, Fromang & Papaloizou (2007) also pointed out anti-diffusion in ZEUS at large scales. Here, we quantify the effect in more detail. The wavenumber with the lowest numerical resistivity turns out to be k = 2?(x? + y? + z?). The resistivity of this mode is negative for all Courant coefficients above 0.12 (see the dashed line in Fig. 3b). Such negative values for the resistivity are only found for wavenumbers with coordinates lower than or equal to 2: only the largest scales are affected. With the ZEUS3D code, it might nevertheless be safer to adopt Courant coefficients below 0.5 or to include some minimal amount of physical resistivity in the code. Including physical dissipation has the advantage that it will also improve the energy budget, as noted in the previous section.

In Fig. 3(b), it appears that the dissipation has a finite limit as the time-step tends toward zero. Indeed, the finite space resolution does not allow the scheme to achieve an infinite precision. Similarly, in Fig. 3(a) the scaling of the numerical dissipation is a power of ?2 in the number of zones at low space resolution, but at high space resolution it turns into a shallower power of ?1. Indeed, the Courant number is kept fixed (hence t/ x is fixed) and the scheme is of second order in space but only of first order in time: at high resolution, the numerical ?N + ?N 0.76 x 2??1/2 2k? + 1.08 x C ??1. (50) We calibrated both coefficients of this formula in Fig. 3(b) and the exponents for x, C, k and ? are obtained from Figs 3(a), (b), (c) and (d), respectively. Formula (50) should therefore be taken only as indicative for values of parameters not too far from those tested here. Furthermore, as stated, the scaling in k should also be taken with caution (see Fig. 3c).

Our method allows us to quantify the anisotropy of the numerical dissipation. We measured the numerical dissipation for all wavevectors in the Fourier domain of the box with coordinates of the form ki = 2? n with i = x, y, z and 0 n 16 (a grid of 173 ? 1 measurements). Many shearing box simulations actually use half the resolution in the azimuthal y-direction compared to the radial x- and vertical z-directions. We therefore did the same measurements (with ky 8 × 2?) on a cubic box with 32 × 16 × 32 zones in which the grid cells have an aspect ratio 1:2:1.

In Fig. 4(a), we plot all ?N + ?N measurements for the 323 (cubic cells) simulation against the norm of the wavevector. The overall shape of this diagram roughly follows Fig. 3(c) with a maximum of dissipation at 15 × 2?. Even for cubic grid cells, the numerical dissipation already shows some degree of anisotropy: at a given wavenumber it varies widely. We detail the distribution of this spread in Fig. 5(a) for wavenumbers k which have 2?Nk k < 2?(Nk + 1) with Nk = 15. Wavevectors with the highest dissipation are those that point towards a cartesian axis. For a fixed |k|, wavevectors along an axis maximize the size of a single component. We therefore suggest that the numerical dissipation at a given wavevector is dominated by the dissipation at its maximum coordinate. For wavevectors of norm |k| higher than 16, the three coordinates have similar values, hence the numerical dissipation is more and more isotropic. Interestingly, the numerical Prandtl number ?N P mN = ?N is quite isotropic for all wavenumbers and slightly decreases from 2 at small wavenumbers to 1 at large wavenumbers (see Fig. 4c; the very small wavenumbers have higher Prandtl numbers, but the numerical dissipation is much lower there). The isotropy of the Prandtl number is even better at lower Courant coefficients (C = 0.01), with a mean value closer to (slightly above) 1 and a spread between 1 and 2. It is interesting to compare these results to the recent work of Fromang et al. (2007) who estimate Prandtl numbers between 2 and 4 for ZEUS. It is also striking that all our measured Prandtl numbers are greater than 1.

As mentioned, a few directions yield a negative resistivity. The corresponding wavevectors at C = 0.5 have their coordinates amongst
the following list: (

For elongated cells, Fig. 4(b) is only slightly more complicated. It is similar to Fig. 4(a), but replicates its pattern extended by a factor of 2 in amplitude and squeezed by a factor of 2 in wavenumbers. This additional feature results from the halved resolution in the y-direction. As shown in Fig. 5(b), the dissipation is not symmetric to x?y exchange. On the contrary, y wavevectors undergo much larger dissipation. This shows up even more at smaller wavenumbers as seen in Figs 5(c) and (d). However, the Prandtl number does not show more anisotropy than in the case of a cubic cell: numerical resistivity and viscosity react in the same way to the resolution loss in the y-direction.

We tested our code in various configurations to investigate the impact on numerical dissipation. We found that isothermal simulations are slightly less dissipative than adiabatic simulations (with numerical resistivity more negative in general). We could hardly see any difference between the internal and the total energy schemes. We also found that using the non-linear artificial resistivity as coded in Stone & Norman (1992a) did not change the numerical dissipation: our tests did not trigger significant artificial viscosity because of the incompressible nature of our test flows. 8 D I S C U S S I O N

We discuss here a few caveats, limitations and possible extensions of our method. First, we wish to stress that the condition of incompressibility on the modes is a crucial one. Indeed, any change in density will alter the 1/? factor in the Euler equation, introducing additional non-linearities that might be difficult to address with analytical tools.

In Section 7, we have measured an equivalent numerical viscosity for torsional Alfve´n waves only. This gives a first estimate of the numerical dissipation, but an arbitrary MHD flow cannot be decomposed into such modes. For example, we cannot probe any viscosity associated to compressible flows (see Section 7.3). On the other hand, the viscosity of compressible flows could be measured by studying the width of shock fronts, or with damped magnetosonic waves in the linear regime.

Periodic boundary conditions in z are essential for our analysis. For example, reflective boundary conditions will mix two Fourier modes which very likely will open the way for a cascade at many other wavenumbers.

It should be noted that our analytic shear solutions do not strongly test the implementation of shearing box boundary conditions. Indeed, except for the mean steady flow, our solutions for non-zero depend only on the z-coordinate. For example, these benchmarks could not tell if the code uses periodic boundary conditions in the x-direction or shearing box boundary conditions.

To improve this, we could need to find solutions with spatial variation in more than one direction. A non-zero kx is in fact perfectly tractable, and the equations hardly change if one uses the expression (k ·B0)2/? = kz2B20/? instead of k2v2A. However, it will not probe more efficiently the shearing box boundary conditions: periodicity in x would still be indistinguishable from shearing box conditions for most variables.

In order to probe the shearing box boundary conditions, a non-zero azimuthal wavenumber is needed. Unfortunately, a non-zero ky yields an Eulerian wavevector changing in time (Balbus & Hawley 1992). In that case, the homogeneity condition changes in time and the total pressure gradient cannot be dealt with at all times. However, it is worth noting that the total pressure term is still in this case the only non-linear term. Semi-analytic solutions of the equations without the pressure term can be found for MHD shearing waves. We plan in future work to benchmark the MHD shearing box boundary conditions by using such equations.

A thermal diffusion coefficient can very easily be included in our analytical solutions. Under the assumption of a uniform density, the thermal diffusion term in equation (19) is proportional to ? p = ?

1 ptot ? 2 where ? is the uniform thermal diffusion coefficient. We recall that the term due to cooling in equation (19) is (?/2) [b]· [b]. To include thermal diffusion in our formalism is hence equivalent to use ? + 4k2? in place of ?.

The assumption of a homogeneous total pressure is the cornerstone of our analysis. This requirement might not be as strong as it seems at first glance. Indeed, the gradient of total pressure in the Euler equations naturally drives MHD flows towards a state of uniform total pressure. As a result, our solutions should be close approximations to the exact MHD flows even in cases when the condition of homogeneity is not met, provided that the real flow remains at a nearly constant density. 9 C O N C L U S I O N S This paper consists of variations on a theme: the channel solution. We have extended previously known analytical solutions to more general and more physical cases, including viscosity, resistivity and cooling. We also showed the connection between torsional Alfve´n waves and channel solutions.

We used these solutions to calibrate the implementation of a conservative scheme in ZEUS3D. We also measured the numerical resistivity and viscosity of torsional Alfve´n waves in ZEUS3D. In particular, we showed that lower time-steps should be used in ZEUS3D in order to guarantee a positive resistivity when no physical resistivity is used. We would rather recommend to use a minimal amount of physical resistivity. It is also the best to use isotropic resolution, since the numerical dissipation is more anisotropic for elongated cells. Finally, we find a dependence of the numerical dissipation on the amplitude of the magnetic field.

Although in this paper we stressed the numerical applications of these solutions, they are of interest in their own right. In particular, we have established a stronger basis for understanding the stability analysis of channel solutions: it should now be possible to compute parasitic instabilities with improved microphysics. As a result, we hope to better understand the saturation properties of MRI turbulence. AC K N OW L E D G M E N T S Many thanks to S. Fromang for providing us with his version of the ZEUS3D code. We thank the anonymous referee for a thorough report which significantly improved the quality of this paper. This work was supported by a Chaire d?Excellence awarded by the French ministry of Higher Education to SAB. (51) R E F E R E N C E S Balbus S. A., Hawley J. F., 1991, ApJ, 376, 214 Balbus S. A., Hawley J. F., 1992, ApJ, 400, 610 Falle S. A. E. G., 2002, ApJ, 577, L123 Fleming T. P., Stone J. M., Hawley J. F., 2000, ApJ, 530, 464 A P P E N D I X A : P R O PAG AT I N G D I S T U R B A N C E S W I T H Z E R O S H E A R We work here in the framework and notations of Section 4.2. We first assume that there exists a common complex root s to R and Q. Its complex conjugate s¯ then also is a common root. Being only of second degree, R and Q have the same roots s and s¯. Hence, they differ only by a real proportionality constant, and the remainder R1 of the Euclidian division of R by Q needs to be identically zero: a0 = (? ? ?)? + k2vA2 1 + ??2+? 2? . (A3)

Both coefficients a0 and a1 must vanish if R and Q are to have a common complex root. This puts two constraints on the three remaining parameters ?, ? and kvA so that ? and ? can be expressed in terms of kvA. Setting a1 equal to zero, we get

3k2v2 ? = ? ? 2? A . (A4) We now use this expression into the equation a0 = 0 which yields a quadratic equation for ?: R1(s) = a1s + a0 with and

3 k2v2 a1 = ? ? ? ? 2 ? A 14 ?2 ? 2k2vA2? ? + 15 k2vA2 = 0 which has only one real positive root

1 ? = 14 ? + ?2 + 210k2vA2 .

Equation (A4) now provides the value for ?:

1 ? = 35 6? ? ?2 + 210k2vA2 s± = with ?17? ? 3 ?2 + 210k2vA2 140

? ± i r which is positive for ? > ?6|kvA|.

In order to get a common complex root to P and Q, the resistivity and viscosity hence need to be determined by expressions (A7) and (A6). Using these expressions for ? and ? in the dispersion relation R(s) = 0 provides the two actual growth rates s and s¯ as r = 95k2vA2 + ? ?2 + 210k2vA2 ? ?2. (A9)

The corresponding solutions are therefore propagating disturbances (i.e. they have a non-zero imaginary part) only when r > 0 which is equivalent to setting the condition ? > ? 149 |kvA|. Since we already required the more stringent condition ? > ?6|kvA| in order to get ? > 0, physically plausible solutions exist only when ? > ?6|kvA| for propagating disturbances.

A P P E N D I X B : S TA N D I N G WAV E S W I T H Z E R O S H E A R We work here in the framework and notations of Section 4.2. We now assume that s is a real common root to P and R. In that case, R1(s) = 0 immediately gives s in terms of the parameters of the other problem: s = ?2??(? ?2??)(?+???k2)v?A2 3?k22v(A?2 + ?)k2vA2 . (B1) Using s in P or Q, we finally arrive at a relational constraint to define the problem. As an explicit example, k2v2A can be expressed in terms of ?, ? and ?: k2vA2 = 118 [??2 + 7?(? + ?) + 2?2 ? 41?? ? 10?2 + (?? + 2? + 5?) ?2 ? ?(10? + 4?) + ?2 + 44?? + 4?2]. (B2) (A1) (A2) (A5) (A6) (A7) (A8) A P P E N D I X C : A M E T H O D T O M E A S U R E N U M E R I C A L R E S I S T I V I T Y A N D V I S C O S I T Y In Section 4.1, we showed that circularly polarized waves with non-zero viscosity or resistivity are solution of the non-linear equations. In principle, if we start our simulation with one of the eigenmodes corresponding to the growth rate s± = ±iw (equation 41 for ? = ? = 0), we should obtain the time-evolution of a torsional Alfve´n wave as a result of the computation.

However, the finite grid and time-stepping resolution introduce some numerical defects. For example, Figs 1(a) and (b) show that numerical results undergo some dissipation. In these figures, the dashed line corresponds to a wave with a slightly lower amplitude than a pure torsional Alfve´n wave after three oscillation periods. This suggests that the numerical errors in the code may behave like an equivalent viscosity and resistivity. In principle, we could define their effective values if we were able to fit a model evolution to the actual numerical output of the code.

In this appendix, we are motivated to compute the evolution of a system which starts with the initial conditions for a torsional Alfve´n wave (with ? = ? = 0), but which is evolved with some amount of viscosity ?N and resistivity ?N. Recall that ? = k2?N and ? = k2?N, where ?N and ?N are the effective resistivity and viscosity. We present the results to first order in (? ? ?)/kvA = (?N ? ?N)k/vA.

We choose the initial phase such that ?bx = 1. The initial conditions for a torsional Alfve´n wave give ?ux = 1 and ?by = ?uy = i.

We first assume that the code preserves well the initial uniform density profile.1 According to Section 4.1, there exist only two incompressible modes that can be excited with growth rates given by equation (41). We decompose our initial conditions on the two corresponding eigenmodes which have ?ux± = (s± + ?)/(ikvA) ?bx±: ?ux = 1 = ?+ s+iw+ ? + ?? s?iw+ ? (C1) and ?bx = 1 = ?+ + ?? with s±ik+vA? 2?i?kv?A ± 1 and where ?+ and ?? are the complex weights of the two eigenmodes.

We solve for ?+ and ?? and retain the first order in (? ? ?)/kvA: 1 + kvA + i(? ? ?)/2 k2vA2 ? (? ? ?)/2 1 + i ? ? ? 4kvA (C2) (C3) (C4) (C7) (C8) (C9) (C11) and and and ?? = 1 ? ?+ ?i ?4k?vA? . (C5)

The non-linear coupling between these two modes can only occur through the total pressure gradient term and it happens that this term vanishes to first order in (? ? ?)/kvA. The temporal evolution of the system can hence be approximated by its linear evolution ?ux = ?+ s+ik+vA? exp(s+t ) + ?? s?ik+vA? exp(s?t ) (C6) ?bx = ?+ exp(s+t ) + ?? exp(s?t ).

We finally recover the temporal evolution of the perturbed quantities as ? ? ? + ? t

2 ? + ? t 2 cos(kvAt + k · r ) + ?2k?vA? sin(kvAt ) cos(k · r ) cos(kvAt + k · r ) ? ?2k?vA? sin(kvAt ) cos(k · r ) .

The y-component of these fields can be recovered because of the circular polarization conditions by = ibx and uy = iux . We choose to recover ? and ? from their sum and difference through the volumic averages of kinetic and magnetic energy: 1 ( [u])2 + ( [b])2 = exp (?(? + ?)t ) cos(k · r ) (C10) 2 and ( [u])2 ? ( [b])2 = (? ? ?) sin(2kvAt ) ( [u])2 + ( [b])2 .

2kvA

Hence, we find the total dissipation ? + ? from the exponential decay of the kinetic plus magnetic energy, and we get the difference 1 We actually checked that to enforce ? = 1 in the code did not change much the measured ? and ?. This paper has been typeset from a TEX/LATEX file prepared by the author.