1 Introduction

It is commonly accepted nowadays that collisions of relativistic heavy-ions create a hot and dense fireball matter. Quarks and gluons are in a deconfined state, called a quark–gluon plasma (QGP), for a very short time (\(\sim \) 1 fm/c) after the initial hard parton collisions of nuclei. The hydrodynamic approach has given one of the best descriptions for the QGP matter: especially for estimating the lowest shear viscosity over the entropy ratio, this theoretical framework has shown acceptable consistencies with many experimental results [1,2,3,4,5,6].

Recently it has been shown that in the peripheral AA-collisions such as Pb–Pb at the center of mass energy \( \sqrt{s}=2.76\) TeV and Au–Au at the center of mass energy \(\sqrt{ s }= 200\) GeV a huge magnetic field is created, of the order of eB\(\sim 10^{18}-10^{19}\) G, which is \(10^{13}\) times larger than the strongest steady magnetic field ever realized in the laboratory. It has been claimed that the existence of such strong fields may be important for a variety of new phenomena like the Chiral Magnetic Effect (CME), Chiral Magnetic Wave (CMW), Chiral Electric Separation Effect (CESE), Chiral Hall Separation Effect (CHSE), pressure anisotropy in QGP, influence on the direct and elliptic flow, shift of the critical temperature. A series of reviews and more references can be found in Refs. [7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]. Hence, it will be worth to further investigate the properties of the QGP in the presence of EM fields.

There have been several works which have explored the behavior of the space-time evolution of electromagnetic fields created by the colliding charged beams moving at relativistic speed in z-direction, as a solution of the Maxwell equations [27,28,29,30,31,32,33]. In Refs. [27,28,29,30,31,32], for the sake of simplicity, the classical Ohm law for induced currents in QGP has been suggested. In many studies, it has been assumed that there are no couplings between the electrodynamic and hydrodynamic equations in a QGP medium. Based on this assumption, it has been shown that the electromagnetic field depends only on the impact parameter of the colliding nucleons b, on the center of mass energy \(\sqrt{s}\) and on the electric and chiral magnetic conductivities of the QGP; besides, its decrease with time is much slower than in vacuum. In addition, in several works (see, e.g., Refs. [27,28,29,30,31,32,33]) the electromagnetic field is derived from the Maxwell equations without coupling to the velocity of the fluid, assuming that the latter has negligible influence on the field itself.

According to this point, considering the Bjorken flow four velocity, the electromagnetic response of QGP in a quantum regime has been investigated in Ref. [30], and it has been concluded that the induced electric current in the plasma fireball cannot generate a classical electromagnetic field. In [35] charged dependence of flow coefficients has been discussed, and the effects of the EM field on directed flow has been studied, showing that these effects are negligible. However, we claim that this controversial result has been obtained by imposing the requirement that the velocity of charged particles \(\vec v\) is smaller than the velocity of the expanding plasma \(\vec u\).

Other work obtained a series of preliminary results, by estimating the significance of strong EM fields on the QGP medium [36,37,38,39,40]. In most cases, it has been assumed that the Maxwell equations decouple from the time evolution of the QGP, and then the evolution of the EM fields and their influence on the flow coefficients have been studied. Results have revealed that after collision, the strength of the EM fields decrease. In addition, it was found that the ratio of magnetic pressure over the thermal pressure \(b^2/P\) of the hot in-viscid fluid is negligible. However, the presence of a medium with finite electrical conductivity can substantially delay the decay of the magnetic field [40].

It is obvious that the resulting EM field is a solution of a complicated magneto-hydrodynamic problem [1,2,3,4,5,6]. In fact, the relativistic magneto-hydrodynamic (RMHD) setup is one of the necessary tools in order to describe the hot plasma in the presence of EM fields [41, 42]. For this purpose, one needs a numerical code that solves the equations of (1+3) dimensional relativistic magneto-hydrodynamics (RMHD).

Recently, in Refs. [43,44,45,46], some efforts have been made toward both numerical and analytical approaches aimed to solve the RMHD setup, by considering some constraints, specific of high energy heavy ion collisions. In Ref. [46] the main goal was to obtain an analytical solution for a (1+1) dimensional Bjorken flow within ideal transverse RMHD; these authors have neglected (consistently with their hypothesis) the coupling to Maxwell’s equations and have analytically solved the energy-momentum conservation equations in a perturbation framework.

Another recent work employs a (1+3) dimensional RMHD code [47]: these authors have used the initial conditions according to the solutions obtained from the Maxwell equations in the early time of the collision: there are, however, many uncertainties in the conditions of the pre-equilibrium phase.

In this paper we improve previous research by removing some of the above-mentioned restrictions: in particular we simulate (1 \(+\) 1) dimensional ideal magneto-hydrodynamics in the Bjorken scenario to determine the effect of the magnetic field on the behavior of an inviscid fluid. Here, we consider the combination of non relativistic hydrodynamic equations with Maxwell equations and solve numerically in (1+1) dimensions a set of coupled MHD equations. This improves some previous, analogous, work, where the coupling between Maxwell equations and conservation equations has been neglected or treated perturbatively. For the purpose of numerical calculations, we have supplemented a relatively simple code which incorporates the contribution of a coupled electromagnetic field in (1+1) dimensions. One important novelty is that we use the boundary conditions at late time (\(\tau \rightarrow \infty \)): indeed the late-time dynamics has been governed by ideal hydrodynamics and is known, while the early-time conditions are unknown. In order to check our code, we compare our results with the analytical solutions of Ref. [46]. We find, indeed, that their results can be recovered by the numerical solutions, at least in (1+1)-D transverse evolution.

The paper is organized as follows: in Sect. 2, we introduce the ideal relativistic magneto-hydrodynamic equations in their most general form, considering them in the case of a plasma with infinite electrical conductivity. In the end of this section we restrict the formalism to the case of non-relativistic transverse flow, which will be employed in the subsequent calculations. In Sect. 3 we present our numerical procedure with details in the setup; results obtained with the spatial initial condition are shown in Sect. 4. Finally, we summarize our conclusions and present a possible subsequent outlook in the last section.

2 Ideal transverse MHD setup in (1+1D) expansion

We consider the relativistic magneto-hydrodynamic (RMHD) framework, in order to describe the interaction of matter and electromagnetic fields in quark–gluon plasmas [41, 42]. For the sake of simplicity, we assume an ideal relativistic plasma with massless particles and infinite electrical conductivity. In addition, the fluid is considered to be ultra relativistic, thus implying that the rest mass contributions to the equation of state (EOS) can be neglected, and the pressure is simply proportional to the energy density: \(P = c_s^2\epsilon =\frac{1}{3}\epsilon \) where \(c_s=\sqrt{\frac{1}{3}}\) is the speed of sound. For an ideal fluid with infinite electrical conductivity, the equations of RMHD can be written in the form of the covariant conservation laws,

$$\begin{aligned} d_\mu T^{\mu \nu }= & {} 0, \end{aligned}$$
(1)
$$\begin{aligned} d_\mu F^{\star \mu \nu }= & {} 0, \end{aligned}$$
(2)

where

$$\begin{aligned} T^{\mu \nu }= & {} T_\mathrm{matter}^{\mu \nu }+T_\mathrm{EM}^{\mu \nu },\end{aligned}$$
(3)
$$\begin{aligned} T_\mathrm{matter}^{\mu \nu }= & {} (\epsilon +P)u^\mu u^\nu +Pg^{\mu \nu },\end{aligned}$$
(4)
$$\begin{aligned} T_\mathrm{EM}^{\mu \nu }= & {} b^2u^\mu u^\nu +\frac{1}{2}b^2g^{\mu \nu }-b^\mu b^\nu ,\end{aligned}$$
(5)
$$\begin{aligned} F^{\star \mu \nu }= & {} u^\mu b^\nu -u^\nu b^\mu , \end{aligned}$$
(6)

and

$$\begin{aligned} b^\mu =F^{\star \mu \nu }u_\nu , \ \ (b^{\mu }u_{\mu }=0),\ \ b^2=b^\mu b_\mu . \end{aligned}$$
(7)

Here \( F^{\star \mu \nu }\) is the dual tensor of electromagnetic field. \(\epsilon \) and P are energy density and pressure, respectively. \(b^{\mu }\) is the magnetic field four vector in the local rest-frame of the fluid, which is related in the standard way to the one measured in the lab-frame. In the present paper we assume a fluid with infinite electrical conductivity, so the electric field four vector in the local rest-frame equals zero (\(e^{\mu }=0\)). Besides, the single fluid four velocity \(u_{\mu }\) (\(u_{\mu }u^{\mu }=-1\)) is defined as follows:

$$\begin{aligned} u_\mu =\gamma (1, \vec v),\ \gamma =\frac{1}{\sqrt{1-v^2}}. \end{aligned}$$

In Eqs. (1) and (2) the covariant derivative is given by

$$\begin{aligned} d_\mu A^\nu= & {} \partial _\mu A^\nu +\Gamma ^\nu _{\mu m} A^m , \end{aligned}$$
(8)
$$\begin{aligned} d_p A^{\mu \nu }= & {} \partial _p A^{\mu \nu }+\Gamma ^\mu _{p m} A^{m \nu }+\Gamma ^\nu _{p m} A^{m \mu }, \end{aligned}$$
(9)

where \(\Gamma ^i_{j k}\) are the Christoffel symbols

$$\begin{aligned} \Gamma ^i_{jk}=\frac{1}{2}g^{im}\left( \frac{\partial g_{mj}}{\partial x^k}+\frac{\partial g_{mk}}{\partial x^j}-\frac{\partial g_{jk}}{\partial x^m}\right) \end{aligned}$$
(10)

and \(g_{ij}\) is the metric tensor.

It is more convenient to work with Milne coordinates rather than the standard Cartesian coordinates for a longitudinally boost-invariant flow:

$$\begin{aligned} (\tau , x, y, \eta )= & {} \left( \sqrt{t^2-z^2},x,y,\frac{1}{2}\ln \frac{t+z}{t-z}\right) . \end{aligned}$$
(11)

Here, the metric is given by

$$\begin{aligned} g^{\mu \nu }=\mathrm{diag}(-1, 1, 1, 1/\tau ^2), \ \ \ \ g_{\mu \nu }=\mathrm{diag}(-1, 1, 1, \tau ^2).\nonumber \\ \end{aligned}$$
(12)

Working in Milne coordinates, one can easily obtain the Christoffel symbols: the only non-zero ones being \(\Gamma ^\tau _{\eta \eta }=\tau \) and \(\Gamma ^\eta _{\tau \eta }=1/\tau \). Then four distinct conservation equations can easily be derived from \(d_\mu T^{\mu \nu }=0\) in the Milne coordinate system. They are given by

$$\begin{aligned}&\partial _\tau T^{\tau \tau }+\partial _{x}T^{x \tau }+\partial _{y}T^{y\tau }+ \partial _{\eta }T^{ \eta \tau }+\tau T^{\eta \eta }+\frac{1}{\tau }T^{\tau \tau }=0,\end{aligned}$$
(13)
$$\begin{aligned}&\partial _\tau T^{\tau x}+\partial _{x}T^{x x}+\partial _{y}T^{y x}+\partial _{\eta }T^{\eta x}+ \frac{1}{\tau }T^{\tau x}=0,\end{aligned}$$
(14)
$$\begin{aligned}&\partial _\tau T^{\tau y}+\partial _{x}T^{x y}+\partial _{y}T^{y y}+\partial _{\eta }T^{\eta y}+ \frac{1}{\tau }T^{\tau y}=0,\end{aligned}$$
(15)
$$\begin{aligned}&\partial _\tau T^{\tau \eta }+\partial _{x}T^{x \eta }+\partial _{y}T^{y \eta }+\partial _{\eta }T^{\eta \eta }+ \frac{3}{\tau }T^{\tau \eta }=0 . \end{aligned}$$
(16)

In contrast with the energy-momentum tensor \(T^{\mu \nu }\), the dual electromagnetic tensor \(F^{*\mu \nu }\) is antisymmetric; hence the homogeneous Maxwell equation, \(d_\mu F^{*\mu \nu }=0\), leads to the following equations:

$$\begin{aligned} \partial _x F^{*x\tau }+\partial _y F^{*y\tau }+\partial _\eta F^{*\eta \tau }= & {} 0, \end{aligned}$$
(17)
$$\begin{aligned} \partial _\tau F^{*\tau x}+\partial _y F^{*y x}+\partial _\eta F^{*\eta x}+\frac{1}{\tau }F^{*\tau x}= & {} 0, \end{aligned}$$
(18)
$$\begin{aligned} \partial _\tau F^{*\tau y}+\partial _x F^{*x y}+\partial _\eta F^{*\eta y}+\frac{1}{\tau }F^{*\tau y}= & {} 0, \end{aligned}$$
(19)
$$\begin{aligned} \partial _\tau F^{*\tau \eta }+\partial _x F^{*x\eta }+\partial _y F^{*y \eta }+\frac{1}{\tau }F^{*\tau \eta }= & {} 0. \end{aligned}$$
(20)

In order to simplify the problem, we assume that the magnetic field is perpendicular to the reaction plane, pointing along the y direction in an inviscid fluid with infinite electrical conductivity, following the Bjorken expansion along the z direction and moving, in the transverse plane, only in the x direction. The boost invariance of the Bjorken expansion allows us to restrict the discussion to the \(z=0\) plane, where symmetry reasons impose \(u^z=0\). Then

$$\begin{aligned} u_\mu ={\tilde{\gamma }}(1, u_x, 0, 0),\ b_\mu =(0, 0, b_y, 0),\ e_\mu =(0, 0, 0, 0),\nonumber \\ \end{aligned}$$
(21)

where \({\tilde{\gamma }}=\frac{1}{\sqrt{1-u_x^2}}\), and \(u^\mu b_\mu =0,\ u^\mu u_\mu =-1\) are satisfied.

In our setup, the energy-momentum and dual electromagnetic tensors are given by

$$\begin{aligned} T^{\mu \nu }= & {} \begin{pmatrix} (\epsilon +P+b^2){\tilde{\gamma }}^2-P-\frac{b^2}{2} &{}\quad -(\epsilon +P+b^2){\tilde{\gamma }}^2 u_x &{}\quad 0 &{}\quad 0\\ -(\epsilon +P+b^2){\tilde{\gamma }}^2 u_x &{}\quad (\epsilon +P+b^2){\tilde{\gamma }}^2 u_x^2+P+\frac{b^2}{2} &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad P-\frac{b^2}{2} &{}\quad 0 \\ 0&{}\quad 0 &{}\quad 0&{}\quad \left( P+\frac{b^2}{2}\right) \left( \frac{1}{\tau ^2}\right) \end{pmatrix} ,\end{aligned}$$
(22)
$$\begin{aligned} F^{*\mu \nu }= & {} \begin{pmatrix} 0 &{}\quad 0 &{}\quad -{\tilde{\gamma }} b_y &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad {\tilde{\gamma }} u_x b_y &{}\quad 0\\ {\tilde{\gamma }} b_y &{}\quad -{\tilde{\gamma }} u_x b_y &{}\quad 0 &{}\quad 0 \\ 0&{}\quad 0 &{}\quad 0&{}\quad 0 \end{pmatrix}. \end{aligned}$$
(23)

When Eqs. (22)–(23) are plugged into Eqs. (13)–(20), one obtains the following coupled equations:

$$\begin{aligned}&\partial _\tau \left[ (\epsilon +P+b^2){\tilde{\gamma }}^2-P-\frac{b^2}{2}\right] + \partial _x\left[ -(\epsilon +P+b^2){\tilde{\gamma }}^2 u_x\right] \nonumber \\&\quad +\frac{(\epsilon +P+b^2){\tilde{\gamma }}^2}{\tau }=0, \end{aligned}$$
(24)
$$\begin{aligned}&\partial _\tau \left[ -(\epsilon +P+b^2){\tilde{\gamma }}^2 u_x\right] +\partial _x\left[ (\epsilon +P+b^2){\tilde{\gamma }}^2 u_x^2+P+\frac{b^2}{2}\right] \nonumber \\&\quad -\frac{(\epsilon +P+b^2){\tilde{\gamma }}^2 u_x}{\tau }=0, \end{aligned}$$
(25)
$$\begin{aligned}&\partial _y\left( P-\frac{b^2}{2}\right) =0, \end{aligned}$$
(26)
$$\begin{aligned}&\partial _\eta \left( ( P+\frac{b^2}{2})\left( \frac{1}{\tau ^2}\right) \right) =0, \end{aligned}$$
(27)
$$\begin{aligned}&\partial _y({\tilde{\gamma }} b_y)=0, \end{aligned}$$
(28)
$$\begin{aligned}&\partial _y({\tilde{\gamma }} u_x b_y)=0. \end{aligned}$$
(29)
$$\begin{aligned}&\left[ -{\tilde{\gamma }}\partial _\tau +{\tilde{\gamma }} u_x \partial _x\right] b_y+b_y \left( \partial _x({\tilde{\gamma }} u_x)-\partial _\tau ({\tilde{\gamma }})-\frac{{\tilde{\gamma }}}{\tau }\right) =0. \end{aligned}$$
(30)

In the following, we will assume that the transverse velocity \(u_x\) is non-relativistic, so we will keep only first-order terms in \(u_x\). Since we consider (1+1D) flow, all thermodynamical variables depend only on \(\tau , x\) coordinates. Applying the definition of \(u^2=-1\) one finds that \(u_\mu =(1, u_x, 0, 0)\) and \({\tilde{\gamma }}\rightarrow 1\). Using all the above assumptions the set of equations (24)–(30) reduce to

$$\begin{aligned}&(-\partial _\tau +u_x\partial _x) b_y+\left( \frac{\partial u_x}{\partial x}-\frac{1}{\tau }\right) b_y=0, \end{aligned}$$
(31)
$$\begin{aligned}&-\partial _\tau \epsilon +u_x\partial _x\epsilon +(1+c_s^2)\epsilon \left( \frac{\partial u_x}{\partial x}-\frac{1}{\tau }\right) =0, \end{aligned}$$
(32)
$$\begin{aligned}&-\Big ((1+c_s^2)\epsilon +b^2\Big )\partial _\tau u_x+c_s^2\partial _x \epsilon +b_y \partial _x b_y\nonumber \\&+\left( \frac{c_s^2(1+c_s^2)\epsilon +b^2}{\tau }\right) u_x =0. \end{aligned}$$
(33)

As one expects in ideal MHD, the energy conservation equation (31 does not include the B field.

In the next section we present a numerical method to solve the above coupled equations (31)–(33) simultaneously.

3 Numerical calculation

In this section we will solve the coupled non-relativistic hydrodynamic and Maxwell equations, which are summarized in Eqs. (31)–(33). The solutions of the three coupled differential equations will be obtained by using the numerical method of lines (MOL). This method is a technique for solving partial differential equations (PDE) by discretizing one variable in one of the two dimensions and then by integrating the semi-discrete problem as a system of ordinary differential equations (ODE). Here we discretize the partial derivatives with respect to the space variables and obtain a system of ODEs in the time variable: then the initial value software Mathematica has been used to solve this ODE system. It is necessary that the partial differential equation problem be well posed as an initial value problem in at least one dimension, since these are the conditions for an appropriate use of the employed ODEs integrators.

Hence we discretize the coordinate x with N (N even) uniformly spaced grid points \(x_i=(i-1)h,\ x_{N+1}=\pi ,\ i=1,2, \ldots ,N\) and \(h=\pi /N\). We use a second-order finite difference formula for the first derivative in x. In this configuration \(v_i(\tau )\) indicates \(v(\tau , x_i)\). In Fig. 1, the lines along which the discrete quantities \(v_i(\tau )\) are defined, are shown. Using the second-order difference approximation for the first derivative in x results in

$$\begin{aligned} \frac{\mathrm{d}v_i(\tau )}{\mathrm{d}x}=\frac{-3v_i(\tau )+4v_{i+1}(\tau )-v_{i+2}(\tau )}{2h},\quad i=1,\ldots , N+1.\nonumber \\ \end{aligned}$$
(34)

After substituting the first derivatives with respect to x for the \(v_i(\tau ),\ \epsilon _i(\tau ),\ b_i(\tau )\), in Eqs. (31)–(33) one is left with a set of coupled ODEs: in order to numerically solve these equations the crucial point remains the definition of the boundary conditions.

Fig. 1
figure 1

The geometry of the PDEs in the MOL. The \(v_i(\tau )\) is defined along the lines

3.1 Boundary conditions

In our work we consider the boundary conditions at late time. Indeed the issue under investigation does not allow one to have precise information on the early-time conditions. Also the determination of the proper boundary conditions from analytical solutions of Eqs. (31)–(33) at late time (\(\tau \rightarrow \infty \)) is still very difficult, due to the coupling between conservation and Maxwell equations. Hence we derived such boundary conditions at late time from the analytical solutions of Ref. [46]. These authors have investigated the magneto-hydrodynamics in the presence of an external magnetic field, which follows the power-law decay in proper time and has spatial inhomogeneity characterized by a Gaussian distribution in transverse coordinates. For simplicity they have neglected the coupling of Maxwell’s equations and conservation equations and solved the conservation equations perturbatively and analytically.

In Ref. [46] the profile of the magnetic field has been defined by

$$\begin{aligned} b_y(\tau , x){\hat{y}}=B_c \tau ^{n/2}e^{-x^2/2}{\hat{y}} \end{aligned}$$
(35)

where n is a negative value which governs the decay of magnetic field with increasing time. The Fourier expansion of the above square magnetic field is approximated as

$$\begin{aligned} b_y(\tau , x)^2= & {} B_c^2 \tau ^n(0.28+0.44\cos x\nonumber \\&+\,0.21\cos 2x+0.06\cos 3x+0.01\cos 4x)\nonumber \\ \end{aligned}$$
(36)

and Fig. 2 shows a comparison between the Fourier cosine series and the Gaussian distribution at the late time \(\tau _1=20\) fm.Footnote 1 Due to the oscillatory property of the cosine function, the solutions are valid only in the region \(-\pi<x<\pi \). The spatial width of the magnetic field depends on the impact parameter of the considered peripheral collision. Following the method which has been presented in Ref. [46] one can obtain analytical solutions for transverse velocity \(v(\tau ,x)\) and energy density ratio \(\epsilon (\tau , x)/\epsilon _c\) at the assumed late time [\(\epsilon _c\) is the initial energy density of the medium at time \(\tau _0\)]. They are shown in Figs. 3 and 4, for \(\tau _1=20\) fm and three different values of n; the value \(B_c^2/\epsilon _c=0.1\) has been assumed.

Fig. 2
figure 2

A comparison between the approximated \(B^2\) in Fourier cosine series (dots) and the Gaussian distribution of \(B^2\) (thin line)

Fig. 3
figure 3

Transverse velocity \(v(\tau , x)\) versus x plotted at the late time \(\tau _1=20\) fm with different values of n

Fig. 4
figure 4

Energy density \(\epsilon (\tau , x)/\epsilon _c\) versus x plotted at the late time \(\tau _1=20\) fm with different values of n

Then we consider the following family of equations:

$$\begin{aligned} \frac{\partial \epsilon _i(\tau )}{\partial \tau }= & {} \frac{-3\epsilon _i(\tau )+4\epsilon _{i+1} (\tau )-\epsilon _{i+2}(\tau )}{2h}v_i(\tau )\nonumber \\&+\,\frac{4}{3}\Big [\frac{-3v_i(\tau )+4v_{i+1} (\tau )-v_{i+2}(\tau )}{2h}-\frac{1}{\tau }\Big ]\epsilon _i(\tau ),\nonumber \\ \frac{\partial b_i(\tau )}{\partial \tau }= & {} \frac{-3b_i(\tau )+4b_{i+1}(\tau )-b_{i+2}(\tau )}{2h} v_i(\tau )\nonumber \\&+\,\Big [\frac{-3v_i(\tau )+4v_{i+1}(\tau )-v_{i+2}(\tau )}{2h}-\frac{1}{\tau }\Big ] b_i(\tau ),\nonumber \\ \frac{\partial v_i(\tau )}{\partial \tau }= & {} \Big (\frac{4}{3}\epsilon _i(\tau )+b_i(\tau )^2\Big )^{-1}\nonumber \\&\times \,\Big [\frac{1}{3}\Big (\frac{-3\epsilon _i(\tau )+4\epsilon _{i+1}(\tau )-b_{i+2}(\tau )}{2h}\Big ) \nonumber \\&+\,b_i(\tau )\Big (\frac{-3b_i(\tau )+4b_{i+1}(\tau )-b_{i+2}(\tau )}{2h}\Big )\nonumber \\&+\,\Big (\frac{4}{9} \epsilon _i(\tau )+b_i(\tau )^2\Big )\frac{v_i(\tau )}{\tau }\Big ]. \end{aligned}$$
(37)

These are \(3N+3\) first-order, coupled ODEs with boundary conditions: \(\epsilon _i(\tau _1){\equiv } \epsilon _i(\tau _1,x_i), \ b_i(\tau _1)\equiv b_i(\tau _1,x_i), \ v_i(\tau _1){\equiv } v_i(\tau _1,x_i), i=1,\ldots , N+1\) and \(v_1(\tau )=\ v_{N+1}(\tau )=0\). These functions are obtained from analytical solutions of Ref. [46] and shown in Figs. 2, 3 and 4.

Fig. 5
figure 5

Transverse velocity \(v(\tau , x)\) versus \(\tau \) plotted at \(x=1\) with different values of n. The dashed, solid and dotted curves correspond to \( n=-5/3, -2\) and \(-7/3\), respectively

Fig. 6
figure 6

Transverse velocity \(v(\tau , x)\) versus x plotted at \(\tau =1\) fm with different values of n. The dashed, solid and dotted curves correspond to \(n=-5/3, -2\) and \(-7/3\), respectively

4 Numerical results of MHD

We shall now show the results obtained by numerically solving the above outlined system of equations. To resume the procedure, we recall that with the method of lines we have fixed discrete values for the variable x (\(3N+3\) values) and defined derivatives with respect to x via the second-order difference method; then the original set of equations reduces to a system of \(3N+3\) coupled ordinary differential equations for the quantities \(\epsilon _i(\tau ),\ b_i(\tau ),\ v_i(\tau )\).

The above-mentioned ODEs have been solved by using an ODE solver of Mathematica, with respect to the time variable. The initial boundary conditions for the ODE integrator have been fixed at the late time \(\tau _1=20\) fm and derived from the analytical solutions of Ref. [46].

This procedure allowed us to solve the (R)MHD equations in 1+1 dimensions (Eqs. (31)–(33)) and to obtain the space-time evolution of the magnetic field, the energy density and the velocity of plasma, \(v(\tau , x), \epsilon (\tau , x)\) and \(b(\tau , x)\). Our results for these functions are presented in following figures, where they are plotted versus x at fixed \(\tau \) or versus \(\tau \) at fixed x, for three different values of n ( \(n<-1\)).

Fig. 7
figure 7

Energy density \(\epsilon (\tau , x)/\epsilon _c\) versus x plot at \(\tau _1=1\) fm with different values of n. The dashed, solid and dotted curves correspond to \( n=-5/3, -2\) and \(-7/3\), respectively

Fig. 8
figure 8

Energy density \(\epsilon (\tau , x)/\epsilon _c\) versus \(\tau \) plot at \(x=0\) fm with different values of n. The dashed, solid and dotted curves correspond to \( n=-5/3, -2\) and \(-7/3\), respectively

Figures 5 and 6 show the variation of the fluid velocity in terms of either \(\tau \) or x with different values of n. Figure 5 shows that |v| at fixed x is large at early times end becomes small in late times. This behavior is strikingly evident for the smallest |n| employed here. The transverse velocity v in terms of x at the fixed time \(\tau =1\) fm has been plotted in Fig. 6. v increases from \(x=0\) to a maximum at intermediate x and gradually decrease with x. Besides, one can see that when the |n| increases, the v at fixed \(\tau \) becomes smaller due to the faster decay of the magnetic field.

Fig. 9
figure 9

Magnetic field \(B(\tau , x)\) versus x plot at \(\tau =1\) with different values of n. The dashed, solid and dotted curves correspond to \( n=-5/3, -2\) and \(-7/3\), respectively

Fig. 10
figure 10

Magnetic field \(B(\tau , x)\) versus \(\tau \) plot at \(x=0\) fm with different values of n. The dashed, solid and dotted curves correspond to \( n=-5/3, -2\) and \(-7/3\), respectively

Fig. 11
figure 11

Magnetic field \(B(\tau , x)\) versus x plot at \(\tau =1\) with different values of n. The black curves correspond to coupling of Maxwell’s equations with conservation equations (present work) and the blue curve correspond to the analytical solutions

Figures 7 and 8 show the energy density in terms of x at fixed \(\tau \) or in terms of \(\tau \) at fixed x, for three different values of n ( \(n<-1\)). Figure 7 indicates that \(\epsilon \) grows from \(x=0\) up to some intermediate value of x, where it seems to saturate: the increase is more rapid when \(n>-2\). The behavior of the energy density as a function of \(\tau \) is monotonically decreasing; notice the different scale between Figs. 7 and 8.

Finally, in Figs. 9 and 10 the magnetic field \(b_y(\tau , x)\) is plotted versus x at fixed time (\(\tau =1\)) or in terms of \(\tau \) at fixed x. Figure 9 shows that \(b_y(\tau , x)\) becomes small for large x. Besides, when \(|n|<2\) the magnetic field is quite larger, in the central area, than for the other values of n.

Next we wish to validate our numerical work by comparing it with the approximate analytical calculation of Ref. [46]: as already stated these authors assume an external, time-decreasing magnetic field B with a Gaussian distribution in x.

In Fig. 11. we show the profile of the magnetic field for different values of n, for the fixed time \(\tau =1\): the black curves correspond to our solutions and the blue curves correspond to the approximate analytical solution of Ref. [46], where the magnetic field is considered as the one given in Eq. (35). At \(\tau =1\) obviously the profiles of magnetic field Eq. (35) is independent of the value of n, while in the present work we obtain different results, as already seen in Fig. 9. The case \(n=-2\) corresponds to ideal magneto-hydrodynamics and is referred to as the ”frozen-flux condition”, which stems from the Maxwell equations with conservation of the entropy-density current: in this case the analytical solution coincides with the one obtained in the present calculation. Instead for \(n=-7/3\) the magnetic field decreases by nearly a factor 0.5 and for \(n=-5/3\) it increases by a factor 1.5 relative to case \(n=-2\).

Fig. 12
figure 12

\(B(\tau , x)^2/\epsilon (\tau , x)\) versus \(\tau \) plotted at \(x=0\) with different values of n. The black curves correspond to the analytical solutions of Ref. [46]

Fig. 13
figure 13

Transverse velocity \(v(\tau , x)\) versus x plotted at different times for \(n=-4/5\), a numerical solutions (present work), b analytical solutions of Ref. [46]

Fig. 14
figure 14

\(B^2(\tau , x)/\epsilon (\tau , x)\) versus x plotted at different times for \(n=-4/5\), a numerical solutions (present work), b analytical solutions

Figure 12 shows the ratio \(b(\tau ,0)^2/\epsilon (\tau ,0)\) as a function of \(\tau \) at \(x=0\), for different values of n: it is seen that all the analytical solutions of Ref. [46] (blue lines) converge to the value 0.1 at \(\tau =1\) for any value of n, as expected. Our results, instead, reach the same limit only for the value \(n=2\), while for \(n=-7/3\) (\(n=-5/3\)) the ratio is typically smaller (larger). This shows the effect of the coupling between Maxwell’s and conservation equations. Moreover, for \(n<-1\), the ratio decreases with increasing time: this implies that the energy density of the magnetic field decays much faster than the fluid energy density in relativistic heavy ion collisions.

Finally, in order to show the influence of the MHD equations on the modification of velocity, magnetic field and energy density we consider the specific case \(n=-4/5\), which corresponds to a weaker dependence on time of the magnetic field, Eq. (35). This is illustrated in Figs. 12 and 13, where again we compare our solutions with the approximated analytical ones of Ref. [46]. The latter implies that \(v(\tau , x)=0\) for \(n=-1\); hence one may expect a change in the direction of the transverse velocity.

Figure 13a, b show the transverse velocity results from the numerical solutions of the present work and from the analytical solutions, respectively, at different times, for \(n=-4/5\). From Fig. 13b one finds that the magnitude of the transverse velocity decreases with respect to the proper time \(\tau _0=1\) fm, as expected, and the velocity profile has a similar shape compared with the case \(n<-1\), but the direction becomes negative. In addition (notice the small numbers in the vertical scale) it is nearly zero, since in the approximate analytical solution the fluid velocity is only modified by the spatial gradient of the external magnetic field. On the contrary, Fig. 13a shows that the direction of the fluid velocity is positive and decreases with time, until \(\tau =10\) fm, where the sign changes; moreover, its magnitude is much larger than the analytical solution at early times. As a conclusion we can state that, in the analytical solution, the transverse flow led by a Gaussian magnetic field points outward for \(n<-1\) and inward for \(n>-1\), while the results of the present work, where the MHD equations are solved numerically, for both cases (\(n<-1\) and \(n>-1\)) the transverse flow points outward in early time, though they have opposite direction at late time.

Figure 14a shows the behavior of \(b(\tau , 0)^2/\epsilon (\tau , 0)\) versus x, for different proper times: it decreases with time from the value 2.5 at proper time \(\tau _0=1\) fm to the value 0.6 at the late time \(\tau _1=10\) fm, similarly to the case \( n<-1\) (see Fig. 12). We also plot the analytical solution for \(b(\tau , 0)^2/\epsilon (\tau , 0)\) in Fig. 14b: in this case the considered ratio increases with time from the value \(\tau _0=0.1\) at proper time \(\tau _0=1\) fm to the value 0.6 at the late time \(\tau _1=10\) fm. This again stresses the importance of the coupling between Maxwell’s and the conservation equations.

5 Conclusion and outlook

In this work, we present a numerical method for the solution of coupled non-relativistic hydrodynamic equations and Maxwell’s equations, i.e., non-relativistic magneto-hydrodynamics (MHD), which has recently become of growing interest for the study of relativistic heavy ion collisions. By solving the coupled conservation and Maxwell’s equations, we obtain numerical results for the fluid velocity, the energy density and the magnetic field.

We work in the (1+1D) dimensional MHD model where the transverse magnetic field, fluid velocity, and energy density are considered as a function of one spatial (x) and one temporal (\(\tau \)) variable; besides, the magnetic field points along the orthogonal y direction. In our setup, the medium is boost-invariant along the z direction. It turns out that the transverse velocity is rather small at all times and for different parameterizations of the initial magnetic field: hence we treated the transverse flow in the non-relativistic approximation.

The core of our method is twofold: (1) the adoption of a discretized spatial variable, in terms of which the derivatives are expressed with the method of the second-order finite difference formula, (2) the adoption of suitable boundary conditions for the numerical solution of the resulting system of ordinary differential equations in the time variable.

Although it is well known that during relativistic heavy ion collisions intense magnetic fields are developed, their knowledge in the initial times of the collision, where the QGP has been formed, could not be used here as the desired boundary conditions. Indeed for the purpose of comparing with the results of Ref. [46], it turned out more convenient to introduce initial conditions at a late time and solve numerically the coupled equations inversely in time

We found it appropriate to assume for the late-time quantities (fluid velocity, energy density and magnetic field) the approximate analytical solutions found by the authors of Ref. [46]: in contrast with our approach, these solutions where found by neglecting the back reaction from the internal fields, i.e., the combination of Maxwell equations and conservation equations was discarded. A weak external, magnetic field is adopted, with Gaussian distribution dependence in space and power-law decay dependence in time. For our method these analytical solutions are appropriate for the late-time boundary conditions, since in the final stage of the plasma evolution, the magnetic field is indeed quite small and the back reaction from the internal fields can be safely neglected.

After presenting our results for the fluid velocity, the energy density and the magnetic field as functions of both space and time, we have validated our numerical calculation by making a comparison with the approximate analytical solutions of Ref. [46]. As expected the two approaches give similar results at late times as well as for specific choices of the time evolution of their magnetic field (which is governed by the parameter n), but in other conditions the coupling between Maxwell and conservation (RMHD) equations, here taken into account, appears to be quite relevant.

In particular we notice that the transverse velocities have the same direction in early and late time for the case \(n<-1\) (faster decay of the magnetic field), while for the case \(n>-1\) the transverse velocities appear to change sign in late time. Hence, the transverse flow propagates on the same direction, for any value of n only in the early stages of the collision. It should be noticed, however, that a weak decay of the magnetic field is probably less realistic than a strong one.

According to the estimated conditions of heavy ion collision experiment at RHIC, one find \(b^2/\epsilon =0.17- 0.68\) at \(\tau =0.6 \) fm. As a result, for the validity of the weak-field expansion, in Ref. [46] \(b^2/\epsilon =0.1\) was chosen at the proper time \(\tau _0=1\). We find that only for the case \(n=-2\), \(b^2/\epsilon \) converges to this value at the proper time \(\tau _0=1\). For the case\( n<-2\), \(b^2/\epsilon \) is smaller than 0.1 and decreases when n becomes smaller. For the case \(n>-2\), \(b^2/\epsilon \) is bigger than 0.1 and increases when n becomes larger. For both cases \(n<-1\) and \(n>-1\), \(b(\tau , x)^2/\epsilon (\tau , x)\) decreases with time at fixed x. This is a preliminary result of our approach, which is potentially interesting and deserves further investigation also from experimental point of view.

As a final remark and outlook for future developments we wish to consider the possibility of extending the present calculation to the case of (1+2D) dimensions, taking into account both transverse dimensions. This will also allow one to investigate differences in the azimuthal distribution of the velocities and hence the so-called elliptic flow. It is well known that this is one of the crucial characteristics of the deconfined plasma. At present there is an interesting debate about the influence of the magnetic field on the \(v_2\) coefficient of the elliptic flow (see for example Ref. [48, 49]) and the role of the magnetic field in this connection still deserves additional efforts.