Computation of kinematic and magnetic $\alpha$-effect and eddy diffusivity tensors by Pad\'e approximation

We present examples of Pad\'e approximation of the $\alpha$-effect and eddy viscosity/diffusivity tensors in various flows. Expressions for the tensors derived in the framework of the standard multiscale formalism are employed. Algebraically the simplest case is that of a two-dimensional parity-invariant six-fold rotation-symmetric flow, where eddy viscosity is negative, indicating intervals of large-scale instability of the flow. Turning to the kinematic dynamo problem for three-dimensional flows of an incompressible fluid, we explore application of Pad\'e approximants for computation of tensors of magnetic $\alpha$-effect and, for parity-invariant flows, of magnetic eddy diffusivity. We construct Pad\'e approximants of the tensors expanded in power series in the inverse molecular diffusivity $1/\eta$ around $1/\eta=0$. This yields the values of the dominant growth rate due to the action of the $\alpha$-effect or eddy diffusivity to satisfactory accuracy for $\eta$, several dozen times smaller than the threshold, above which the power series is convergent. For one sample flow, we observe eddy diffusivity tending to negative infinity when $\eta$ tends from above to the point of the onset of small-scale dynamo action in a symmetry-invariant subspace where a neutral small-scale magnetic mode resides. However, 49 first coefficients in the power series in $1/\eta$ prove insufficient for Pad\'e approximants to reproduce this behaviour. We do computations in Fortran in the standard `double' (real*8) and extended `quadruple' (real*16) precision, as well as perform symbolic calculations in Mathematica.


Introduction
Power series expansion of analytic functions is perhaps the most powerful tool of numerical analysis. Let us just note that most algorithms for numerical integration of ordinary differential equations, such as the Runge-Kutta methods, rely on Taylor series expansions for derivation. The truncated series -i.e., polynomials -are easy to compute, and thus provide an important basic algorithm for evaluation of many analytic functions.
However, there are two caveats. One is related to a finite precision of computations, stemming from the hardware architecture and employed in the overwhelming majority of computer codes. A well-known example of the resultant failure of a computational procedure is a straightforward attempt to compute by this technique an exponent of a real large negative number [10]. Mathematically, this does not present any difficulty -the large individual terms in the Taylor expansion around zero are guaranteed to mutually cancel out and yield the final result which is less than Email address: smgamafc.up.pt, http://sigarra.up.pt/fcup (Sílvio M.A. Gama) unity. For finite-precision computations, however, the cancellation is not any more guaranteed, and the initial growth of individual terms can result in ultimate loss of accuracy.
The other one stems from finiteness of the radius of convergence of most power series encountered in computational practice. A complementary technique is then needed to continue analytically a function defined by the power series outside its circle of convergence. This can be achieved by constructing the so-called Padé approximants [14,4,5], i.e., an implementation of the continuation in the form of the ratio of two polynomials. Let us cite the words of appraisal in [24]: "Padé approximation has the uncanny knack of picking the function you had in mind from among all the possibilities. Except when it doesn't! That is the downside of Padé approximation: it is uncontrolled. There is, in general, no way to tell how accurate it is, or how far out in x it can usefully be extended. It is a powerful, but in the end still mysterious, technique." A not less mysterious notion is that of eddy diffusivity [28], also known as eddy (or turbulent) viscosity when fluid viscosity, the source of diffusion in hydrodynamics, is considered. Like the magnetic α-effect and anisotropic kinetic alpha-(aka AKA) effect, eddy diffusivities are often encountered in magnetohydrodynamics when generation of large-scale magnetic fields by flows of electrically conductive fluids is considered. At first sight, it is in direct contradiction with the second principle of thermodynamics. Of course, in fact no physical laws are violated. Both notions just describe the mean influence of the small scales on large-scale structures.
According to the modern paradigm, cosmic magnetic fields (such as the solar or geomagnetic field) exist due to the dynamo processes in the moving electrically conductive medium (such as melted rocks in the outer Earth's core) [21]. The generating flows are typically turbulent and feature a vast hierarchy of spatial and temporal scales. Small-scale fluctuations of the flow (called "cyclonic events" by E. Parker) give rise to small fluctuations of magnetic field. The interaction of the small-scale components of the magnetic field and flow velocity produces a mean electromotive force (e.m.f.) that may have a non-zero component parallel to the mean magnetic field, and this can be beneficial for magnetic field generation [22]. The part of the mean e.m.f. linear in the mean field gives rise to the so-called magnetic α-effect. If the flow is parity-invariant, the α-effect disappears and the impact of yet smaller spatial scales becomes apparent; the mean e.m.f. is then a linear combination of the first-order spatial derivatives of the mean field, giving rise to eddy (turbulent) diffusivity. These physical ideas are treated under various simplifying assumptions in the mean-field electrodynamics [29,17], and, relying only on the first principles, by asymptotic methods of homogenization of elliptic operators in the magnetohydrodynamic multiscale stability theory [26,27,32,33,9,19,35]. Weakly nonlinear stability problems are also amenable to these methods [7].
Analysis of equations makes it evident that eddy viscosity/diffusivity acquires the unusual properties, because it acts on mean fields only, i.e., essentially an open physical system is considered. In fact, in this class of MHD systems the inverse energy cascade is important, energy proliferating from small scales towards large ones; the source of energy for the developing large-scale magnetic, hydrodynamic or combined MHD perturbation is the forcing applied to maintain the perturbed (also sometimes called basic) fluid flow.
Evaluation of the α-effect and eddy diffusivity tensors involves solving the so-called auxiliary problems, which are linear problems for the respective elliptic operators of linearization. In the large-scale dynamo problem, computing the magnetic α-effect tensor requires considering three such problems; the number increases to 12, when the tensor of eddy diffusivity is sought (unless auxiliary problems for the adjoint operator come into play, decreasing the number of auxiliary problems to be treated to just 6, see, e.g., [1,25]). Interesting results (e.g., instability to largescale perturbation or dynamos) are typically obtained for relatively small molecular viscosity or magnetic diffusivity. Consequently, high spatial resolution is needed when solving the auxiliary problems, which makes the problems computationally intensive. However, the tensors can be easily expanded in the respective Reynolds number (i.e., in the inverse viscosity or diffusivity provided the size of the flow periodicity box and the flow velocity are order unity), when it is small, i.e., for large viscosities and diffusivities. When the parameter tends to the critical value for the onset of the small-scale instability (i.e., in the dynamo context, to the value for which generation of smallscale magnetic field starts), the tensors usually exhibit singular behaviour [36,25,3,2] of a simple pole type, bounding from above the radius of convergence of the series. This suggests to try Padé approximants for computing the tensors and the respective large-scale magnetic field / instability growth rates.
We report here numerical experiments exploring these ideas. The paper is organized as follows. In section 2 we apply the Padé approximants techniques for evaluation of the eddy viscosity in a two-dimensional flow with two symmetries, in whose presence the eddy viscosity tensor reduces to a scalar. In view of the first caveat discussed in the beginning of this introduction, we have chosen to perform the calculations in precise arithmetics allowing an arbitrary number of correct digits; for this purpose, we have used the programming language Mathematica, giving an opportunity to make symbolic computations. In section 3 we revert to the standard "double precision" computations (real*8, in Fortran speak) of the magnetic α-effect tensor, using the "quadruple precision" (real*16) computations for comparison. In section 4 we again employ the symbolic capabilities of Mathematica to evaluate the magnetic eddy diffusivity tensor. Our findings are summarized in section 5.

Calculation of eddy viscosity
No truly two-dimensional flows exist in nature, but they mimick properties of natural objects, such as the atmosphere or ocean [30,11,20]. We analyze the eddy viscosity tensor, ε ijkℓ , [9] of a two-dimensional flow of incompressible fluid that has two symmetries: parity invariance (S1) and the six-fold rotation symmetry (S2).
Since an S1-symmetric flow has a center of symmetry, it cannot possess the large-scale anisotropic kinetic α-effect [12]. This is important, because in the presence of the AKA effect the large-scale dynamics is essentially dispersive and non-diffusive, concealing the impact of the eddy viscosity. The symmetry S2 implies the isotropy of fourth-order tensors (see, for instance, [18]), in particular, ε ijkℓ = ν E δ ij δ kℓ , where the scalar ν E is the (standard) eddy viscosity and δ mn is the Kronecker symbol. Although the assumption that a flow features the two symmetries is mathematically convenient, it may be non-realistic when considering natural or engineering problems [8].
Two-dimensional flows endowed with the symmetries S1 and S2 can be constructed as follows. A space-periodic flow is assumed, the periodicity cell being the rectangle Its stream-function Ψ(t, x) is then a sum of Fourier modes, whose wave vectors are p(2, 0)+q(1, √ 3), where p and q are integer. Any two such modes, that have wave vectors mutually related by rotations by π/3, must both be involved in the sum with the same real amplitude.
We begin this section by recalling the expression for the scalar eddy viscosity in terms of the solutions to two auxiliary problems and the analytical framework for evaluating the expansion of the eddy viscosity tensor in powers of the inverse of the molecular viscosity. We carry on by recalling the standard terminology and definitions of Padé approximants to a series. Finally, we discuss our results and conclusions.

Eddy viscosities and multiscale techniques
For parity-invariant and six-fold rotation-symmetric flows of incompressible fluid, eddy viscosities were calculated in [9] by multiscale techniques. They can be expressed in terms of solutions to two auxiliary problems, which can be solved analytically only in special cases [9] (e.g., if the flow depends only on a single spatial coordinate).
Briefly, the eddy viscosity in an isotropically forced two-dimensional flow is calculated as follows [9,13]. In terms of the stream-function Ψ(t, x), the two-dimensional forced Navier-Stokes equation for incompressible fluid takes the form Its solution, Ψ, defines a basic flow. Here, J(g 1 , g 2 ) = (∂g 1 /∂x 1 )(∂g 2 /∂x 2 ) − (∂g 1 /∂x 2 )(∂g 2 /∂x 1 ) is the Jacobian determinant of functions g 1 (x 1 , x 2 ) and g 2 (x 1 , x 2 ), the operator ∇ 2 = ∂ 2 /∂x 2 1 + ∂ 2 /∂x 2 2 is the Laplacian, ν the kinematic molecular viscosity, and f = (f 1 , f 2 ) the external force. (In our numerical examples, the flow norm and the size of the small-scale periodicity cell are order unity; thus, the inverse molecular viscosity can be regarded as the local Reynolds number, which is the key dimensionless parameter of the problem.) Now assume that the basic flow possesses the symmetries S1 and S2. Then the (scalar) eddy viscosity coefficient, ν E = ν E (Ψ, ν), that depends only on the basic flow and molecular viscosity, is [13] Here, the angle brackets denote the average over the periodicity cell: the scalar functions Q(x 1 , x 2 ) and S(x 1 , x 2 ) are solutions to two auxiliary problems and G denotes the linearization of the Navier-Stokes equation around Ψ, We restrict it to zero-mean functions of the same space periodicity as the basic flow. In this functional space we can define the inverse Laplace operator, that we denote ∇ −2 . A field G from this space can be expressed as a Fourier series where G = G 0,0 = 0. The equation ∇ 2 F = G ⇔ F = ∇ −2 G can now be readily solved: given F = 0, we find Existence of a deterministic time-independent space-periodic flow, which has an isotropic negative eddy viscosity when the molecular viscosity is below a critical value, was established in [31]. The so-called decorated hexagonal flow (DHF), on which we will also focus here, is The phenomenon of negative eddy viscosity is quite common among two-dimensional divergenceless space-periodic basic flows with the symmetries S1 and S2: about 1/3 of such flows feature negative eddy viscosity for sufficiently low molecular viscosity [13]. The auxiliary problems (2) can be solved either numerically by spectral methods, or by expanding in powers of ν −1 to high orders and afterwards extending analytically (relying on their meromorphy [13]) beyond the disk of convergence. We examine the latter method enabling us to perform all calculations exactly.

Eddy viscosity expansion in powers of ν −1
Let us expand (1): To calculate ν (n) E , we expand the solutions Q and S to (2) in Maclaurin series in ν −1 : Substituting the series into (1) and integrating by parts yields Here Q (1) = −∇ −2 (∂Ψ/∂x 2 ) and S (1) = −4∇ −2 (∂Q (1) /∂x 1 ), and the subsequent terms satisfy the recurrence relations where the operator B is defined as Since we consider here parity-invariant flows, their stream-functions being even, i.e., Ψ(−x) = Ψ(x), the series (6) involves only odd powers of ν −1 [13], i.e., ν (n) E = 0 for all even n. By definition, the [L/M] Padé approximant to a series, whose first m ≥ L + M + 1 terms are known, is the ratio of a polynomial of degree ≤ L to a polynomial of degree ≤ M, such that the first L + M + 1 terms of the expansion of the ratio coincide with the respective terms of the series.
We use Padé approximants to reconstruct the dependence of the eddy viscosity on the inverse molecular viscosity employing the expansion (6). The Padé approximation techniques can also be naturally applied for exploring the poles of the eddy viscosity. A pole on the real axis can usually be linked to the onset of linear instability to small-scale perturbations, or sometimes (if it appers again on decreasing ν > 0) to its cessation.

Results of calculations
The performance of present-day computers and efficiency of symbolic programming software gives an opportunity to calculate the coefficients (7) using recurrence relations (8), and construct the Padé approximants exactly. All calculations reported in this section are performed with full precision by Mathematica [16]. Table 1 shows some of the first twenty non-zero coefficients ν (n) E (n = 1, 3, 5, ..., 39) for the DHF. One of the reasons to perform full precision symbolic computations by Mathematica has been a hope to discover useful relations between the coefficients of the approximants. Unfortunately, none are visible in the data of Table 1.
We truncate the series (6) at orders up to 39, even terms missing. Roots of their Padé approximants quickly stabilize near ν = ν ⋆ ≈ 0.58 (see Fig. 1), indicating a transition to negative eddy viscosity at lower molecular viscosities. The root ν ⋆ is simple; a sharpened estimate is 1/ν ⋆ = 1.72144 ± 10 −5 . Table 1: First 39 non-zero coefficients of (6) for the DHF (prime decomposition, where presented). The first 5 significant figures of these coefficients are given in [31]. "a ≪ p ≫ c" denotes a natural number containing p decimal digits between a and b. These results indicate that Padé approximants is a reliable alternative to other methods for calculation of the point of the onset of large-scale instability in this type of flows. Not only they furnish stable estimates (provided the approximated function is meromorphic and the series is long enough), but also serve as precursors to future work. An illustration is Fig. 1 (right), where the [14/14] approximant (as many others) exhibits a singular behaviour near 1/ν ≈ 2.81 apparently related to the onset of linear instability to small-scale perturbations. The non-monotonicity of the eddy viscosity as a function of ν can be regarded as a manifestation of the complexity of the two-dimensional turbulent flow.

Computation of the magnetic α-effect tensor
As we have seen in the previous section, the use of Padé expansions for reconstructing the dependence of eddy viscosity on the molecular one is possible and does not require very high degrees of the polynomials involved at least for moderate (not very small) molecular viscosities. However, arbitrary-precision symbolic calculations cannot be regarded as a practical realization of the approximation algorithm. Here we construct Padé approximants for evaluation of the magnetic αeffect tensor using arithmetics of floating point numbers of the conventional double (real*8) and the extended quadruple (real*16) precision. The problem now at hand is to construct approximations applicable for small magnetic molecular diffusivities.

The multiscale formalism revealing the magnetic α-effect
We review here the multiscale expansions [35] describing the kinematic generation of large-scale magnetic field by small-scale zero-mean space-periodic steady flows. Our magnetic modes depend on two three-dimensional spatial variables, the fast, x, and slow, X = εx, one (the flow v depends exclusively on x). A magnetic mode b is an eigenfield of the magnetic induction operator L: Here η is the magnetic molecular diffusivity and Re λ the growth rate of the mode b. Both the mode and flow are solenoidal. The scale ratio ε is a small parameter of the problem, in which the magnetic mode b and its growth rate are expanded: By substituting the expansions into (9.1) and the solenoidality conditions, we derive a hierarchy of equations for the coefficients in (10). Like in the previous section, we denote by angle brackets the mean over the periodicity cell T 3 in the fast variables and by the braces the fluctuating part: Here e k are unit Cartesian coordinate vectors.
The relevant solution to the first (order ε 0 ) equation Lb 0 = λ 0 b 0 is λ 0 = 0 and a linear combination b 0 = 3 k=1 b 0 k s k of small-scale solenoidal neutral magnetic modes s k (x) that are solutions to the three so-called auxiliary problems of type I: Averaging the second (order ε 1 ) equation, we obtain an eigenvalue problem (the subscript X denotes differentiation in the slow variables). Here A is the tensor of magnetic α-effect. The kth column of this 3 × 3 matrix is in agreement with the Parker's [22] concept of the interaction of fine structures of the flow, v, and magnetic field, 3 k=1 b 0 k {s k }, giving rise to a mean e.m.f., A b 0 , linear in the large-scale magnetic field b 0 . For space-periodic mean fields where q is an arbitrary unit vector, straightforward algebra [25] yields solutions to the eigenvalue problem (13): Here s A l k = (A l k + A k l )/2 are entries of the symmetrized α-tensor s A = (A + A * )/2. For a ≤ 0, the α-effect just sustains harmonic oscillations of the mean magnetic field in the slow time T 1 = εt. When a > 0, the slow-time growth rate Re λ 1 (q) = √ a of the large-scale magnetic mode depends only on the symmetrized tensor s A, whose eigenvalues α i are real. In the Cartesian coordinate system, whose axes coincide with eigenvectors of s A, (16) takes the form where q ′ i are components of q in this basis. Thus, is the maximum slow-time growth rate of large-scale magnetic modes generated by the α-effect.
When a = 0 and the kernel of the magnetic induction operator L does not involve smallscale zero-mean modes (generically both conditions are satisfied), all terms in the expansions (10) can be determined from the hierarchy of equations obtained by substituting the series into the eigenvalue equation (9.1). If the symmetrized tensor s A is positively or negatively defined (and if the spatial periodicity of the eigenfunction is compatible with that of the flow), then the series (10) are summable [33] for sufficiently small ε and constitute an analytical in ε eigensolution for the large-scale magnetic induction operator; a unique ε-parameterized branch of the eigenvalues (10.2) originates from any simple eigenvalue λ 1 of the α-effect operator.

Padé approximation
The modes s k (and, consequently, elements of the magnetic α-effect tensor) are functions of molecular eddy diffusivity η, meromorphic in this parameter. (By contrast, the slow-time growth rates of modes generated by the α-effect are not, because the square root present in (16) gives rise to branch points.) A power series expansion of s k in η −1 for large η can be constructed like in the hydrodynamic problem considered in the previous section. We divide (11) by η to obtain Consequently, the coefficients in the expansion satisfy the recurrence relations (cf. (5.14)-(5.15) in [26]). Here ∇ −2 denotes the inverse Laplacian in the fast variables acting in the functional space of zero-mean fields. (Actually, we consider the problem for a flow, whose r.m.s. velocity is unity; the size of the periodicity box also being order unity, the inverse molecular diffusivity η −1 can be regarded, like in the hydrodynamic case, to be equal to the local magnetic Reynolds number, the dimensionless parameter characterizing the mathematical properties of the problem; (18) can thus be understood as an expansion in a small Reynolds number.) These recurrence relations can be used to compute the coefficients in (18) by pseudospectral methods. It must be noted that mathematically they are perfectly suitable for numerical work: indeed, the presence of the inverse Laplacian in the second relation (19) suggests, that on increasing the number n of the coefficient s (n) k they become smoother and their energy spectrum decay is steeper. This is in sharp contrast, for instance, with the recurrence relations for the Lagrangian time-Taylor coefficients in the expansions of solutions to the Euler equation for incompressible fluid flow [23].
It is straightforward to determine the radius of convergence of the series (18), ρ, regarded as a function of 1/η. The recurrence relations (19) involve the operator acting in the functional space of solenoidal zero-mean space-periodic fields. Since it is compact, its spectrum consists of a countable set of eigenvalues µ i , tending to zero. Consequently, ρ ≥ 1/ max i |µ i |; generically the equality holds, but ρ > 1/ max i |µ i |, if the expansion of s (1) k in the basis of eigenfunctions of the operator M does not involve eigenfunctions associated with any eigenvalue µ i such that |µ i | = max i |µ i |. Therefore, generically the radii of convergence of the series for all the three s k are the same.
Clearly, the radius of convergence of the ensuing series for the α-effect tensor (14), is not smaller than that of the series (18) for s k . Let us note a symmetry property of (21). Denote by the superscript minus objects pertinent to the reverse flow −v: The α-effect tensor A − for the reverse flow −v is obtained from the tensor A for v by transposition, i.e. (A − k ) l = (A l ) k [25]. Since the recurrence relations (19) are linear in v, where (s − k ) (n) denote the coefficients in the expansion of s − k in power series (18). This implies Therefore, the coefficients in the series (21) are symmetric matrices for odd n, and antisymmetric ones for even n. In other words, the symmetrized α-effect tensor s A involved in computation of the discriminant a in (16) is expanded in odd powers of η −1 , and of the common imaginary part of λ 1 ± (q) in even powers; the latter expansion is not needed when computing just the growth rates.

Numerical results
Here, we construct Padé approximants for the α-effect tensor (21) for a sample solenoidal flow, and compare the maximum growth rate values γ α (17) obtained for the approximated tensor to those computed directly at individual values of η by spectral methods.
For this purpose, a sample solenoidal flow has been synthesized as a Fourier series with pseudorandom coefficients, corrected to make it solenoidal and zero-mean. It involves Fourier harmonics for wave numbers not exceeding 10. The coefficients are scaled so that the energy spectrum decays exponentially by 10 orders of magnitude and the r.m.s. velocity is unity.
Solutions to auxiliary problems have been computed by the code [34] employing standard pseudo-spectral methods. For η > 0.05, the problem was preconditioned by the operator (−∇ 2 ) −1/2 , readily available in the Fourier space. The resolution of 64 3 Fourier harmonics was used. Energy spectra of the neutral modes s k decay for this flow by at least 9 orders of magnitude for the smallest considered η = 0.035. The Lebesgue space L 2 norms of s (n) k from n = 0 to n = 128 decay by 38 orders of magnitude, and hence the power series (18) and (21) converge for η 0.50 .

Approximation by the algorithm [15]
We have tried two approaches for construction of Padé approximants of the entries of the α-effect tensor. Here we discuss the results obtained by the algorithm proposed in [15].
Padé approximant [M/L] f of a function f (y) = ∞ n=0 f (n) y n is the ratio of two polynomials of degrees M (numerator) and L (denominator), whose M + L + 1 first Taylor expansion coefficients coincide with those of f . For the sake of argument, let us assume M ≥ L. Then L + 1 coefficients of the denominator d(y) = L+1 n=0 d n y n satisfy the linear system of equations of the form  (finding the coefficients of the numerator upon solving (24) is straightforward, see [14,5] for details). In our case, the coefficients s (n) are obtained by applying iteratively the operator M (20). It is compact, and its eigenvalues, except for a finite number of them, are below unity in absolute value. The respective spectral components decay during the iterations according to the power law and sooner or later reduce in magnitude below the accuracy of computations. Consequently, for large L the Toeplitz matrix of size L × (L + 1) in the l.h.s. of (24) becomes numerically degenerate, i.e., its rank effectively falls below L. To construct an approximant under such adverse numerical conditions, it was proposed in [15] to compute the singular value decomposition of this matrix and to regard its effective rank as equal to the number of singular values whose absolute value exceeds the given relative tolerance tol (i.e., is not smaller than tol (f (1) , f (2) , ..., f (M +L−1) , f (M +L) ) , where · is the standard Lebesgue space L 2 norm), decreasing the degrees of the polynomials involved in the Padé approximation, M and L, by the number of the "missing" dimensions. To counter noise due to rounding errors, tol = 10 −14 was often used in [15]. Beyond poor spectral properties of the system of equations for the Padé coefficients, there exist two other reasons for amplification of the numerical noise originally due to round-off errors: • Pseudospectral methods used in computation of space-periodic solutions s k to the auxiliary problems (11) and their coefficients s (n) k (19) involve fast Fourier transforms. These algorithms are very efficient. However, they operate by computing various linear combinations of the Fourier coefficients. Typically, at least for moderate molecular diffusivities, the energy spectra of these fields decay fast. In a sum of a large coefficient with a small (in absolute values) one, a significant part of the accuracy of the smaller coefficient is lost.
• Insufficiency of the spatial resolution can result in significant numerical errors. We may note that while increasing the resolution improves solutions, it aggravates the FFT accuracy problems.
We have tried the algorithm [15] for a set of tol values ranging between 10 −10 and 10 −20 using the MATLAB procedure provided by the authors of [15]. We have computed 65 first coefficients of the power series expansions of the symmetrized α-effect tensor entries ( s A k )    Fig. 2. We observe that the approximations of the maximum growth rates γ α are relatively accurate for tol = 10 −12 and 10 −16 for η 0.1. This bound is roughly 5 times smaller than the minimal η for which the power series for s A l k converge. Table 2 sheds light on the reasons why the gain is unsatisfactory (for η ≥ 0.1 spectral computations of the α-effect growth rates for individual η's are efficient): since the rank decreases, when small in absolute value singular values are discarded, the algorithm ends up with very moderate orders [2L/2L − 1].
The four remaining panels in Fig. 2 reveal the presence of the so-called Froissart doublets in the approximants of some entries. Froissart doublets is a factor of the form (1/η − a)/(1/η −ã) in the approximant, where the two constants a andã are close but distinct. Such a factor implies a singular behaviour of the approximant for 1/η close toã, not altering much its behaviour at distances fromã significantly larger than |a −ã|. Often such factors are artifacts emerging due to noise in the data. Almost vertical segments of the plots are signatures of the Froissart doublets (see Fig. 2). They extend to both positive and negative infinity in the graphs of the approximants, but since (17) are nonlinear functions of the tensor entries, the respective segments of graphs of γ α may be bounded from below and/or above. (Their detection has proved unexpectedly difficult; in order to reliably show their full range in the vertical direction, we have plotted the approximation step 10 −9 along the abscissa.) We thus see that although the algorithm [15] is supposed to be robust, it is prone to yield approximants involving Froissart doublets.

Approximation by the algorithm [24]
Since we have failed to obtain satisfactory resuts with the use of the algorithm [15], we have also tested the algorithm [24]. Quoting from [24], although the equations for the coefficients of the approximant involve a matrix in the Toeplitz form, "experience shows that the equations are frequently close to singular, so that one should not solve them by the methods" relying on this form, "but rather by full LU decomposition. Additionally, it is a good idea to refine the solution by iterative improvement (routine mprove in §2.5)". This is implemented in their pade procedure. We have used it with one alteration: the routine mprove stops when the discrepancy increases; instead, it has been allowed to make up to 1000 improvement iterations permitting the discrepancy to temporarily grow and storing the minimum-discrepancy solution obtained in the course of these iterations (however, it has often been forced to stop before the allowed number of iterations has been performed, the iterative process blowing up with an overflow).
Approximate maximum slow-time growth rates (17) of large-scale magnetic modes generated by the α-effect have been computed for the same flow using again [2L − 1/2L] Padé approximants for the entries s A k l (η). They are compared in Fig. 3 for increasing orders L with the actual maximum growth rates obtained by direct computation of the fields s k using spectral methods for individual molecular diffusivities η.
Four Padé approximants [2L − 1/2L] of the entries of the α-effect tensor have been constructed for each considered L, using the resolution of 64 3 or 512 3 Fourier harmonics, and running our code with the double (real*8) or extended quadruple (real*16) precision of the floating-point number arithmetics. In computers built around Intel and compatible processors, the former is standard, and the latter is not supported by hardware, but is software-emulated; however, many compilers do not require modifying the Fortran source code to use it, all the floating-point data and computations can be readily promoted to the real*16 precision by using the appropriate compiler option such as -r16. Higher precision and resolution has been expected to improve the accuracy of the coefficients of the approximants, to augment the orders of the approximants beyond those produced by the algorithm [15] and to increase the η interval, where the growth rate values determined for the approximated α-effect tensor are close to the actual growth rates. We show in Fig. 3 the resultant approximations of γ α for L = 4, 8, 14, 20 and 28 to 31. The four graphs for L = 4 are visually indistinguishable and we show only one of them; the same holds true for L = 8. For L = 14 and 20, the plots of the approximated γ α , computed with the quadruple precision for the two spatial resolutions, also visually coincide (Fig. 3(d),(f) and Fig. 3(h),(j)), but this is wrong for the respective double precision approximations. For higher L, all four plots are visually distinct. The quadruple precision approximations are plagued much less by the Froissart doublets (and never involve multiple occurrences of the doublets) than the double precision ones. Three high-L quadruple precision approximations are reasonably accurate: for L = 28 and the 512 3 resolution for η ≥ 0.055 (Fig. 3(n)); for L = 29 and the 64 3 resolution for η ≥ 0.05 (Fig. 3(p)); and for L = 30 and the 64 3 resolution for η ≥ 0.05 (Fig. 3(t)). Thus, the left end of the interval of validity of Padé approximations has decreased roughly twice compared to that obtained by the algorithm [15]. All other quadruple precision approximations for L ≥ 29 ( Fig. 3(r), (v), (x) and (z)) can also give reasonable accuracy for η 0.06 ÷ 0.07 upon removal of Froissart doublets from the affected approximants of s A k l . These results suggest, that Padé approximants are useful for representing the functional dependence of the slow-time growth rates (17) of large-scale magnetic modes generated by the α-effect for fairly low magnetic molecular diffusivities. However, for construction of Padé approximants, accurate enough to serve small η, the quadruple precision arithmetics must be used, and hence run times become comparable to those of direct computation of the growth rates at individual η's (note that real*16 computations are typically ten times slower than real*8 ones). Therefore another strategy is perhaps also sensible: in computations for an individual η, to use relatively low-order not-very-precise Padé approximants for neutral modes s k (constructed, for instance, at each point in space or for each Fourier harmonics within the employed resolution) as the initial data for further refinement by the usual iterative methods.

Computation of the magnetic eddy diffusivity tensor
As discussed in section 2, an important class are parity-invariant flows. This symmetry is compatible with the equations of fluid dynamics (the Navier-Stokes or Euler equations) provided the forcing has the same property. For such a flow, the domain of the operator of magnetic induction L splits into the subspaces of parity-invariant fields (such that f(−x) = −f(x)) and of parity-antiinvariant ones (such that f(−x) = f(x)). Solutions to the auxiliary problems (11), s k (x), are therefore parity-antiinvariant. This implies A = 0 (see (14)), i.e., no α-effect acts in such flows, and hence λ 1 = 0.

The multiscale formalism revealing the magnetic eddy diffusivity
By (12), where the small-scale zero-mean (non-solenoidal!) fields g mk (x) solve nine auxiliary problems of type II: For parity-invariant v, g mk (x) are also parity-invariant; moreover, b n are parity-antiinvariant for all even n and parity-invariant for odd n [35] in the expansion (10.1), and no odd powers of ε enter the series (10.2) for the eigenvalue λ.
Averaging the third (order ε 2 ) equation in the hierarchy yields where is the so-called tensor of magnetic eddy diffusivity correction. Again assuming that the mean field b 0 is a Fourier harmonics (15), we find [25] where both sums are over even permutations of indices 1, 2 and 3 (i.e., (j, l, n) are combinations (1,2,3), (2,3,1) and (3,1,2)) and it is denoted The minimum η eddy ≡ min is called the minimum magnetic eddy diffusivity; when it is negative, the interaction of the fluctuating small-scale velocity and magnetic field is capable of generating large-scale magnetic fields. For this reason, this quantity is of prime interest in the large-scale dynamo theory. Expression (27) can be transformed into where Z l are zero-mean solutions to three auxiliary problems for the adjoint operator: and L * : z → η∇ 2 z − {v × (∇ × z)} is the operator adjoint to L acting in the space of zero-mean space-periodic fields.

Padé approximation
Relation (27) suggests to construct expansions of the solutions to the auxiliary problems in the inverse molecular diffusivity, (18) and Dividing (25) by η yields for n > 1. (33.2) Clearly, the flow being parity-invariant, all s mk parity-invariant. By (27) and (32), Thus, algorithm I consists of the following steps: • find the fields s Expressions (34) reveal symmetry properties of coefficients in the eddy diffusivity tensor expansion (similar to those of the coefficients of the α-effect tensor expansion). Eddy diffusivity tensor for the reverse flow −v is related to that of the flow v by the relations (D − ml ) k = −D l mk [1]. By (33), g (n) mk = (−1) n (g − mk ) (n) . Thus, identities, analogous to those used in the case of the α-effect tensor, reveal that for each fixed m the coefficients (D l mk ) (n) in the series (34) are symmetric 3 × 3 matrices for even n, and antisymmetric ones for odd n. This implies that the symmetrized matrix s D (28.3), determining the discriminant d (28.2), is expanded in even powers of 1/η, and the antisymmetric one D − s D, determining the common part of λ 2 ± (q) (28.1), in odd powers.
It is simple to show that, like in the case of α-effect dynamos, for a given flow v the radius of convergence of all the series (32) and (34) (regarded as functions of 1/η) is generically equal to 1/ max i |µ i |, where µ i are eigenvalues of the compact operator M (20); convergence of the series is guaranteed for η > max i |µ i |.
Because of many symmetries of the cosine flows, all entries of the eddy diffusivity tensor D vanish, except for five pairs (see [25]): Consequently, the minimum eddy diffusivity (29) takes a simple form: We have considered the particular sample flow for a = (1, 0, 0), b = (1, 1, 0), n = 1 (45) and used Mathematica again to implement algorithm I: we have calculated exactly the coefficients of the expansions (18) and (32) of solutions to the auxiliary problems (11) and (25) using the recurrence relations (19) and (33), and of the coefficients D  Fig. 4 shows the sequence of the ratios |(D l mk ) (2n−1) /(D l mk ) (2n+1) | 1/2 for five independent entries. The limit of this sequence for n → ∞ is equal to the radius of convergence of the series (34) (regarded as a function of 1/η) for the respective entry (note that due to the antisymmetry in l and k, the entries involve only odd powers of 1/η). The figure demonstrates that the series for the five entries have the same radius of convergence and converge for η 0.5.
Because precise Mathematica calculations require considerable computer resources, we have not considered high-order Padé approximants. The amount of calculations reduces if meromorphic functions  are approximated only, in terms of which (see (44)) The poor quality of the resultant approximation (see Fig. 5(a)) is due to the presence of two Froissart doublets in the approximants of q 2 and q 3 (Fig. 5(b)). Gaps are present in the plot in Fig. 5(a), where the approximant of q 3 becomes negative due to its singular behaviour and thus the square root in (47) can not be extracted. Upon factoring the doublets out (which is simple in Mathematica) in the two plagued approximants, the quality of the approximation becomes very similar to that obtained by using [18/18] approximants of q i (see Fig. 5(c)). Increasing the orders to [24/24] does not significantly improve the approximated η eddy (see Fig. 5(d)). A better approximation is obtained if the elements of the eddy diffusivity tensor D are Padé-approximated individually (see Fig. 6); this gives reasonably accurate values of η eddy for η 0.02, which is roughly 25 times larger than the minimum η, for which the power series in 1/η for the fields s k and g mk , as well as for the elements of the tensor D are convergent.
Upon shifting by a quarter of the period in the vertical coordinate x 3 , the curl of (43) takes the form where we now assume the normalizing factor β = 2 (n 4 + (a · b) 2 )(|a| 2 + |b| 2 ) + 2n 2 ((a · b) 2 + |a| 2 |b| 2 ) −1/2 , for which the r.m.s. flow velocity is again 1. Since this flow possesses all the symmetries of (43), the expression (44) for the minimum eddy diffusivity still applies. Following algorithm II, for a sample flow (48) for a = (0, 1, 0), b = (2, 2, 0), n = 1, we have calculated by Mathematica 49 coefficients D (n) mk of the series (34) up to order η −49 . The graph of the ratios |(D l mk ) (2n−1) /(D l mk ) (2n+1) | 1/2 for the five independent entries (see Fig. 7(a)) of the eddy diffusivity tensor shows that the series (34) converge for η 2.2. The highest-order (for this set of coefficients) [25/24] approximants of the entries are free of Froissart doublets (see Fig. 7(b)). They yield a satisfactory approximation of dependence on η of the minimum magnetic eddy diffusivity for η 0.03, which is roughly 70 times smaller than the bound obtained for convergence of the Taylor series (34) for D l mk (see Fig. 7(c),(d)). However, their fidelity is insufficient to reproduce the singularity of the minimum eddy diffusivity observed in Fig. 7(c),(d).
The symmetries of the flow (48), (49) imply, that the neutral modes s k reside in invariant subspaces of the magnetic induction operator, that can be categorized in terms of the Fourier harmonics b n e in·x , comprising the Fourier series for s k (by virtue of the mode periodicity, the wave vectors n have integer components). Only the harmonics that have the following properties enter the Fourier series for s k : • b n = b −n are real; • the numbers n 1 and n 1 /2 + n 2 + n 3 are even; • s 1 and s 2 are symmetric in x 3 (i.e., b 1 n = b 1 n * , b 2 n = b 2 n * , b 3 n = −b 3 n * ) and s 3 is antisymmetric in x 3 (i.e., b 1 n = −b 1 n * , b 2 n = −b 2 n * , b 3 n = b 3 n * ), where n * = (n 1 , n 2 , −n 3 ). We have checked that for η > η cr = 0.00420516 small-scale modes from the subspace, where s 1 and s 2 are located, are not generated, but at η = η cr the small-scale generation starts in the subspace, where s 3 resides. It is known [36,25,2] that the point of the onset of the small-scale generation is typically associated with a singularity of the α-effect or eddy diffusivity tensors; this is the case for the flow under consideration. We observe in Fig. 7(d) that the least-squares fit by a hyperbola through 20 computed values of minimum eddy diffusivity at equispaced points in the interval 0.0045 ≤ η ≤ 0.014 is very accurate (actually, only 19 points out of the 20 are shown; for the smallest η = 0.0045, eddy diffusivity -20.217501, also well approximated by the hyperbola, is out of the vertical range of Fig. 7(d)). The hyperbolic fit yields the location of the singularity at η = 0.0041988 (the vertical asymptote is shown by a dashed line in Fig. 7(d)) which is very close to the point of the onset of the small-scale generation η cr = 0.00420516 computed by spectral methods; the hyperbola through the three smallest η from this interval yields a closer value 0.00420233 .

Conclusions
We have tested Padé approximants of the α-effect and eddy diffusivity tensors, responsible for generation of large-scale fields, as functions of the respective molecular diffusivity: the viscosity ν when hydrodynamic perturbations are studied, and the magnetic diffusivity η when kinematic dynamo problem is under scrutiny. We have tried different computational tools: Fortran codes relying on the floating point arithmetics, and Mathematica for symbolic and arbitrary precision calculations. A relatively high (several dozens) order of Padé approximants is needed to obtain a reasonable accuracy of approximation of the tensor entries. For this, high precision of computations (in particular, the quadruple precision in Fortran) has proved indispensable. For our sample flows the Padé-approximated tensors yield large-scale magnetic field growth rates to satisfactory accuracy for η, several dozen times smaller then those, for which power series in the inverse molecular diffusivity converge, for both large-scale generating mechanisms (the α-effect and negative magnetic eddy diffusivity).
Application of these techniques in computational fluid dynamics and magnetohydrodynamics seems natural for estimating transport coefficients quantifying the influence of small scales on the evolution of large-scale fields in the spirit of Large Eddy Simulation methods. Our findings, while promising, suggest that to achieve this goal additional algorithms are needed for determination • of Froissart doublets in approximants of tensor entries and their elimination (the approach of [6] may prove useful for monitoring the absence of the doublets); • of the interval in molecular diffusivity, where the approximation is sufficiently accurate; • of the realistic orders of a Padé approximant, for which the length of such interval is close to the maximum.
It is relatively easy to perform these tasks manually by trial-and-error methods -the difficulty lies in performing them automatically.