1. Introduction
Solar cosmic rays are generated during the primordial energy release in solar flares. This explosive process takes place in the solar corona above the active region at altitudes of 15 000 to 70 000 km (~1/40–1/10 of the solar radius). This has been proven by direct measurements of the thermal X-ray emission of flares on the limb [
1]. There is a number of other evidence for the energy release of a flare in the corona, based on an analysis of observations (see, for example, [
2,
3]). The possible positions of the flares found from the results of numerical simulations in the corona above the active region confirm the appearance of flares at these altitudes.
The slow accumulation of magnetic energy that occurs in the solar corona, and then its fast release during a flare, is explained by the mechanism according to which, during a flare, the energy accumulated in the magnetic field of the current sheet is released [
4,
5]. The current sheet, which is formed in the vicinity of a singular line of the X-type magnetic field as a result of the accumulation of disturbances, is first in a stable state. Further, in the process of quasi-stationary evolution, during which the plasma flows fast out of the sheet under the action of the magnetic tension force, the current sheet transfers into an unstable state. The instability in the current sheet causes a flare release of energy with all the observed manifestations, which are explained by the electrodynamic model of the flare proposed by I.M. Podgorny [
6]. The model was developed based on the results of observations and numerical MHD simulation and uses analogies with the substorm electrodynamic model proposed earlier by its author [
7].
Solar cosmic rays appear as a result of acceleration of charged particles, mainly protons, by an inductive electric field in the current sheet, equal to the field
E=-
V×B/c near the current sheet [
8]. This inductive electric field is caused by a rapid change in the magnetic field during the current sheet instability. I. M. Podgorny noted an important property of this electric field for a wider class of physical phenomena: it is equal to
E=-
V×
B/c in the field
B of the powerful current formed near its location and in the plasma accelerated by magnetic pressure towards the location of the current. Besides the current sheet such an electric field arises in the pinch [
9] created in an installation for solving the problem of controlled thermonuclear fusion. In both processes, charged particles are accelerated by an inductive electric field. For solar flares, they (mainly protons) under favorable conditions can leave the magnetic field above the active region, which will lead to the appearance of solar cosmic rays (SCR).
This mechanism can accelerate galactic cosmic rays during superflares on stars to energies five orders of magnitude higher than the SCR energy [
10].
To study the mechanism of solar flares, the process of formation of a current sheet and the accumulation of energy in its magnetic field for each specific flare, and to obtain the possibility of improving the prognosis of solar flares based on an understanding of their physical mechanism, it is necessary to carry out magnetohydrodynamic (MHD) simulation of a flare situation in the solar corona above a real active region. The electric and magnetic fields obtained by MHD simulation above a real active region at the site of the primordial flare energy release and near it are necessary for studying the generation of solar cosmic rays. The acceleration of charged particles and the possibility of their exit from the acceleration region must be studied by calculating the trajectories of charged particles in electric and magnetic fields obtained by MHD simulation. The first results of studying the acceleration of charged particles were obtained by calculating trajectories in electric and magnetic fields, found by MHD simulation above the active region under simplified conditions [
11].
Here, MHD simulation is continued above the real active region in order to more accurately determine the configurations of the magnetic and electric fields for studying SCR generation by calculating the trajectories of charged particles. More complex field configurations are obtained and analyzed near singular lines at the places where current sheets appear. A more detailed comparison of the MHD simulation results with observations has led to some problems, the solution of which requires further development of the numerical simulation technique.
When setting the conditions for MHD simulation, no assumptions were made about the physical mechanism of the solar flare; the boundary conditions were taken from observations. For MHD simulation in the real scale of time, a significant computational speed is required, which is achieved only through the use of parallel computing on supercomputers. Parallelization of calculations was carried out by computational threads on graphic cards (GPU). Experience has shown that the physical mechanism of a solar flare can be studied by MHD simulation only if the calculation starts a few days before the appearance of flares, when magnetic energy for the flare has not yet accumulated in the corona. Simulation in this setting of the problem showed the appearance of a current sheet above the active region [
12]. Also, the appearance of a current sheet in such a setting of the problem was demonstrated by MHD simulations carried out by C. Jiang, S.T. Wu et al [
13,
14]. MHD simulations in the solar corona in other problem settings were performed in [
15,
16,
17,
18].
2. Methods of MHD Simulation
MHD simulation is carried out above the active region of AR 10365. The computational domain in the corona is a rectangular parallelepiped (0≤х≤1, 0≤y≤0.3, 0≤z≤1) (the length unit was chosen L0=4×1010 cm). The lower boundary of the computational domain y=0 (XZ) is located on the surface of the Sun (photosphere) and contains the active region; the Y axis is directed from the Sun perpendicular to the photosphere. The three-dimensional system of MHD equations is solved numerically in a dimensionless form:
A typical magnetic-field strength in the active region, B0 = 300 G, was used as the unit of the magnetic field. The units of the plasma density and temperature were taken to be their typical values in the corona above the active region, n0=ρ0/mi=108 cm-3, T0=106 oK, which were assumed to be initially constant (mi = 1.67×10-24 g – ion mass). The units of plasma velocity and time are, respectively, the Alfvén velocity and Alfvén time = 0.65×1010 cm/s, t0=L0/V0= 6.1 s. In equations (1) - (4) γ=5/3 is adiabatic constant, Rem=V0L0/νm0 is the magnetic Reynolds number, νm0=с2/4πσ0 is the magnetic viscosity for the conductivity σ0 at the temperature T0, σ is conductivity, σ/σ0=T3/2, β=8πn0kT0/B02 (n0=ρ0/mi, mi is the ion mass). Re=ρ0L0V0/η is the Reynolds number, η is the viscosity. Gq=L(T0)ρ0t0/T0, L'(T)=L(T0T)/L(T0) is the dimensionless radiation function. κdl=κ/(Πκ0) is the dimensionless thermal conductivity along the magnetic field lines, Π=ρ0L0V0/κ0 is the Peclet number, κ0 is the thermal conductivity for the temperature T0, κ is the thermal conductivity, κ/κ0=T5/2.
κ⊥dl=[(κκ0-1Π-1)(κBκ0B-1ΠB-1)]/[(κκ0-1Π-1)+(κBκ0B-1ΠB-1)] is the dimensionless thermal conductivity perpendicular to the magnetic field lines, ΠB=ρ0L0V0/κ0B is the Peclet number for the thermal conductivity across the strong magnetic field (when the cyclotron radius is much smaller than the free path length). This thermal conductivity is denoted as κB, and κ0B is its value for the temperature T0, plasma density ρ0, and field B0; κB/κ0B=ρ2B-2T -1/2.
To select the parameters, the principle of limited simulation [
19] was used, according to which, much larger and much smaller units of dimensionless parameters are set in calculations much larger and much smaller than unity without accurately preserving their values. The main parameters are the magnetic and ordinary Reynolds numbers Re
m and Re. Dimensionless values of artificial viscosities (ν
m_Art_Ph и ν
Art_Ph) were set to stabilize the numerical instabilities.
For the numerical solution, an upwind absolutely implicit finite-difference scheme was developed, which is conservative with respect to the magnetic flux [
20]. The scheme is solved by the method of iterations. The methods were applied with the aim of constructing a scheme that remains stable for the maximum possible time step. The scheme is realized in the computer program PERESVET.
A stable finite difference scheme (high stability is achieved if this scheme is implicit) should approximate the magnetic induction equation (1), in which the diffusion term is taken as νmΔB rather than -rot(νmrotB). For this purpose, it is necessary to preserve the magnetic flux through the boundary of each cell of the difference scheme, which means that the finite-difference analog [divB] is equal to zero with high accuracy, if the values are correctly specified on the grid elements of the difference scheme. For a difference scheme conservative with respect to the magnetic flux, the finite-difference analogs of [νmΔB] and [-rot(νmrotB)] coincide. If in the finite difference scheme the magnetic flux is conserved with high accuracy, then the scheme with finite difference approximation of the diffusion term in the form [-rot(νmrotB)] is also stable, since this diffusion term is equal to [νmΔB] with high accuracy. In addition, when solving a finite difference scheme by iteration method, the values at the central point of the template can be taken both at the current iteration and at the next iteration. It becomes possible to use various variants of the difference scheme. The above considerations for the constant magnetic viscosity νm extend to the case where νm depends on spatial coordinates. To do this, it is necessary to add finite-difference analogs of the products of the spatial derivatives of νm and the spatial derivatives of the B components to the scheme, which do not cause instability of the difference scheme.
For the numerical solution of the MHD equations, several versions of the scheme were proposed, in which the magnetic flux is conserved with high accuracy. A more accurate visual representation of the arrangement of quantities on a three-dimensional grid of a finite-difference scheme, conservative with respect to the magnetic flux, is done. Images of the location of the values on the grid are shown in
Figure 1 and
Figure 2. The finite-difference analogue of the magnetic field divergence [div
B] for such a scheme should be equal to zero with high accuracy, for our calculations the dimensionless value |[divB]| ~ 10
-4. In connection with the appearance of numerical instabilities near the boundary of the region, additional test calculations were carried out for possible corrections in the choice of the scheme variant with the conservation of the magnetic flux. As a result, taking into account the influence of instabilities near the boundary, the variant in which the iterations converge the fastest remains the most efficient. In this version, the diffusion term in the equation for the magnetic field was taken in the form of a finite-difference analog Δ
B ([Δ
B]), rather than rot(rot
B) ([rot(rot
B)]), and the values at the central point of the grid template of the finite-difference scheme were taken on the next iteration.
In the finite-difference scheme, which is conservative with respect to the magnetic flux, the magnetic field is specified not by the field vectors at the grid points, but by the magnetic fluxes through the boundaries of the grid cells, averaged per unit area (
Figure 1). Used to specify the magnetic field components, the magnetic fluxes through the cell faces, averaged per unit area, approximate the components of the magnetic field vector perpendicular to the given face, taken at the central point of the given face. The values of plasma density ρ, velocity V, and temperature T were set at the grid points of the finite-difference scheme, i.e., at the vertices of the cubes, which are grid cells.
The dimensionless electric field E= -V×B + νm j (here νm = Rm-1 (σ0/σ) = Rm-1 T-3/2 is the dimensionless magnetic viscosity) and the dimensionless electric current density j=rotB is clearly are not included in the equations of magnetic hydrodynamics, but are expressed in terms of the quantities included in these equations. It is convenient to use the values E and j for constructing a difference scheme; they are determined on the edges of the grid cells. The edges of the grid cells, which can be parallel to one of the coordinate axes X, Y or Z, are numbered by the three-dimensional number i, j, k of the end of this face with the minimum value of the corresponding coordinate.
The equation for the magnetic field (1) in the introduced notation has the form . The flux of the magnetic field B through the surface of a small area S, perpendicular to the vector B is equal to ΦB= B S, (if there is an arbitrary surface of a large area, then the magnetic flux through it can no longer be expressed through the field vector at any one point, the magnetic flux will be equal to the integral over the surface , where B is the magnetic field vector defined at each point of the surface, ds is the vector perpendicular to the surface, the value of which is equal to the small area ds on the surface under consideration, and (B,ds) is the scalar product of these vectors).
The flux of the vector rot(-E) through the surface of a small area S, perpendicular to the vector rot(-E) is equal to Φrot(-E) = rot(-E) S. According to the induction equation , this flow Φrot(-E) represents is a change in time of the magnetic flux ΦB. Since the divergence of the magnetic field must always be zero divB=0, the magnetic flux through a surface bounding any region in space will be zero. This confirms the induction equation, from which it follows that if for an initial magnetic field its flux through the surface bounding any region in space is zero, it will remain zero for any moment in time, since the flux of the vector field rotor (in this case rot(-E) ), representing the change in time of the magnetic flux, is always zero.
To improve stability, a scheme is constructed in which the flow through the grid cell boundary remains equal to zero with very high accuracy (with the accuracy of iteration convergence if this is an implicit scheme solved by the iteration method, or with the accuracy of representing numbers in a computer if an explicit scheme is used, which less stable). This is a scheme that is conservative with respect to magnetic flux.
The magnetic flux through a face perpendicular to the X axis is equal to the product of the magnetic field component Bx, defined on this face, by the area of this face
Φ
x, i, j, k = B
x, i, j, k S
x = B
x, i, j, k h
y h
z (h
y, h
z - grid steps along the Y and Z axes,
Figure 1. bottom row).
Similarly, magnetic fluxes are determined through faces perpendicular to the Y and Z axes. The total flux of the magnetic field emerging through the surface limiting the volume of the computational grid cell with numbers
i+1,
j+1,
k+1 (the cell shown in
Figure 1 with the limits of coordinate change (
xi≤
x≤
xi+1, yj≤
y≤
yj+1, zk≤
z≤
zk+1) ) can be found knowing the flows through the faces of this cell; for a scheme that is conservative with respect to the magnetic flux, this value should be equal to zero (with high accuracy):
Φx, i+1, j+1, k+1 - Φx,i, j+1, k+1 + Φy,i+1, j+1, k+1 - Φy, i+1, j, k+1 + Φz,i+1, j+1, k+1 - Φz,i+1, j+1, k = 0
or, substituting the values of magnetic fluxes:
Bx, i+1, j+1, k+1 Sx - Bx,i, j+1, k+1 Sx + By,i+1, j+1, k+1 Sy - By, i+1, j, k+1 Sy + Bz,i+1, j+1, k+1 Sz - Bz,i+1, j+1, k Sz =0
Where Sx Sy Sz are the areas of cell faces perpendicular to the vectors of the selected coordinate system ex ey ez : Sx= hyhz ; Sy=hxhz ; Sz=hxhy
The density of the magnetic flux source in a grid cell is the value of the total magnetic flux divided by the volume of the cell. Dividing the total magnetic flux by the volume of the grid cell V=hxhyhz we get
(Bx, i+1, j+1, k+1 - Bx,i, j+1, k+1 )/hx + (By,i+1, j+1, k+1 - By, i+1, j, k+1)/hy + (Bz,i+1, j+1, k+1 - Bz,i+1, j+1, k)/hz = 0
i.e. finite-difference analog of the magnetic field divergence divB ([divB]) vanishes, as expected
Equality to zero of the total flux of the magnetic field through the cell boundary in a scheme that is conservative with respect to the magnetic flux is achieved by setting the initial magnetic field on the faces of the grid cells with zero total magnetic flux and zero change in the flux with time. The change in the magnetic flux, representing the flux of the vector rot(-
E), which goes through the boundary of the grid cell, will be zero if, in the scheme of the components of the vector rot(-
E), the finite-difference analogs of the derivatives are expressed in terms of the components of the vectors, the electric field
E, specified on the edges of the cells grids, as illustrated in
Figure 2.
Despite the use of special methods, simulation in the real scale of time is possible only with the help of parallel computing. They were carried out by parallel computing threads on graphics cards using CUDA technology.
The main problem of MHD simulation above a real active region is the numerical instabilities that arise near the boundary of the computational region. The developed methods for stabilizing the instability made it possible to solve partially the problem for calculations with relatively low viscosities (Rem= 109, Re= 107), which practically do not suppress the perturbation propagating from the photosphere. The results obtained make it possible to determine ways to further improve the technique for stabilizing numerical instabilities.