Construction of complex shell models of MHD turbulence in computer algebra systems

The paper describes the developed by authors technique for constructing complex shell models of turbulence. The compilation of the equations of this model and its exactly solution are implemented using by computer algebra system. The technique allows one to vary the sizes of nonlocality of nonlinear interaction in the space of scales, expressions for shell analogues of conservation laws, and the nature of stationary solutions with different power distribution.


Introduction
This article will consider one part in information technology -a system of computer algebra. This software environment allows you to manipulate algebraic expressions (automated algebraic transformations), to avoid mistakes int algebraically cumbersome calculations. Computer algebra is not very popular, unfortunately, for physics research, it's paper about one of their possible applications. The work is devoted to how symbolic packages can be used to constraction wide classes of shell models of MHD turbulence .
An important property of turbulence is that it is described more clearly in scale space than in physical space, because the three processes -energy injection, energy transfer and dissipation, are separated in scale space, and mixed in physical space. The main idea of shell turbulence models is in the construction of a chain of ordinary differential equations describing the processes of spectral energy transfer in developed turbulence. Such models make it possible to reproduce realistic scaling law.
The general view of the Navier-Stokes equation and the induction equation is as follows ∂v ∂t here Here, the components of the field depend on spatial coordinates and time.
If we represent the fields by their spatial Fourier spectrum, then we have the following system -are spatial spectrums of the fields.
In the system (2), an asterisk denotes a complex conjugation. The fields with caps are complex, since they are expressed from the initial ones by the Fourier transform, however, the kernels of nonlinear interactions S (k, s, q), L (k, s, q) and W (k, s, q) are real, this follows from the fact that this is the structure of equations that arises when we transfer magnetohydrodynamic equations by the Fourier transform from the physical space to the space of scales.
The concept of shell models is as follows. The axis of wavenumbers is divided into zones (shells) expanding exponentially k n <| k |< k n+1 , usually the denominator of the progression is 2, then we can talk about octaves k n = 2 n k 0 .
For each zone, a complex variable is introduced, the modulus is interpreted by the a measure of the pulsations of the scale shell, a kind of collective variable for shell. For these variables, a dynamic system is compiled, the equations of which at the phenomenological level correspond to the base equations of a turbulent system.
Next, the collective variables u n and B n are introduced, which are a common measure of ripple. Thus, the general form of the shell equations can be written as Good kind of analogy between systems (2) and (3). The task of constructing a specific model is to provide certain quadratic conservation laws in the conservative limit, the analogs of which take place in the exact system.

Conservation laws in hydrodynamics
Hydrodynamic helisity Kinetic energy

Conservation laws in magnetohydrodynamics
Total energy Magnetic helisity Cross helisity This imposes various restrictions on the coefficients of the nonlinear interaction matrices. It is for the calculation of these coefficients that we propose an automated technology based on the use of computer algebra systems. We emphasize that it is proposed to use symbolic computation not for studying the shell models themselves, but for the easy and fast generation of various classes of models that ensure certain conservation laws [3].

Conservation laws
Since there are no geometric flows in shell models at all, the only way to add information about the two or three dimensions of flows to the model is to ensure that the conservation laws are satisfied in each of these situations [2]. On the right-hand side of the equation (3), only the quadratic form remains without external forces and dissipative terms. Let us consider the shell analogs of conservation laws in the Table  1., which presents only the three-dimensional case of conservation of quantities in «pure» hydrodynamics and magnetohydrodynamics. The first column contains the necessary conservation laws in their original form. In the second column, the same laws are presented in Fourier space on the scale of wave numbers. In the third, their shell counterparts. For example, for magnetic helicity H B . If we write down the mixed products in terms of the coordinates of the vector B, then we get a bilinear form from the real and imaginary parts of the coordinates, so the shell analog is taken in the form of the same bilinear form from the real and imaginary parts of the collective variable Quadratic forms are analogues of the conserved quantities known in hydrodynamics (magnetic hydrodynamics). In the system (3) in the quadratic form S nij the term contains three indices, it is better to rewrite the matrix of nonlinear interactions in the form of a term with two indices and separately the wave number 2 n . This is due to the fact that the nonlinear terms in the original equations contain the operator , whose analog in the scale space is the wave number 2 n . In addition, it is customary to write quadratic terms in shell equations through indices that give deviations from a given scale level. Namely, such transitions are based on the assumption of the scale self-similarity of the turbulent flow.
Let Q nij be some quadratic form, and x n and y n be shell variables. The quadratic term on the n-th scale is as follows It is convenient to work with this form of writing to obtain equations. And the final record for building systems on a computer is conveniently obtained in the following form where i = n + i , j = n + j . The new indices define the distance from the current n-th scale level to others in nonlinear interaction. Those quadratic forms that bind the variables of the same field must have a symmetric matrix. Conservation laws do not require this; therefore, the symmetry condition must be imposed separately.
Next, we consider the form of equations for the interaction matrix for the MHD turbulence situation, as well as the general technology we assume for compiling and solving finite truncations of systems using symbolic computation packages.

Shell MHD turbulence model
Consider developed turbulence in an incompressible conductive fluid.
The equations of magnethydrodynamics in the conservative limit preserve three quadratic quantities. In the three-dimensional case (which we are considering) this is the total energy E = n (u n u * n + B n B * n ), cross helicity and magnetic helicity The conservation of total energy gives two types of equations of the following form The conservation of cross helicity gives two types of equations of the following form The conservation of magnetic helicity gives equations of the following form Thus, the system is composed of seven types of equations for functions s[i, j], l[i, j] and w [i, j].
As a result, the construction of a shell model is reduced to the compilation of a system of linear equations with rational coefficients of large dimension. Even for a small number of spatial scales, for example, equal to two, the number of equations becomes more than the spirit of hundreds. It is clear that even building such a system «manually» is very problematic and requires automation. Symbol computing packages allow you to quickly build and process such systems.

Domain of existence of equations
Each family of equations is infinite. However, we always set a certain limiting range J of interactions in the space of scales, namely, if at least one of the indices of the matrix element modulo large J, such an element is assumed to be zero. In other words, J is a measure of the model's nonlocality in the scale space. As a result, only a finite number of equations are not identities. It is these equations that we automatically form in the symbolic package into the system and then solve it. Real equations must be drawn up and solved only for pairs of indices from the cruciform region Fig. 1. For indices outside the domain, the corresponding equations degenerate into identities. The sets of calculated coefficients can then be represented in a symbolic package using two-dimensional arrays, the indices of which change from -J to J.
Let's consider one more limitation that naturally follows from wave interactions. One of the non-linear terms in the exact equations (2) looks like this The presence of the δ-function indicates that only waves whose wavenumbers form a triangle interact. This is a manifestation of the law of conservation of momentum. Therefore, in shell models, only those interactions should be retained, from the wavelengths of the vectors of which a triangle is formed. It can be shown that only the coefficients, the positions of which are indicated by circles in the Fig. 2, can be nonzero. The diagram is shown for constraints at J = 6, if we consider ar- bitrarily distant interactions, then they extend to infinity. Two bars on the graph (vertical and horizontal) indicate that energy can be pumped into a given scale from the interaction of one arbitrarily large scale, and a scale close to the given one. This corresponds to the well-known phenomenon of energy transfer from large to small scales in turbulence, the so-called direct cascade.
The oblique strip indicates that energy can be pumped into a given scale from the interaction of arbitrarily small, but close scales. This transfer is known in magnetohydrodynamics as the α-effect.
Introduced additional constraints reduce the number of free variables, as well as the number of solutions for J greater than or equal to 3.
It is clear that the resulting system for matrix elements will be linear, homogeneous, and with rational coefficients. This makes it possible to solve it absolutely accurately in the case of using software that supports the arithmetic of rational numbers. In particular, this can be done by computer algebra systems, any of which contains appropriate procedures. We also note that the resulting system, as the calculations show, is, as a rule, underdetermined and its general solution always determines a whole parametric class of models that exactly satisfy the conservation laws.
The selection of specific models can be done for any additional considerations. For example, additional equations can be introduced that ensure the existence of a stationary solution in the model with a power-law distribution over scales. This technique was implemented by us in the Maple computer algebra system [4] for «pure» hydrodynamics, magnetohydrodynamics, turbulent convection and MHD convection.

Conclusions
A method is developed for constructing complex shell models of MHD turbulence, the equations of which exactly satisfies the given conservation laws. It is performed using any symbolic computation.
The technique allows the automated generation of model equations for arbitrary long-range nonlinear interactions in the space of scales.
The program was developed in the MAPLE environment. The correctness of both methods and programs is that it reproduces well-known shell models.