Open Access
Issue
A&A
Volume 707, March 2026
Article Number A306
Number of page(s) 10
Section The Sun and the Heliosphere
DOI https://doi.org/10.1051/0004-6361/202558538
Published online 23 March 2026

© The Authors 2026

Licence Creative CommonsOpen Access article, published by EDP Sciences, under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

This article is published in open access under the Subscribe to Open model. This email address is being protected from spambots. You need JavaScript enabled to view it. to support open access publication.

1. Introduction

Through the widely employed techniques of spectroscopy and spectropolarimetry (which rely on the Doppler effect), it is only possible to infer the line-of-sight velocity of solar plasma. For simplicity, we refer to this velocity component, using Cartesian coordinates, as vz at the disk center. However, many interesting phenomena that occur in the solar atmosphere involve the presence of large velocities in the plane perpendicular to the observer’s line of sight. We refer to these as vx and vy components of the velocity field. Some of these phenomena include flows at a sub-granular scale (Steiner et al. 2010), the presence of swirling motions (Bonet et al. 2010), diverging flows from magnetic reconnection events (Thaler & Borrero 2023), and magnetic tornadoes (Wedemeyer-Böhm et al. 2012). Apart from these phenomena, determining horizontal velocities (vx, vy) is extremely important because they can be employed to estimate the flux of magnetic energy and helicity from the photosphere into the corona (Welsch et al. 2007; Fu & Welsch 2014; Kazachenko et al. 2015; Tilipman et al. 2023) as well as to improve the inference of electric currents in the solar atmosphere (Pastor Yabar et al. 2021; Borrero & Pastor Yabar 2023).

The most widely used technique to determine velocities in the solar atmosphere in the plane perpendicular to the line of sight is the local correlation tracking technique (LCT; November & Simon 1988; Simon et al. 1988). This is an optical technique that uses time-resolved monochromatic intensity images, typically at a continuum wavelength where no spectral lines are present. The LCT has been successfully employed to determine motions on the solar surface in a variety of photospheric structures, such as granulation (Simon et al. 1995), pores (Hirzberger et al. 2002), sunspot penumbra (Denker 1998; Sobotka & Sütterlin 2001), sunspot moats (Vargas Domínguez et al. 2008), and vortices (Bonet et al. 2010), among others. Newer techniques include the use of deep learning neural networks (Asensio Ramos et al. 2017) and a local correlation tracking technique based on Fourier analysis (FLCT), which has been applied to time-resolved images of the continuum intensity (Fisher & Welsch 2008) as well as to time-resolved maps of the line-of-sight component of the magnetic field Bz (Welsch et al. 2004; DeForest et al. 2007; Welsch 2015; Kostić et al. 2026).

Assuming that the horizontal velocity inferred using LCT, referred to as uh, is equivalent to real plasma velocities uh = vh (Kusano et al. 2002) or related to them via uh = vh − (vz/Bz)Bh, for example, as proposed by Démoulin & Berger (2003), the vertical component (i.e., z-component) of the induction equation in ideal magnetohydrodynamics (MHD) can be incorporated to determine the full velocity vector v using different techniques (Welsch et al. 2004; Longcope 2004; Schuck 2008). These are referred to as inductive techniques, and they assume that the time derivative of Bz is known (i.e., obtained from a time series of line-of-sight magnetograms).

All the aforementioned methods share a common feature: They all retrieve the full velocity vector1v in a (x, y) plane at a fixed height (or single z height) on the solar atmosphere: v(x, y). In this paper, we present an extension and modification of these methods where all three components of the induction equation are employed, enabling the inference of the horizontal components of the velocity at multiple heights in the solar atmosphere: vh(x, y, z).

This new method presumes that the full magnetic field vector B(x, y, z, t) and the line-of-sight component of the plasma velocity vz(x, y, z, t) are known. Nowadays, these physical parameters can be inferred, both in the photosphere (Borrero et al. 2025) and chromosphere (Kaithakkal et al. 2023), through advanced inversion techniques for the polarized radiative transfer equation (Pastor Yabar et al. 2019; Borrero et al. 2021) when applied to observations of the Stokes vector in photospheric and chromospheric spectral lines as a function of time, I(x, y, λ, t), and carried out with modern spectropolarimeters (Dominguez-Tagle et al. 2022; van Noort et al. 2022).

In this paper, we present the first application of this newly developed method to the two-dimensional velocity and magnetic vector fields, both confined to the (y, z) plane. The description of the method is provided in Sect. 2. In Sect. 3.1 we apply it to analytically prescribed solutions for the velocity and magnetic fields, whereas in Sect. 3.2 we apply it to a two-dimensional MHD simulation of the solar surface. A discussion on the errors in the inference of horizontal velocities in two dimensions is presented in Sect. 4. Finally, we present a summary of our findings in Sect. 5.

2. Numerical method

2.1. General remarks

Our ultimate goal is to infer the horizontal velocities vx, vy (i.e., those perpendicular to the line of sight direction). To this end, we used the induction equation under the assumption of ideal MHD (i.e., zero magnetic diffusion):

B t = × ( v × B ) . Mathematical equation: $$ \begin{aligned} \frac{\partial \mathbf B }{\partial t} = \nabla \times (\mathbf v \times \mathbf B ) \;. \end{aligned} $$(1)

This equation describes how the magnetic field evolves over time in the presence of a velocity field and is satisfied at all times. Therefore, we can specify a particular instant in time, t0:

B t | t 0 = B ˙ ( t 0 ) = × ( v ( t 0 ) × B ( t 0 ) ) . Mathematical equation: $$ \begin{aligned} \frac{\partial \mathbf B }{\partial t}\Bigg |_{t_0} = \dot{\mathbf{B }}(t_0) = \nabla \times \left(\mathbf v (t_0) \times \mathbf B (t_0) \right) \;. \end{aligned} $$(2)

As mentioned in Sect. 1, it is possible to observationally infer B , B ˙ Mathematical equation: $ {\mathbf{B}}, \dot{\mathbf{B}} $ and vz. Hence the solution of this equation will provide the horizontal components (i.e., perpendicular to the line of sight) of the velocity: vx and vy.

2.2. Two-dimensional induction equation in the (y, z) plane

Although the remarks in Sect. 2.1 apply to the general three-dimensional case, the goal of this paper is to first test our method in two dimensions, the (y, z) plane, where the z-direction corresponds to the observer’s line of sight. To this end, we set vx = Bx = 0, and thus the horizontal velocity to be retrieved becomes vy(y, z). Under these assumptions, the two nontrivial components of the induction equation can be written as

B y ˙ = z ( v y B z v z B y ) Mathematical equation: $$ \begin{aligned} \dot{B_y}&= \frac{\partial }{\partial z} (v_{y} B_{z} - v_{z} B_{y}) \end{aligned} $$(3)

B z ˙ = y ( v z B y v y B z ) , Mathematical equation: $$ \begin{aligned} \dot{B_z}&= \frac{\partial }{\partial y} (v_{z} B_{y} - v_{y} B_{z}) , \end{aligned} $$(4)

where for simplicity t0 is not indicated anymore. We further assumed that the Stokes inversion provides By, Bz, B y ˙ Mathematical equation: $ \dot{B_y} $, B z ˙ Mathematical equation: $ \dot{B_z} $, and vz. With this, we obtained an overdetermined system with one unknown, vy, and two equations for each point of the two-dimensional domain.

2.3. Discretization and matrix form

We used the finite differences method with a five-point centered stencil throughout the entire domain to solve the induction equation numerically. With this, the first derivative of a continuous function, f, along direction r at point i can be written as

f r | i = f i 2 8 f i 1 + 8 f i + 1 f i + 2 12 h r , Mathematical equation: $$ \begin{aligned} \frac{\partial f}{\partial r} \bigg |_{i} = \frac{f_{i-2} - 8f_{i-1} + 8f_{i+1} - f_{i+2}}{12h_r} , \end{aligned} $$(5)

where hr is the stencil length along direction r. Applying this stencil to Eqs. (3) and (4), we obtained

B y ˙ ( i , j ) + z ( v z B y ) | i , j = B z ( i , j ) 12 h z v y ( i , j 2 ) 2 B z ( i , j ) 3 h z v y ( i , j 1 ) + B z z | i , j v y ( i , j ) + 2 B z ( i , j ) 3 h z v y ( i , j + 1 ) B z ( i , j ) 12 h z v y ( i , j + 2 ) Mathematical equation: $$ \begin{aligned} \dot{B_y}(i,j) + \frac{\partial }{\partial z}(v_{z}B_{y})\Bigg |_{i,j}&= \frac{B_{z}(i,j)}{12 h_{z}} v_{y}(i,j-2) \nonumber \\&\quad - \frac{2 B_{z}(i,j)}{3 h_{z}} v_{y}(i,j-1) + \frac{\partial B_{z}}{\partial z}\Bigg |_{i,j} v_{y}(i,j) \nonumber \\&\quad + \frac{2 B_{z}(i,j)}{3 h_{z}} v_{y}(i,j+1) -\frac{B_{z}(i,j)}{12 h_{z}} v_{y}(i,j+2)\end{aligned} $$(6)

B z ˙ ( i , j ) y ( v z B y ) | i , j = B z ( i , j ) 12 h y v y ( i 2 , j ) + 2 B z ( i , j ) 3 h y v y ( i 1 , j ) B z y | i , j v y ( i , j ) 2 B z ( i , j ) 3 h y v y ( i + 1 , j ) + B z ( i , j ) 12 h y v y ( i + 2 , j ) , Mathematical equation: $$ \begin{aligned} \dot{B_z}(i,j) - \frac{\partial }{\partial y}(v_{z}B_{y})\Bigg |_{i,j}&= - \frac{B_{z}(i,j)}{12 h_{y}}v_{y}(i-2,j) \nonumber \\&\quad + \frac{2 B_{z}(i,j)}{3 h_{y}} v_{y}(i-1,j) - \frac{\partial B_{z}}{\partial y}\Bigg |_{i,j} v_{y}(i,j) \nonumber \\&\quad - \frac{2 B_{z}(i,j)}{3 h_{y}} v_{y}(i+1,j) + \frac{B_{z}(i,j)}{12 h_{y}} v_{y}(i+2,j), \end{aligned} $$(7)

where B z z | i , j Mathematical equation: $ \frac{\partial B_{z}}{\partial z}\Big|_{i,j} $ and B z y | i , j Mathematical equation: $ \frac{\partial B_{z}}{\partial y}\Big|_{i,j} $ are also evaluated according to Eq. (5). Equations (6) and (7) provide the basis to write an overdetermined linear system of equations where vy(i, j) are the unknown quantities. The coefficients that multiply the unknown vy in the equations above are renamed ai, j or bi, j, depending on whether they appear in the equations pertaining to B y ˙ Mathematical equation: $ \dot{B_y} $ or B z ˙ Mathematical equation: $ \dot{B_z} $, respectively. These coefficients are also given a superscript that refers to the grid point at which the horizontal component of velocity they multiply is evaluated. In addition, the independent coefficients (i.e., those that do not multiply vy) are renamed c i , j a Mathematical equation: $ c^{a}_{i,j} $ and c i , j b Mathematical equation: $ c^{b}_{i,j} $. The superscript a or b indicates whether the independent coefficient appears in the equation for B y ˙ Mathematical equation: $ \dot{B_y} $ or B z ˙ Mathematical equation: $ \dot{B_z} $,. From Equation (6), we defined

a i , j i , j 2 = B z ( i , j ) 12 h z a i , j i , j 1 = 2 B z ( i , j ) 3 h z a i , j i , j = B z z | i , j a i , j i , j + 1 = 2 B z ( i , j ) 3 h z a i , j i , j + 2 = B z ( i , j ) 12 h z c i , j a = B y ˙ ( i , j ) + z ( v z B y ) | i , j . Mathematical equation: $$ \begin{aligned} a_{i,j}^{i,j-2}&= \frac{B_z(i,j)}{12 h_z} \nonumber \\ a_{i,j}^{i,j-1}&= - \frac{2 B_z(i,j)}{3 h_z} \nonumber \\ a_{i,j}^{i,j}&= \frac{\partial B_{z}}{\partial z}\Bigg |_{i,j}\\ a_{i,j}^{i,j+1}&= \frac{2 B_z(i,j)}{3 h_z}\nonumber \\ a_{i,j}^{i,j+2}&= - \frac{B_z(i,j)}{12 h_z} \nonumber \\ c_{i,j}^{a}&= \dot{B_y}(i,j) + \frac{\partial }{\partial z}(v_{z}B_{y})\Bigg |_{i,j}\nonumber . \end{aligned} $$(8)

Likewise, for the bi, j and ci, jb coefficients appearing in Equation (7),

b i , j i 2 , j = B z ( i , j ) 12 h y b i , j i 1 , j = 2 B z ( i , j ) 3 h y b i , j i , j = B z y | i , j b i , j i + 1 , j = 2 B z ( i , j ) 3 h y b i , j i + 2 , j = B z ( i , j ) 12 h y c i , j b = B z ˙ ( i , j ) y ( v z B y ) | i , j . Mathematical equation: $$ \begin{aligned} b_{i,j}^{i-2,j}&= -\frac{B_z(i,j)}{12 h_y} \nonumber \\ b_{i,j}^{i-1,j}&= \frac{2 B_z(i,j)}{3 h_y} \nonumber \\ b_{i,j}^{i,j}&= -\frac{\partial B_{z}}{\partial y}\Bigg |_{i,j}\\ b_{i,j}^{i+1,j}&= -\frac{2 B_z(i,j)}{3 h_y}\nonumber \\ b_{i,j}^{i+2,j}&= \frac{B_z(i,j)}{12 h_y} \nonumber \\ c_{i,j}^{b}&= \dot{B_z}(i,j) - \frac{\partial }{\partial y}(v_{z}B_{y})\Bigg |_{i,j}\nonumber . \end{aligned} $$(9)

With this, Eqs. (6) and (7) become

c i , j a = a i , j i , j 2 · v y ( i , j 2 ) + a i , j i , j 1 · v y ( i , j 1 ) + a i , j i , j · v y ( i , j ) + a i , j i , j + 1 · v y ( i , j + 1 ) + a i , j i , j + 2 · v y ( i , j + 2 ) Mathematical equation: $$ \begin{aligned} c^{a}_{i,j}&= a_{i,j}^{i,j-2} \cdot v_{y}(i,j-2) + a_{i,j}^{i,j-1} \cdot v_{y}(i,j-1) \nonumber \\&\quad + a_{i,j}^{i,j} \cdot v_{y}(i,j) + a_{i,j}^{i,j+1} \cdot v_{y}(i,j+1) \nonumber \\&\quad + a_{i,j}^{i,j+2} \cdot v_{y}(i,j+2)\end{aligned} $$(10)

c i , j b = b i , j i 2 , j · v y ( i 2 , j ) + b i , j i 1 , j · v y ( i 1 , j ) + b i , j i , j · v y ( i , j ) + b i , j i + 1 , j · v y ( i + 1 , j ) + b i , j i + 2 , j · v y ( i + 2 , j ) . Mathematical equation: $$ \begin{aligned} c^{b}_{i,j}&= b_{i,j}^{i-2,j} \cdot v_{y}(i-2,j) + b_{i,j}^{i-1,j} \cdot v_{y}(i-1,j) \nonumber \\&\quad + b_{i,j}^{i,j} \cdot v_{y}(i,j) + b_{i,j}^{i+1,j} \cdot v_{y}(i+1,j) \nonumber \\&\quad + b_{i,j}^{i+2,j} \cdot v_{y}(i+2,j). \end{aligned} $$(11)

In matrix form, the system of equations can be written as A ^ · x = c Mathematical equation: $ \widehat{\mathbf{A}} \cdot \mathbf{x} = \mathbf{c} $, where A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ is constructed from the known coefficients ai, j and bi, j. This matrix has dimensions 2 ⋅ N ⋅ M × N ⋅ M for a domain of N × M grid points. x is the vector of unknowns with dimensions N ⋅ M × 1, while c corresponds to the vector of independent coefficients (ci, ja, ci, jb) with dimensions 2 ⋅ N ⋅ M × 1. In the matrix A ^ Mathematical equation: $ \widehat{\mathbf{A}} $, we will have two rows (one for each available component of the induction equation used) associated with the same unknown vy(i, j). The following piece of pseudo-code can be used to build the A ^ kr Mathematical equation: $ \widehat{A}_{kr} $ elements of A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ as well as the ck elements of the vector c:

1: r = 0

2: for k = 0, 2 ⋅ N ⋅ M − 1, 2 do

▹ Coordinates of the grid point (i, j) are given by

3: i = int(r/M)

4: j = mod(r, M)

 ▹  Elements referring to B y ˙ Mathematical equation: $ \dot{B_y} $ (Eq. 3)

   A ( k , i · M + j 2 ) = a i , j i , j 2 A ( k , i · M + j 1 ) = a i , j i , j 1 A ( k , i · M + j ) = a i , j i , j A ( k , i · M + j + 1 ) = a i , j i , j + 1 A ( k , i · M + j + 2 ) = a i , j i , j + 2 c ( k ) = c i , j a Mathematical equation: $$ \begin{aligned} A(k, i\cdot M + j-2)&= a_{i,j}^{i,j-2} \nonumber \\ A(k, i\cdot M + j-1)&= a_{i,j}^{i,j-1} \nonumber \\ A(k, i\cdot M + j)&= a_{i,j}^{i,j}\\ A(k, i\cdot M + j+1)&= a_{i,j}^{i,j+1} \nonumber \\ A(k, i\cdot M + j+2)&= a_{i,j}^{i,j+2} \nonumber \\ c(k)&= c^{a}_{i,j}\nonumber \end{aligned} $$(12)

 ▹   Elements referring to B z ˙ Mathematical equation: $ \dot{B_z} $ (Eq. 4)

   A ( k + 1 , ( i 2 ) · M + j ) = b i , j i 2 , j A ( k + 1 , ( i 1 ) · M + j ) = b i , j i 1 , j A ( k + 1 , i · M + j ) = b i , j i , j A ( k + 1 , ( i + 1 ) · M + j ) = b i , j i + 1 , j A ( k + 1 , ( i + 2 ) · M + j ) = b i , j i + 2 , j c ( k + 1 ) = c i , j b Mathematical equation: $$ \begin{aligned} A(k+1, (i-2)\cdot M + j)&= b_{i,j}^{i-2,j} \nonumber \\ A(k+1, (i-1)\cdot M + j)&= b_{i,j}^{i-1,j} \nonumber \\ A(k+1, i\cdot M + j)&= b_{i,j}^{i,j}\\ A(k+1, (i+1)\cdot M + j)&= b_{i,j}^{i+1,j}\nonumber \\ A(k+1, (i+2)\cdot M + j)&= b_{i,j}^{i+2,j}\nonumber \\ c(k+1)&= c^{b}_{i,j}\nonumber \end{aligned} $$(13)

5:  r = r + 1

6:end for

where the for-loop indexes refer to the starting value, end value, and step value. An example of the A ^ Mathematical equation: $ {\widehat{\mathbf{A}}} $ matrix for a 10 × 10 domain is shown in Fig. 1. As explained above, for this particular example, A ^ Mathematical equation: $ {\widehat{\mathbf{A}}} $ has a size of 200 × 100 (i.e., 200 equations for 100 unknowns). The color code indicates whether that particular point on the matrix comes from Eq. (3) (red) or Eq. (4) (blue).

Thumbnail: Fig. 1. Refer to the following caption and surrounding text. Fig. 1.

Structure of the matrix of the system A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ for a N × M = 10 × 10 domain defined by k rows and r columns. In red we show the position of the A ^ kr Mathematical equation: $ \widehat{A}_{kr} $ coefficients related to Eq. (3) and in blue those related to Eq. (4).

2.4. Boundary conditions

To define the boundary conditions while maintaining the derivative scheme given by Eq. (5) throughout the entire domain, we introduced “ghost cells” around the boundaries of the domain (see Fig. 2). Although ghost cells are not part of the domain itself, we assumed a certain behavior of the unknown vy function at those points. This behavior implies changes to the elements of the matrix A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ and to the components of the vector c related to the points close to the boundary. Since we used a five-point stencil scheme for the derivatives, the grid points whose coefficients will be modified are those with i = 0, 1, N − 2, N − 1 and/or j = 0, 1, M − 2, M − 1 (see Fig. 2), which refer to grid cells at the corners or sides of the domain, respectively.

Thumbnail: Fig. 2. Refer to the following caption and surrounding text. Fig. 2.

Example of a 2D grid for a 10 × 10 domain. The solution of the system is evaluated in the blue points. These points are called “inner cells”. The boundary condition must be specified in all red points. These are “ghost” or “boundary” cells. The white points in the corners are not used in the scheme considered here. In a different numerical scheme, they may play a role.

How the coefficients A ^ rk Mathematical equation: $ \widehat{A}_{rk} $ of matrix A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ and the ck components of vector c are modified close to the boundary depends on the actual boundary conditions employed. If we assume Dirichlet boundary conditions, we must set the value of vy at the boundary. For example, vy = fD, where fD denotes a fixed value and the subscript D indicates that Dirichlet boundary conditions are being applied. Consequently, the values of vy in the ghost cells are no longer unknowns, and the terms of Eqs. (10) and (11) that involve vy at the ghost cells become independent coefficients. For that reason, we get new c coefficients (referred to as ca, ★ and cb, ★) that can be written as a function of the old coefficients (ca and cb; given by Eqs. (8) and (9)) as

c 0 , 0 a , = c 0 , 0 a a 0 , 0 0 , 2 · f D ( 0 , 2 ) a 0 , 0 0 , 1 · f D ( 0 , 1 ) Mathematical equation: $$ \begin{aligned} c^{a,\star }_{0,0}&= c^{a}_{0,0} - a_{0,0}^{0,-2} \cdot f_{D}(0,-2) - a_{0,0}^{0,-1} \cdot f_{D}(0,-1) \end{aligned} $$(14)

c 0 , 0 b , = c 0 , 0 b b 0 , 0 2 , 0 · f D ( 2 , 0 ) b 0 , 0 1 , 0 · f D ( 1 , 0 ) . Mathematical equation: $$ \begin{aligned} c^{b,\star }_{0,0}&= c^{b}_{0,0} - b_{0,0}^{-2,0} \cdot f_{D}(-2,0) -b_{0,0}^{-1,0} \cdot f_{D}(-1,0). \end{aligned} $$(15)

We note that in the case of Dirichlet boundary conditions, the A ^ rk Mathematical equation: $ \widehat{A}_{rk} $ elements of matrix A ^ Mathematical equation: $ \widehat{\mathbf{{A}}} $, built from ai, j and bi, j according to Eqs. (12) and (13), do not change.

On the other hand, we can assume symmetric boundary conditions by defining f−1 = f0 and f−2 = f1. These boundary conditions also ensure that, at some point in between the domain and the ghost zone, the derivative of vy is zero (Neumann boundary condition). Unlike the case of the Dirichlet boundary conditions, where vy = fD was assumed to be known, Neumann boundary conditions link vy in the ghost cells to the unknown vy inside the domain. For this reason, close to the boundary we must modify the related A ^ rk Mathematical equation: $ \widehat{A}_{rk} $ elements of matrix A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ given by Eqs. (8) and (9). The new coefficients, a and b, derived from this assumption can be written as a function of the old a and b coefficients (given by Eqs. (12) and (13)). Here we provide examples for a corner point and a boundary line:

a 0 , 0 0 , 0 , = a 0 , 0 0 , 0 + a 0 , 0 0 , 1 a 0 , 0 0 , 1 , = a 0 , 0 0 , 1 + a 0 , 0 0 , 2 b 0 , 0 0 , 0 , = b 0 , 0 0 , 0 + b 0 , 0 1 , 0 b 0 , 0 1 , 0 , = b 0 , 0 1 , 0 + b 0 , 0 2 , 0 } if ( i , j ) = ( 0 , 0 ) Mathematical equation: $$ \begin{aligned} \left.\begin{array}{cc} a^{0, 0, \star }_{0,0}&= a^{0, 0}_{0,0} + a_{0,0}^{0,-1} \\ a^{0, 1,\star }_{0,0}&= a^{0, 1}_{0,0} + a_{0,0}^{0,-2} \\ b^{0,0,\star }_{0,0}&= b^{0,0}_{0,0} + b_{0,0}^{-1,0} \\ b^{1,0,\star }_{0,0}&= b^{1, 0}_{0,0} + b_{0,0}^{-2,0} \end{array}\right\} \;\; {\mathrm{if\ (i,j) = (0,0)} } \end{aligned} $$(16)

b 0 , j 0 , j , = b 0 , j 0 , j + b 0 , j 1 , j b 0 , j 1 , j , = b 0 , j 1 , j + b 0 , j 2 , j } if ( i , j ) = ( 0 , j ) Mathematical equation: $$ \begin{aligned} \left.\begin{array}{cc} b^{0,j,\star }_{0,j}&= b^{0,j}_{0,j} + b_{0,j}^{-1,j} \\ b^{1,j,\star }_{0,j}&= b^{1, j}_{0,j} + b_{0,j}^{-2,j} \end{array}\right\} \;\; {\mathrm{if\ (i,j) = (0,j)} } \end{aligned} $$(17)

b 1 , j 0 , j , = b 1 , j 0 , j + b 1 , j 1 , j } if ( i , j ) = ( 1 , j ) , Mathematical equation: $$ \begin{aligned} \left.\begin{array}{cc} b^{0, j, \star }_{1,j}&= b^{0,j}_{1,j} + b_{1,j}^{-1,j} \end{array}\right\} \;\; {\mathrm{if\ (i,j) = (1,j)} } , \end{aligned} $$(18)

where 1 < j < n − 2 in Eqs. (17), (18). Finally, we note that in the case of Neumann boundary conditions, the ck coefficients of c remain the same.

2.5. Solution of the linear system

Having defined the matrix of the system A ^ Mathematical equation: $ \widehat{\mathbf{A}} $, the vector of independent coefficients c, and the boundary conditions, we could then solve the linear system of equations and infer the unknown horizontal velocity field vy(y, z) that is encoded in the vector x. Owing to the fact that we have an overdetermined system with 2 ⋅ N ⋅ M equations and N ⋅ M unknowns, we solved the linear system in a least square sense: x = ( A ^ A ^ ) 1 A ^ c Mathematical equation: $ \mathbf{x} = (\widehat{\mathbf{A}}^\intercal \widehat{\mathbf{A}})^{-1} \widehat{\mathbf{A}}^\intercal \mathbf{c} $, where the “” symbol indicates the transpose of the matrix. The solution of the linear system is found through the well-known LAPACK2 package, in particular the subroutine dgesv that uses LU decomposition for a square matrix.

3. Comparison between analytical and numerical solutions

3.1. Two-dimensional analytical magnetic and velocity fields

We defined a two-dimensional domain in the (y, z) plane. This domain is discretized in N × M = 100 × 100 grid cells. Each grid cell is considered to be squared hy = hz = h with a length of h = 106 cm. In this domain, we prescribe the following components for the magnetic and velocity fields at instant t0:

B y = B 1 exp α λ z Mathematical equation: $$ \begin{aligned} B_{y}&= B_{1} \exp {\frac{\alpha }{\lambda }z} \end{aligned} $$(19)

B z = B 2 exp α λ y Mathematical equation: $$ \begin{aligned} B_{z}&= B_{2} \exp {\frac{\alpha }{\lambda }y} \end{aligned} $$(20)

v y = v 1 cos { 2 π ( M y N z ) NMh } Mathematical equation: $$ \begin{aligned} v_{y}&= v_1 \cos \left\{ \frac{2 \pi (My - Nz)}{NMh}\right\} \ \end{aligned} $$(21)

v z = v 1 M N cos { 2 π ( M y N z ) hNM } + v 2 cos { 2 π y hN } , Mathematical equation: $$ \begin{aligned} v_{z}&= v_1 \frac{M}{N} \cos \left\{ \frac{2 \pi (My - Nz)}{hNM}\right\} + v_2 \cos \left\{ \frac{2 \pi y}{hN}\right\} , \end{aligned} $$(22)

where B1 = 350 Gauss, B2 = 200 Gauss, α = −0.1, λ = 10h, v1 = 105 cm s−1, and v2 = v1/2. We note that since By does not depend on y and Bz does not depend on z, the solenoidal condition for the magnetic field, ∇ ⋅ B = 0, is trivially satisfied. The detailed configuration of the magnetic field prescribed above is presented in Fig. 3.

Thumbnail: Fig. 3. Refer to the following caption and surrounding text. Fig. 3.

Two-dimensional analytical magnetic field. The color map shows the magnitude of the magnetic field ∥B∥. The green arrows show its direction. The color bar is saturated at 400 G to show the lower values of the magnetic field. The maximum value of the magnetic field at the selected region is ≈415 G.

Equations (19)–(22) were then applied to Equations (3)–(4) to find the analytical expressions for B y ˙ Mathematical equation: $ \dot{B_y} $ and B z ˙ Mathematical equation: $ \dot{B_z} $. In the following, we assumed B y ˙ Mathematical equation: $ \dot{B_y} $, B z ˙ Mathematical equation: $ \dot{B_z} $, Bz, By, and vz to be known, leaving the horizontal component of the velocity as the only unknown, which we refer to as v y ( y , z ) Mathematical equation: $ \widetilde{v_y}(y,z) $. To determine v y Mathematical equation: $ \widetilde{v_{y}} $, we employed vanishing Neumann boundary conditions instead of Dirichlet boundary conditions (see Sect. 2.4) because the latter require a knowledge of vy at the boundaries, which in practical applications we do not have. To this end, we employed the expressions in Eqs. (16)–(18) extended to all the points close to the boundary (i.e., i = 0, 1, N − 2, N − 1 and j = 0, 1, M − 2, M − 1 for an N × M domain based on the indexing from Fig. 2).

With this, we applied the approach described in Sect. 2 to retrieve v y ( y , z ) Mathematical equation: $ \widetilde{v_y}(y,z) $, which we then compared with the original vy(y, z) given by Equation (21). Figure 4 shows the analytical velocity field v = (vy, vz) defined through Eq. (21) and Eq. (22) (panel a) and the inferred velocity field v = ( v y , v z ) Mathematical equation: $ \mathbf{\widetilde{v}} = (\widetilde{v_y},v_z) $ (panel b). Although at first glance it seems that both velocities are very similar, in the sense of direction and magnitude, one must bear in mind that these plots do not provide a complete picture because vz is the same in both panels (i.e., it was assumed to be known).

Thumbnail: Fig. 4. Refer to the following caption and surrounding text. Fig. 4.

Velocity field maps in the plane (y, z). Panel (a) shows the velocity field defined analytically: v = (vy, vz) (see Eqs. (21) and (22)), whereas panel (b) provides the inferred velocity field: v = ( v y , v z ) Mathematical equation: $ \widetilde{\mathbf{v}} = (\widetilde{v_y},v_z) $. The modulus of the vectors is encoded in the color of the arrows as indicated in the color bar.

To further investigate the accuracy with which our method can determine the horizontal component of the velocity field in this analytical two-dimensional case, we show in Fig. 5 the relative error of the inferred velocity, defined as ε v y = | v y v y v y | Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} = |\frac{\widetilde{v_{y}} - v_{y}}{v_{y}}| $ (left panel), and the angle formed by the analytical and the inferred velocity fields, defined as ( v , v ) = arccos ( v · v / [ v v ] ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) = \arccos(\mathbf{v} \cdot \widetilde{\mathbf{v}} / [\|\mathbf{v}\| \|\widetilde{\mathbf{v}} \|]) $ (right panel).

Thumbnail: Fig. 5. Refer to the following caption and surrounding text. Fig. 5.

Errors of the inference of v y Mathematical equation: $ \widetilde{v_{y}} $ in the analytical 2D case. The left panel shows the relative error, ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $, of the inferred velocity. The right panel shows the angle between the analytical velocity (v) and the inferred one ( v Mathematical equation: $ {\widetilde{\mathbf{v}}} $). See text for more details. Both plots also indicate the mean and the median of these errors.

As can be seen, the average and median errors, ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $, over the entire domain are less than 1% and 1.5%, respectively. In addition, the angles between the original velocity field and the retrieved one, ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $, are also very small – about 0.5° on average. Over the majority of the domain, the actual retrieval is much better: ε v y 0.01 % Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} \le 0.01\% $.

3.2. CO5BOLD numerical simulation in (y,z)

The analytical test in Sect. 3.1 features relatively simple magnetic and velocity fields (see e.g., Fig. 3). To test our method with a more realistic scenario, in this section we perform a similar test but using magnetic B(t0) and velocity v(t0) fields from a two-dimensional MHD numerical simulation of solar surface magneto-convection obtained from the CO5BOLD code (Freytag et al. 2012). The aforementioned simulation provides us with By(y, z),Bz(y, z),vy(y, z), and vz(y, z) at a fixed time step, t0. In addition, the simulation has vanishing Bx and vx. Details on how the 2D simulation was carried out are provided in Appendix A.

An important point to mention here pertains to the magnetic diffusivity, η. Although CO5BOLD solves the induction equation under ideal MHD, numerical diffusion is unavoidable, and therefore, if we were to take the magnetic and velocity fields at two different time steps, t+ and t, separated by a small Δt = t+ − t and centered around t0, the ideal induction equation would not be satisfied:

B ˙ ( t 0 ) = lim Δ t 0 B ( t + ) B ( t ) 2 Δ t × [ v ( t 0 ) × B ( t 0 ) ] . Mathematical equation: $$ \begin{aligned} \dot{\mathbf{B }}(t_0) = \lim _{\Delta t \rightarrow 0} \frac{\mathbf B (t_{+})-\mathbf B (t_{-})}{2 \Delta t} \ne \nabla \times [\mathbf v (t_0) \times \mathbf B (t_0)]. \end{aligned} $$(23)

For this reason, we do not evaluate the time derivative at t0 from two different snapshots (t+ and t) of the MHD simulation. Instead we determine B ˙ ( t 0 ) Mathematical equation: $ \dot{\mathbf{B}}(t_0) $ directly from v(t0) and B(t0) using the right-hand side of Eq. (2). This ensures that the induction equation in ideal MHD is satisfied. This step can be justified because at this point we are only interested in studying the performance of the method described in Sect. 2 under ideal conditions. We defer the investigation of the effects of numerical or magnetic diffusivity, ηeff (see Appendix A), for a future study, which should also include the effect of having a finite Δt such that the limit in Eq. (23) is only approximately satisfied.

Next, we took a central region of N × M = 100 × 100 grid points from the full domain of the simulation and determined the horizontal component of the velocity vy(y, z) from the known B ˙ Mathematical equation: $ \dot{\mathbf{B}} $, B, vz and by employing vanishing Neumann boundary conditions. Figure 6 illustrates the magnetic field within this region, whereas Fig. 7 compares the original and the retrieved velocity fields. This last figure shows that the inferred velocity field is perceptually identical to the original from the MHD simulation.

Thumbnail: Fig. 6. Refer to the following caption and surrounding text. Fig. 6.

Two-dimensional CO5BOLD simulation magnetic field. The color map shows the magnitude of the magnetic field ∥B∥. The green arrows show its direction. The color bar is saturated at 1500 G to show the lower values of the magnetic field. The maximum value of the magnetic field within the selected region is ≈2245 G.

Thumbnail: Fig. 7. Refer to the following caption and surrounding text. Fig. 7.

Same as Fig. 4 but for the case of the two-dimensional MHD numerical simulation.

A more detailed study of the errors is presented in Fig. 8, where again the error in the inference of vy, ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ and the errors in the inference of the angle of the velocity field, ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $, are presented on the left and right panels, respectively. As can be seen, now the mean and median values of the errors are smaller than in the 2D analytical case (Sect. 3.1).

Thumbnail: Fig. 8. Refer to the following caption and surrounding text. Fig. 8.

Same as Fig. 5 but for the case of the two-dimensional MHD simulation.

4. Discussion

4.1. Errors

In the previous sections, we showed that the method developed in this work retrieves vy(y, z) with a very high accuracy: about 1% mean error in the inference of vy and less than 0.5° in the inference of the orientation of the total velocity field. We have referred to these two quantities as ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ and ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $, respectively.

Interestingly, there are some specific regions where the values of ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ and ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $ are much larger than the mean and median values. For instance, this is the case of the diagonal stripes in Fig. 5 (analytical case), where ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ and ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $ reach values as high as 50% and 5°, respectively. Similar regions of large uncertainties also appear in Fig. 8 for the case of the 2D MHD simulation, albeit with smaller errors than in the analytical case.

To investigate the source of the large uncertainties in these regions, it is convenient to notice that, as per their definitions, ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ will always be larger in those regions where vy → 0, whereas ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $ will be larger in regions where ∥v∥→0. It is also important to note that ∥v∥→0 immediately implies vy → 0, but not the other way around.

With this clarified, we are in a position to assert that in the analytical case (Sect. 3.1), ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ and ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $ are the largest in regions where ∥v∥→0 (see Fig. 4). In the case of the two-dimensional MHD simulation (Sect. 3.2), the regions where the errors are largest do not coincide with locations where ∥v∥→0. We can ascertain this because in the MHD simulations, the minimum velocity is about 1 km s−1 (see color bar in Fig. 7). In the regions where vy → 0, and thus where the velocity is mostly aligned with the z-axis, ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $ instead increases. Also, the fact that the modulus of the velocity in the MHD simulations is never zero implies that the angle between the velocity vector in the MHD simulations and inferred velocity vector, ( v , v ) Mathematical equation: $ \angle(\mathbf{v},\widetilde{\mathbf{v}}) $, does not increase as much as in the analytical example presented in Sect. 3.1.

To showcase how well the horizontal component of the velocity vy is inferred in a way that is independent from the magnitude of vy or ∥v∥, we show in Fig. 9 scatter plots between the real vy and the inferred values of the velocity v y Mathematical equation: $ \widetilde{v_{y}} $. One can see that in the analytical test (left; Sect. 3.1) and the test with MHD simulations (right; Sect. 3.2), the Pearson correlation coefficient (r) is almost 1.0. Furthermore, almost all points of the 2D domain fall almost exactly on top of the perfect retrieval line (i.e., slope one) indicated by the black line.

Thumbnail: Fig. 9. Refer to the following caption and surrounding text. Fig. 9.

Scatter plots of vy and v y Mathematical equation: $ \widetilde{v_{y}} $ for the analytical (left) and MHD numerical simulation (right) cases. The Pearson correlation coefficient is measured in both cases (r). The slope of one line (indicating a perfect retrieval) is displayed as a black line.

4.2. Known degeneracies

Due to the structure of the induction equation, there are theoretically two degeneracies that can affect the retrieval of the velocity vector. First, it is possible to add a gradient of a scalar function, ϕ, to the cross product v × B without affecting B ˙ Mathematical equation: $ \mathbf{\dot{B}} $. Second, only the velocity component perpendicular to the magnetic field contributes to its variation over time.

These two degeneracies suggest that the velocity field inferred using the method presented in this paper may not represent the real velocity of the plasma. This raises the question of how we can ensure that the retrieved velocity is the one we seek.

In two dimensions, neither degeneracy is very relevant. For instance, in the (y, z) plane, we define v and B both perpendicular to the x-axis. Then, v × B is parallel to the unit vector ex. Moreover, if we consider a scalar function, ϕ, whose gradient can be added to the cross product, v × B, then by definition, ∇ϕ is also parallel to ex. However, given that ϕ is only a function of (y, z), it trivially follows that ϕ = ϕ ( y , z ) x e x = 0 Mathematical equation: $ \nabla \phi = \frac{\partial \phi(y,z)}{\partial x} {\mathbf{e}}_{x} = 0 $.

In three dimensions, the two aforementioned degeneracies can potentially play a much more important role. We anticipate being able to retrieve the real plasma velocity field in 3D for two reasons. First, vz is considered to be known (i.e., from the Stokes inversion that measures it from the Doppler effect), and this component of the velocity already includes contributions from the parallel and perpendicular components of the velocity with respect to B. For this reason, the knowledge of vz breaks the degeneracy, and it allows us to retrieve the full velocity field through the induction equation. Second, our method can be generalized to include other MHD constraints, such as mass conservation. These additional constraints could help us obtain the plasma velocity field independently of the term ∇ϕ that can be added to v × B. We will address these topics in more detail in future work.

5. Conclusions and future work

We have developed a new method to infer the velocities perpendicular to the line of sight in the solar atmosphere. This method employs the full induction equation in ideal MHD and assumes that the line-of-sight component of the velocity, vz; the magnetic field, B; and its time derivative, B ˙ Mathematical equation: $ \dot{\mathbf{B}} $, are known as a function of space and time. Nowadays, this can be achieved thanks to novel Stokes inversion techniques applied to data from modern spectropolarimeters (Kaithakkal et al. 2020; Liu et al. 2025).

As a consequence of using the three components of the induction equation, the method also allows retrieval of the full z dependence of the horizontal velocity. This is not possible when employing only the vertical (z direction) component of the induction equation (see, e.g., Longcope 2004).

As a first step, we tested our newly developed method in two-dimensions by first using analytically prescribed functions for the velocity and magnetic fields and secondly by using velocity and magnetic fields from MHD simulations of the solar surface magnetoconvection. In these 2D cases, only two of the components of the induction equation were used. Our results indicate that in an ideal scenario, it is possible to retrieve the horizontal component of the velocity with an average error of about 1%. In regions where the horizontal component of the velocity is very small, uncertainties in the direction and relative error in the magnitude become significantly larger. Overall, Pearson’s correlation coefficient is very close to unity (r ≃ 1) in both of the studied cases. This allows us to conclude that our method can retrieve the velocity correctly.

An important feature of the method presented in this paper is that it can be easily extended to three dimensions by including the third component of the induction equation. Although the discretization of the equations and the construction of the matrix A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ follow the same procedure described in this paper (see Eqs. (12)–(13)), the matrix dimensions increase substantially as the domain expands from two to three dimensions. Specifically, the size of the matrix, A ^ Mathematical equation: $ \widehat{\mathbf{A}} $, changes from 2NM × NM to 3NML × 2NML because the system of equations includes an additional dimension as well as an additional equation with two unknowns (vx, vy) at each point of the domain. Inverting a matrix of this size requires a considerable amount of computational time, but we plan on undertaking this step next. Apart from extending our approach to three dimensions, in the future we hope to investigate the accuracy with which we can infer the horizontal components of the velocity under more realistic scenarios. Namely, we plan to examine the presence of random or systematic errors in the input parameters (vz, B, and B ˙ Mathematical equation: $ \dot{\mathbf{B}} $) given by the Stokes inversion, the effects of having a finite time sampling when determining B ˙ Mathematical equation: $ \dot{\mathbf{B}} $ observationally, and the existence of a finite magnetic diffusion. All of these additional sources of uncertainty will likely overshadow the 1% uncertainty of the idealized scenarios investigated here.

Acknowledgments

The work presented in this paper has been funded by a grant from the Deutsche Forschung Gemeinschaft (DFG): project 538773352. This research has made use of NASA’s Astrophysics Data System. The authors are grateful to Petri Käpylä, Maria Kazachenko, Brian Welsch, and Oskar Steiner for useful discussions on the topic.

References

  1. Asensio Ramos, A., Requerey, I. S., & Vitas, N. 2017, A&A, 604, A11 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  2. Bonet, J. A., Márquez, I., Sánchez Almeida, J., et al. 2010, ApJ, 723, L139 [Google Scholar]
  3. Borrero, J. M., & Pastor Yabar, A. 2023, A&A, 669, A122 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  4. Borrero, J. M., Pastor Yabar, A., & Ruiz Cobo, B. 2021, A&A, 647, A190 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  5. Borrero, J. M., Pastor Yabar, A., Schmassmann, M., et al. 2025, A&A, 699, A149 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  6. Calvo, F. 2018, Ph.D. Thesis, University of Geneva, Switzerland [Google Scholar]
  7. DeForest, C. E., Hagenaar, H. J., Lamb, D. A., Parnell, C. E., & Welsch, B. T. 2007, ApJ, 666, 576 [NASA ADS] [CrossRef] [Google Scholar]
  8. Démoulin, P., & Berger, M. A. 2003, Sol. Phys., 215, 203 [CrossRef] [Google Scholar]
  9. Denker, C. 1998, Sol. Phys., 180, 81 [NASA ADS] [CrossRef] [Google Scholar]
  10. Dominguez-Tagle, C., Collados, M., Lopez, R., et al. 2022, J. Astron. Instrum., 11, 2250014 [NASA ADS] [CrossRef] [Google Scholar]
  11. Fisher, G. H., & Welsch, B. T. 2008, ASP Conf. Ser., 383, 373 [NASA ADS] [Google Scholar]
  12. Freytag, B., Steffen, M., Ludwig, H.-G., et al. 2012, J. Comput. Phys., 231, 919 [Google Scholar]
  13. Fu, Y., & Welsch, B. T. 2014, AGU Fall Meeting Abstracts, 2014, SH41B-4133 [Google Scholar]
  14. Gustafsson, B., Edvardsson, B., Eriksson, K., et al. 2008, A&A, 486, 951 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  15. Harten, A., Lax, P. D., Leer, B. V. 1983, SIAM Rev., 25, 35 [CrossRef] [Google Scholar]
  16. Hirzberger, J., Bonet, J. A., Sobotka, M., Vázquez, M., & Hanslmeier, A. 2002, A&A, 383, 275 [EDP Sciences] [Google Scholar]
  17. Kaithakkal, A. J., Borrero, J. M., Fischer, C. E., Dominguez-Tagle, C., & Collados, M. 2020, A&A, 634, A131 [EDP Sciences] [Google Scholar]
  18. Kaithakkal, A. J., Borrero, J. M., Pastor Yabar, A., & de la Cruz Rodríguez, J. 2023, MNRAS, 521, 3882 [NASA ADS] [CrossRef] [Google Scholar]
  19. Kazachenko, M. D., Fisher, G. H., Welsch, B. T., Liu, Y., & Sun, X. 2015, ApJ, 811, 16 [NASA ADS] [CrossRef] [Google Scholar]
  20. Kostić, T., Milić, I., Rempel, M., et al. 2026, A&A, 705, A44 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  21. Kusano, K., Maeshiro, T., Yokoyama, T., & Sakurai, T. 2002, ApJ, 577, 501 [NASA ADS] [CrossRef] [Google Scholar]
  22. Liu, G., Milić, I., Castellanos Durán, J. S., et al. 2025, A&A, 697, L7 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  23. Longcope, D. W. 2004, ApJ, 612, 1181 [Google Scholar]
  24. Ludwig, H. G., Caffau, E., Steffen, M., et al. 2009, Mem. Soc. Astron. It., 80, 711 [Google Scholar]
  25. November, L. J., & Simon, G. W. 1988, ApJ, 333, 427 [Google Scholar]
  26. Pastor Yabar, A., Borrero, J. M., & Ruiz Cobo, B. 2019, A&A, 629, A24 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  27. Pastor Yabar, A., Borrero, J. M., Quintero Noda, C., & Ruiz Cobo, B. 2021, A&A, 656, L20 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  28. Riva, F., & Steiner, O. 2022, A&A, 660, A115 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  29. Schaffenberger, W., Wedemeyer-Böhm, S., Steiner, O., & Freytag, B. 2005, ESA Spec. Publ., 596, 65.1 [Google Scholar]
  30. Schuck, P. W. 2008, ApJ, 683, 1134 [NASA ADS] [CrossRef] [Google Scholar]
  31. Simon, G. W., Title, A. M., Topka, K. P., et al. 1988, ApJ, 327, 964 [Google Scholar]
  32. Simon, G. W., Title, A. M., & Weiss, N. O. 1995, ApJ, 442, 886 [Google Scholar]
  33. Sobotka, M., & Sütterlin, P. 2001, A&A, 380, 714 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  34. Steffen, M. 2017, Mem. Soc. Astron. It., 88, 22 [NASA ADS] [Google Scholar]
  35. Steiner, O., Franz, M., Bello González, N., et al. 2010, ApJ, 723, L180 [Google Scholar]
  36. Steiner, O., Rajaguru, S. P., Vigeesh, G., et al. 2013, Mem. Soc. Astron. It. Suppl., 24, 100 [Google Scholar]
  37. Thaler, I., & Borrero, J. M. 2023, A&A, 673, A163 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  38. Tilipman, D., Kazachenko, M., Milic, I., et al. 2023, AAS/Solar Phys. Division Meet., 55, 406.03 [Google Scholar]
  39. van Noort, M., Bischoff, J., Kramer, A., Solanki, S. K., & Kiselman, D. 2022, A&A, 668, A149 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  40. Vargas Domínguez, S., Rouppe van der Voort, L., Bonet, J. A., et al. 2008, ApJ, 679, 900 [Google Scholar]
  41. Wedemeyer-Böhm, S., Scullion, E., Steiner, O., et al. 2012, Nature, 486, 505 [Google Scholar]
  42. Welsch, B. T. 2015, PASJ, 67, 18 [Google Scholar]
  43. Welsch, B. T., Fisher, G. H., Abbett, W. P., & Regnier, S. 2004, ApJ, 610, 1148 [NASA ADS] [CrossRef] [Google Scholar]
  44. Welsch, B. T., Abbett, W. P., De Rosa, M. L., et al. 2007, ApJ, 670, 1434 [NASA ADS] [CrossRef] [Google Scholar]

1

Throughout this paper, vector quantities are indicated in bold roman letters, whereas components along each spatial axis are in italics: A = (Ax, Ay, Az). Matrices are represented by the symbol A ^ Mathematical equation: $ \widehat{\mathbf{A}} $, and their elements are referred to as A ^ ij Mathematical equation: $ \widehat{A}_{ij} $

Appendix A: Two-dimensional CO5BOLD simulations

We used the CO5BOLD code (Freytag et al. 2012) in the box-in-a-star setup to create a realistic 2D atmosphere. The code solves the equations of ideal MHD for a fully compressible gas in a Cartesian box using a finite-volume formulation with an approximate Riemann type solver (HLLMHD; Harten et al. 1983; Schaffenberger et al. 2005; Steiner et al. 2013). The constrained transport method used in CO5BOLD ensures the magnetic field divergence free condition (∇ ⋅ B = 0) to machine precision. Although, CO5BOLD solves an ideal MHD induction equation, the effective magnetic diffusivity due to the discretization is found to be around ηeff ≈ 3.0 × 1010 cm2 s−1 for a computational cell width of 10 km and at the bottom of the photosphere (Riva & Steiner 2022). For our model, we used a realistic solar-like equation of state taken from the CIFIST project (Ludwig et al. 2009). The radiative transfer proceeds via a short characteristics scheme as described in Steffen (2017), with gray opacities from the MARCS model atmosphere package (Gustafsson et al. 2008), provided in tabulated form as a function of gas pressure and temperature.

For this work, we selected a snapshot from a 3D magnetoconvection simulation computed using CO5BOLD, which was originally obtained by embedding a homogeneous, vertical field of 50 G magnetic flux density in a relaxed model of convection (model d3gt57g44v50fc from Calvo 2018). We extracted a 2D slice in the (y, z) plane from this snapshot at a location in the x-direction that contains a few kilogauss flux concentrations. The selected computational domain spans 9.6 Mm x 2.8 Mm in the (y, z) plane, with a cell size of 10 km in both spatial directions, of which a smaller domain is selected for our study (see Fig. 6). In CO5BOLD, all the quantities are defined at cell centers, except for the magnetic field components, which are defined at the centers of their corresponding faces. A constant external gravity field with g = 275 m s−2 acts along the z-direction. The top boundary is open for fluid flow and outward radiation, with the density decreasing exponentially in the boundary cells outside the domain. The vertical component of the magnetic field (Bz) is constant across the top boundary, while the transverse component (By) drops to zero at the same location.

The bottom boundary conditions for the magnetic fields are the same as for the top boundary. For the side boundaries, we used periodic boundary conditions, except for the magnetic field in the x coordinate direction. For this direction, the x component of the magnetic field is set to zero, and a constant extrapolation applies to the other two components. We note that even though initially Bx and vx are different from zero, the simulation is advanced for an additional 1000 seconds of solar time, after which Bx and vx become negligible.

The bottom boundary for the thermodynamic quantities is set up in such a way that the in-flowing material carries a constant specific entropy of 1.775 × 109 erg g−1 K−1 resulting in a radiative flux corresponding to an effective temperature (Teff) of ∼5770 K.

All Figures

Thumbnail: Fig. 1. Refer to the following caption and surrounding text. Fig. 1.

Structure of the matrix of the system A ^ Mathematical equation: $ \widehat{\mathbf{A}} $ for a N × M = 10 × 10 domain defined by k rows and r columns. In red we show the position of the A ^ kr Mathematical equation: $ \widehat{A}_{kr} $ coefficients related to Eq. (3) and in blue those related to Eq. (4).

In the text
Thumbnail: Fig. 2. Refer to the following caption and surrounding text. Fig. 2.

Example of a 2D grid for a 10 × 10 domain. The solution of the system is evaluated in the blue points. These points are called “inner cells”. The boundary condition must be specified in all red points. These are “ghost” or “boundary” cells. The white points in the corners are not used in the scheme considered here. In a different numerical scheme, they may play a role.

In the text
Thumbnail: Fig. 3. Refer to the following caption and surrounding text. Fig. 3.

Two-dimensional analytical magnetic field. The color map shows the magnitude of the magnetic field ∥B∥. The green arrows show its direction. The color bar is saturated at 400 G to show the lower values of the magnetic field. The maximum value of the magnetic field at the selected region is ≈415 G.

In the text
Thumbnail: Fig. 4. Refer to the following caption and surrounding text. Fig. 4.

Velocity field maps in the plane (y, z). Panel (a) shows the velocity field defined analytically: v = (vy, vz) (see Eqs. (21) and (22)), whereas panel (b) provides the inferred velocity field: v = ( v y , v z ) Mathematical equation: $ \widetilde{\mathbf{v}} = (\widetilde{v_y},v_z) $. The modulus of the vectors is encoded in the color of the arrows as indicated in the color bar.

In the text
Thumbnail: Fig. 5. Refer to the following caption and surrounding text. Fig. 5.

Errors of the inference of v y Mathematical equation: $ \widetilde{v_{y}} $ in the analytical 2D case. The left panel shows the relative error, ε v y Mathematical equation: $ \varepsilon_{\widetilde{v_{y}}} $, of the inferred velocity. The right panel shows the angle between the analytical velocity (v) and the inferred one ( v Mathematical equation: $ {\widetilde{\mathbf{v}}} $). See text for more details. Both plots also indicate the mean and the median of these errors.

In the text
Thumbnail: Fig. 6. Refer to the following caption and surrounding text. Fig. 6.

Two-dimensional CO5BOLD simulation magnetic field. The color map shows the magnitude of the magnetic field ∥B∥. The green arrows show its direction. The color bar is saturated at 1500 G to show the lower values of the magnetic field. The maximum value of the magnetic field within the selected region is ≈2245 G.

In the text
Thumbnail: Fig. 7. Refer to the following caption and surrounding text. Fig. 7.

Same as Fig. 4 but for the case of the two-dimensional MHD numerical simulation.

In the text
Thumbnail: Fig. 8. Refer to the following caption and surrounding text. Fig. 8.

Same as Fig. 5 but for the case of the two-dimensional MHD simulation.

In the text
Thumbnail: Fig. 9. Refer to the following caption and surrounding text. Fig. 9.

Scatter plots of vy and v y Mathematical equation: $ \widetilde{v_{y}} $ for the analytical (left) and MHD numerical simulation (right) cases. The Pearson correlation coefficient is measured in both cases (r). The slope of one line (indicating a perfect retrieval) is displayed as a black line.

In the text

Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.

Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.

Initial download of the metrics may take a while.