1 Introduction

Magnetic flux ropes are common in the solar system. They are present in the solar corona (e.g. Song et al., 2015), in the solar wind (Shimazu and Marubashi, 2000; Janvier, Démoulin, and Dasso, 2014b,a), and in planetary magnetospheres (Moldwin and Hughes, 1991). The largest and most prominent flux ropes were studied first, and they were called magnetic clouds (Krimigis, Sarris, and Armstrong, 1976; Burlaga et al., 1981; Klein and Burlaga, 1982). Magnetic clouds are large flux ropes ejected from the solar corona and traveling in the solar wind. When interacting with the Earth’s magnetosphere, they may cause severe geomagnetic storms, therefore studying them is important. Magnetic clouds were successfully modeled by force-free magnetic configurations (Goldstein, 1983; Marubashi, 1986; Lepping, Jones, and Burlaga, 1990), namely by an axially symmetric constant-alpha force-free magnetic field configuration in a cylinder with a circular cross section (Burlaga, 1988), the so-called Lundquist solution (Lundquist, 1950). Flux ropes have twisted magnetic field lines and therefore non-zero magnetic helicity, which is a measure of how magnetic field lines are mutually linked (Berger, 1999). Helicity is an important global quantity (Berger, 1984) that is conserved in ideal magnetohydrodynamics and is approximately conserved even during fast local non-ideal processes (e.g. a reconnection). Therefore the helicity of magnetic clouds provides direct information about their solar sources, which makes it important to correctly determine this from solar wind measurements (Pevtsov and Canfield, 2001; Dasso et al., 2003; Leamon et al., 2004). Dasso et al. (2003) calculated the helicity of a particular magnetic cloud using models of a straight cylindrical flux rope with a circular cross section (an ideal cylinder). They concluded that two different force-free models, which fit the observed magnetic field components comparatively well, yielded similar values of helicity and that therefore their determination was robust. There are two field models and one geometry. The question remains how the calculated values of helicity would change in a more general geometry (flux rope shape). This is the aim of this article. We provide a tool for calculating the helicity of flux ropes with various shapes and apply it to two magnetic clouds. We use one field model, but the geometry may vary.

An ideal cylinder is only a crude local geometrical approximation of an interplanetary flux rope because the rope clearly does not have a circular cross section (Mulligan and Russell, 2001; Hidalgo et al., 2002; Hu and Sonnerup, 2002; Vandas, Romashets, and Watari, 2005), nor is it straight (Burlaga, Lepping, and Jones, 1990; Hidalgo and Nieves-Chinchilla, 2012; Janvier, Démoulin, and Dasso, 2013). To account for these deviations, we considered a toroid with an elliptical cross section. In order to calculate its helicity, it is necessary to determine the constant-alpha force-free field inside it. There are two known analytical solutions for limiting cases, that is, a constant-alpha force-free field (i) in a cylindrical flux rope with an elliptical cross section (Vandas and Romashets, 2003) (i.e. the major radius is infinite), and (ii) in an ideal toroid (Tsuji, 1991) (i.e. with a circular cross section and therefore zero oblateness). Cap and Khalil (1989) presented a numerical method to construct an axially symmetric constant-alpha force-free magnetic field in a toroid with an elliptical cross section. To our knowledge, this solution has not been used in solar/space physics research so far. We describe it in the next section, generalize it for an asymmetric cross sections, and in subsequent sections, we calculate the helicities of such flux ropes. Our aim is not only to present the results in a graphical form, but to provide simple analytical formulae that approximate the helicity to the required level of accuracy over a wide range of parameters, that is, for quick calculations of the relevant alpha and the helicity for a given toroidal or cylindrical flux rope.

The magnetic field configurations used here may be considered as generalizations of the Lundquist solution. Even though recent investigations revealed that magnetic fields in interplanetary flux ropes may significantly differ from a constant-alpha force-free field or a force-free field in general (Hu et al., 2014; Hu, Qiu, and Krucker, 2015), we consider a linear force-free field as a suitable zero-order approximation, which proved to be useful in many investigations (Lepping, Jones, and Burlaga, 1990; Marubashi, 1997; Lepping et al., 2003, 2006; Vandas, Romashets, and Geranios, 2015; Lepping, Wu, and Berdichevsky, 2015).

The article is structured as follows. The construction of an axially symmetric constant-alpha force-free magnetic field in a toroid with an elliptical cross section is described in Section 2. Section 3 presents helicity calculations, relative helicities for cylindrical flux ropes, and genuine helicities for toroidal flux ropes. These helicities are interrelated in suitable limits. Using these results, we calculate in Section 4 relative helicities per unit length for two magnetic clouds, assuming their different shapes (cross sections). Finally, Section 5 briefly concludes the article.

2 Construction of Toroidal Flux Ropes with Elliptical Cross Sections

Our aim is to determine an axially symmetric linear force-free field confined in a toroidal flux rope with an elliptical cross section. Such a flux rope is schematically shown in Figure 1, where we also introduce the coordinate systems we used. The figure shows a part of the \(xz\) plane of a Cartesian system \(xyz\) with the origin O. The ellipse in the figure is a cross section of the flux rope with the \(xz\) plane and represents a flux rope boundary. The projection of the body of the flux rope is schematically shown by the dashed lines. The flux rope and its magnetic field are assumed to be axially symmetric with respect to the \(z\) axis. This means that the magnetic field does not depend on the azimuthal angle \(\varphi\), which is also shown in the figure; \(\varphi\) is counted around the \(z\) axis from the \(x\) axis (the displayed elliptical cross section has \(\varphi=0\)). In this way, the \(z\) axis is a rotational axis of the toroid, and the body of the flux rope can be created by rotation of this ellipse around the \(z\) axis. The center of the ellipse with semi-axes \(a\) and \(b\) is shown by the bullet and labeled C, the distance OC is the major radius \(R_{0}\). T is a general point inside the flux rope, and its position (shown by a cross) is described in two coordinate systems. Its cylindrical coordinates are \(r\), \(\varphi\), and \(z\), where \(r\) is its distance from the \(z\) axis, explicitly,

$$\begin{aligned} x =& r \cos \varphi , \end{aligned}$$
(1)
$$\begin{aligned} y = & r \sin \varphi . \end{aligned}$$
(2)

Points with constant \(r\) form the surface of a cylinder with the radius \(r\) and the axis \(z\). We also use toroidally curved cylindrical coordinates, \(\rho\), \(\theta\), and \(\varphi\), which are related to Cartesian coordinates by

$$\begin{aligned} x = & (R_{0}+\rho \cos \theta) \cos \varphi , \end{aligned}$$
(3)
$$\begin{aligned} y = & (R_{0}+\rho \cos \theta) \sin \varphi , \end{aligned}$$
(4)
$$\begin{aligned} z = & \rho \sin \theta . \end{aligned}$$
(5)

This system is shown in Figure 2. The toroidally curved cylindrical coordinates \(\rho\) and \(\theta\) of the point T are shown in Figure 1: \(\rho\) is the CT distance, and CT makes the angle \(\theta\) with the \(x\) axis.

Figure 1
figure 1

Toroidal flux rope with an elliptical cross section and related coordinates, Cartesian (\(x\), \(y\), \(z\)), cylindrical (\(r\), \(\varphi\), \(z\)), and toroidally curved cylindrical (\(\rho\), \(\varphi\), \(\theta\)).

Figure 2
figure 2

Toroidally curved cylindrical system with coordinates \(\rho\), \(\varphi\), and \(\theta\). Contours of \(\rho=\mathrm{const.}\) in the \(xz\) plane are concentric circles, their common center has the distance \(R_{0}\) from the origin O. Contours of \(\theta=\mathrm{const.}\) in the \(xz\) plane are shown by the dashed lines. A particular \(\rho=r_{0}\) would represent the surface of an ideal toroid with the major radius \(R_{0}\), the minor radius \(r_{0}\), and the rotational axis \(z\).

We consider a linear force-free field \(\boldsymbol{B}\) inside the flux rope, so that it satisfies the condition

$$ \nabla \times \boldsymbol{B} = \alpha \boldsymbol{B} , $$
(6)

where \(\alpha\) is a constant (\(\alpha \ne 0\)). An arbitrary \(\boldsymbol{B}\) satisfying Equation 6 is solenoidal because \(\nabla \cdot (\nabla \times \boldsymbol{B})=0\). Cap and Khalil (1989) reported a solution of Equation 6 in cylindrical coordinates for an axially symmetric field (i.e., not depending on \(\varphi\)). In this case, Equation 6 yields

$$\begin{aligned} -\frac{\partial B_{\varphi}}{\partial z} = &\alpha B_{r} , \end{aligned}$$
(7)
$$\begin{aligned} \frac{\partial B_{r}}{\partial z} -\frac{\partial B_{z}}{\partial r} = & \alpha B_{\varphi}, \end{aligned}$$
(8)
$$\begin{aligned} \frac{1}{r} \frac{\partial}{\partial r} (r B_{\varphi}) = &\alpha B_{z} . \end{aligned}$$
(9)

\(B_{r}\) and \(B_{z}\) from the first and third equations are substituted into the second equation, which results in an equation for \(B_{\varphi}\) only,

$$ \frac{\partial}{\partial r} \biggl[\frac{1}{r} \frac{\partial}{\partial r} (r B_{\varphi}) \biggr]+\frac{\partial^{2} B_{\varphi}}{\partial z^{2}} +\alpha^{2} B_{\varphi}= 0 . $$
(10)

This equation is solved by separation of variables. Cap and Khalil (1989) selected two independent solutions of Equation 10, namely

$$\begin{aligned} B_{\varphi} \propto & \cos (k z) J_{1}\bigl(\sqrt{ \alpha^{2}-k^{2}} r\bigr), \end{aligned}$$
(11)
$$\begin{aligned} B_{\varphi} \propto & \cos (k z) Y_{1}\bigl(\sqrt{ \alpha^{2}-k^{2}} r\bigr) , \end{aligned}$$
(12)

where \(k\) is a constant (\(|k|<|\alpha|\)), and \(J_{1}\) and \(Y_{1}\) are the Bessel functions of the first order and the first and second kinds. Because Equation 6 is linear in \(\boldsymbol{B}\), a linear combination of the fields described by Equations 11 and 12 with different \(k\mbox{s}\) and proportional constants is also a solution, therefore Cap and Khalil (1989) presented the solution of Equation 6 in the form

$$\begin{aligned} B_{r} = & \sum _{n=1}^{N} k_{n} \sin k_{n} z \\ & {}\times \Bigl[a_{n} J_{1}\Bigl(\sqrt{ \alpha^{2}-k_{n}^{2}} r\Bigr)+ b_{n} Y_{1}\Bigl(\sqrt{\alpha^{2}-k_{n}^{2}} r\Bigr)\Bigr] , \end{aligned}$$
(13)
$$\begin{aligned} B_{\varphi} = & \sum _{n=1}^{N} \alpha \cos k_{n} z \\ &{} \times \Bigl[a_{n} J_{1}\Bigl(\sqrt{ \alpha^{2}-k_{n}^{2}} r\Bigr)+b_{n} Y_{1}\Bigl(\sqrt{\alpha^{2}-k_{n}^{2}} r\Bigr)\Bigr] , \end{aligned}$$
(14)
$$\begin{aligned} B_{z} = & \sum _{n=1}^{N} \sqrt{ \alpha^{2}-k_{n}^{2}} \cos k_{n} z \\ &{} \times \Bigl[a_{n} J_{0}\Bigl(\sqrt{ \alpha^{2}-k_{n}^{2}} r\Bigr)+ b_{n} Y_{0}\Bigl(\sqrt{\alpha^{2}-k_{n}^{2}} r\Bigr)\Bigr] , \end{aligned}$$
(15)

where \(J_{0}\) and \(Y_{0}\) are the Bessel functions of the zeroth order and the first and second kinds, and \(a_{n}\), \(b_{n}\), and \(k_{n}\) (\(|k_{n}|<|\alpha|\)) are coefficients (constants), \(N\) is their number. Equation 14 for \(B_{\varphi}\) is the linear combination just mentioned, and the remaining components follow from it and Equations 7 and 9. We note that the solution defines only fields that are symmetric with respect to the \(z=0\) plane, because it holds \(B_{r}(r,-z)=-B_{r}(r,z)\), \(B_{\varphi}(r,-z)=B_{\varphi}(r,z)\), and \(B_{z}(r,-z)=B_{z}(r,z)\).

Cap and Khalil (1989) showed that the field described by Equations 13 – 15 may define an axially symmetric magnetic field in a toroid with its rotational axis coinciding with the \(z\) axis when the coefficients \(a_{n}\), \(b_{n}\), and \(k_{n}\) are properly chosen, and they described how to select them. We adjusted their procedure for our purposes.

The coefficients are determined from conditions at the flux rope boundary, namely (i) the boundary is a magnetic surface, and (ii) the axial field at the boundary is zero. The second condition maintains correspondence with the former models because a zero axial field is usually required at the boundary of a magnetic cloud modeled with a cylindrical flux rope with a linear force-free field (Burlaga, 1988; Lepping, Jones, and Burlaga, 1990; Vandas and Romashets, 2003). The axial field of a toroidal flux rope is represented by the \(B_{\varphi}\) component (see Figure 1) because the magnetic axis of the rope is a circle around the \(z\) axis. We therefore require \(B_{\varphi}=0\) at the flux rope boundary.

Magnetic surfaces are surfaces on which magnetic field lines lie, and they define magnetically closed volumes. For axially symmetric linear force-free fields, they are simply determined (Cap and Khalil, 1989; Romashets, Vandas, and Poedts, 2010) by

$$ r B_{\varphi}= \mathrm{const.} $$
(16)

When the constant is zero, it follows that \(B_{\varphi}=0\). This means that the zero constant identifies our flux rope boundary. It is convenient to express Equation 16 for the boundary in a form using \(B_{\varphi}\) from Equation 14 as

$$ \sum _{m=1}^{M} e_{m} F_{m}(\boldsymbol{r},\alpha) = 0 , $$
(17)

where \(\boldsymbol{r}\) is the radius vector of an arbitrary point on the boundary, \(M=2N\) is the total count of \(a_{n}\) and \(b_{n}\),

$$\begin{aligned} e_{m} = & \left \{ \textstyle\begin{array}{l@{\quad}l} a_{m} & m=1,\dots,N \\ b_{m-N} & m=N+1, \dots,2 N \end{array}\displaystyle \right . \end{aligned}$$
(18)
$$\begin{aligned} F_{m} = & \left \{ \textstyle\begin{array}{l@{\quad}l} \alpha r \cos (k_{m} z) J_{1}(\sqrt{\alpha^{2}-k_{m}^{2}} r) & m=1,\dots,N \\ \alpha r \cos (k_{m-N} z) Y_{1}(\sqrt{\alpha^{2}-k_{m-N}^{2}} r) & m=N+1,\dots,2 N \end{array}\displaystyle \right . \end{aligned}$$
(19)

and \(r=\sqrt{x^{2}+y^{2}}\).

Theoretically, Equation 17 must be satisfied for all points at the boundary. Practically, from a numerical point of view, we meet the equation for a set of points at the boundary by selecting unknown parameters \(a_{n}\), \(b_{n}\), \(k_{n}\), and \(\alpha\). Cap and Khalil (1989) suggested to select evenly distributed \(k_{n}\) between 0 and \(\alpha\), and we take

$$ k_{n}=\alpha \bigl[0.01+0.95(n-1)/(N-1)\bigr] \quad n=1,\dots,N . $$
(20)

The set of points is distributed along the perimeter of a flux-rope cross section. The cross section of the flux-rope boundary with the \(xz\) plane is a closed curve (e.g. an ellipse like in Figure 1), which can be described parametrically as \(x=x(\theta)\) and \(z=z(\theta)\), where \(\theta\) is the coordinate of a toroidally curved cylindrical system (see Figure 1). We take a set of \(M\) points \(\boldsymbol{r}_{j}\) \((j=1,\dots,M)\) of the curve, \(\boldsymbol{r}_{j}=[x(\theta_{j}),0,z(\theta_{j})]\) (we call them sample points; e.g., two of them, \(\mbox{S}_{j}\) and \(\mbox{S}_{j+1}\), are shown in Figure 1 by asterisks).

Writing Equation 17 for each sample point, we obtain a set of equations

$$ \sum _{m=1}^{M} F_{jm} e_{m} = 0 \quad j=1,\dots,M , $$
(21)

where \(F_{jm}=F_{m}(\boldsymbol{r}_{j},\alpha)\). It is a set of homogeneous linear equations for \(e_{m}\). The system of linear equations has a non-trivial solution if its determinant is zero, i.e.,

$$ \operatorname{det} (F_{jm}) = 0 . $$
(22)

This equation is satisfied by a selection of \(\alpha\), the last unknown parameter. Equation 22 is a transcendent equation for this parameter, and it is solved by a root-finding procedure. For this root/alpha, Equation 21 is linearly dependent, one is omitted (e.g. for \(j=M\)), and \(e_{1}\) can be arbitrarily set (it determines the level of the field magnitude). Then we have the non-homogeneous system

$$ \sum _{m=2}^{M} F_{jm} e_{m} = -e_{1} F_{j1} \quad j=1, \dots,M-1 , $$
(23)

which yields the rest of the \(e_{m}\) coefficients (i.e. \(a_{n}\) and \(b_{n}\)). The obtained solution is exactly force-free because the condition given by Equation 6 is met for an arbitrary set of coefficients. However, the number of coefficients and their values determine how well the boundary of the resulting flux rope approximates the given boundary.

2.1 Toroidal Flux Ropes of Circular Cross Sections

We started by constructing flux ropes with circular cross sections (i.e. they are ideal toroids with minor radii \(r_{0}\) and major radii \(R_{0}\)). The parametric description of the cross-section boundary is \(x=R_{0}+r_{0} \cos \theta\), \(y=0\), and \(z=r_{0} \sin \theta\). The case is symmetric with respect to the \(z=0\) plane, so Equations 13 – 15 are relevant, and we may restrict the sample points to \(z \ge 0\), i.e. \(\theta\) between \(0^{\circ}\) and \(180^{\circ}\). We took \(N=6\) the same as Cap and Khalil (1989). Alpha (more precisely, its absolute value) is searched for by the bisection method (e.g. Press et al., 2002) from Equation 22. The bisection method relies on the fact that if a function is continuous in an interval and has different signs at its endpoints, then there is a root in the interval. Dividing the interval by half and repeating the sign test, we can limit the root value. There are more roots of Equation 22, and we take the first because the next roots describe multipolar flux ropes or more complex configurations. Figure 3a displays a toroidal flux rope with a circular cross section as a result of the above given procedure (note that the value of \(r_{0}\) is \(r_{0}=a=b\) in the figure).

Figure 3
figure 3

Cross sections with elliptical shapes of toroidal flux ropes with axially symmetric constant-alpha magnetic fields. Panels a – d show four flux ropes with different aspect ratios and/or oblateness. Color contours are the magnetic field magnitude distributions, scaled by \(B_{\max}\), which is the maximum field magnitude inside a respective flux rope. The color scale is common for all panels. The black lines are cross sections of toroidal magnetic surfaces on which the magnetic field lines lie, and they are helically wound. The smallest ovals indicate the location of the magnetic axis. Geometrical centers of the cross sections are marked by the pluses and have coordinates (0,0) in the plots. The positions of the magnetic field magnitude maximum (\(B_{\max}\)) are labeled by the crosses ×. The thick lines represent the flux rope boundaries.

An exact analytical solution for toroidal flux ropes with circular cross sections has also been reported by Tsuji (1991) and described in detail by Vandas and Romashets (2015). Both prescriptions yield practically the same fields, but the current procedure is much easier to implement and is much faster for the numerical evaluations (note that only 12 coefficients are needed for a sufficiently accurate description of the field). Moreover, it holds even for very low aspect ratios (e.g. \(R_{0}/r_{0} \approx 1.1\)) where the Tsuji solution has numerical problems because its series converge only slowly.

Figure 4 shows the dependence of alpha on the aspect ratio for such flux ropes. Variants of this figure can be found in Tsuji (1991) and Vandas and Romashets (2015), but here it is supplemented by an analytic polynomial approximation, which was obtained by trial and error to match the curve following from numerical computations. It reads

$$ |\alpha| r_{0} \approx a_{0} + \mu_{1} (r_{0}/R_{0}) + \mu_{2} (r_{0}/R_{0})^{2} + \mu_{3} (r_{0}/R_{0})^{3} $$
(24)

and can be useful if one needs values of \(\alpha\), e.g. for helicity calculations. The constant \(a_{0}\) is the first root of \(J_{0}\) (\(a_{0} \doteq 2.40483\)). The constants \(\mu_{1}=0.0103\), \(\mu_{2}=0.0896\), and \(\mu_{3}=0.1140\) were found by the least-squares method (Press et al., 2002). The formula can be used for \(R_{0}/r_{0} \ge 1.5\) with an accuracy better than 0.1%.

Figure 4
figure 4

Alpha as a function of the aspect ratio for toroidal flux ropes with circular cross sections (thin solid line), supplemented by the analytic approximation from Equation 24 (thick dashed line). The horizontal dashed line (near the bottom) indicates the \(\alpha\) value for a cylindrical flux rope (given by the Lundquist solution and denoted by \(a_{0}\) here).

2.2 Toroidal Flux Ropes of Elliptical Cross Sections with One Semi-Axis Aligned with the Rotational Axis

The next step is the construction of a toroidal flux rope with an elliptical cross section. The symmetry condition with respect to the \(z=0\) plane, required by Equations 13 – 15, limits the orientation of semi-axes \(a\) and \(b\) of the elliptical cross section: one semi-axis must be radially oriented in the \(z=0\) plane. When this is the minor semi-axis \(b\) (like in Figure 1 or Figures 3b – c), the parametric description is \(x=R_{0}+b \cos \theta\), \(y=0\), and \(z=a \sin \theta\), otherwise (Figure 3d) \(a\) and \(b\) are swapped in these formulae. The coefficients of the solution are found in the same way as has been described for cases with circular cross sections, again with \(N=6\). The procedure works for moderate oblatenesses \(a/b \lesssim 3\).

For higher oblatenesses one needs more coefficients. We can obtain for such cases a set of coefficients solving Equation 21 when \(N\) is low, however. Equation 17 is exactly satisfied at the sample points, but it does not guarantee that \(B_{\varphi}\) is close to zero at other boundary places, which should mean that these places lie on different magnetic surfaces. In addition, the exact solution does not mean that all sample points belong to the same magnetic surface, they may belong to different surfaces, which means that the given boundary is not a closed magnetic surface. Twelve sample points may be satisfactory for simple symmetric cases, but this number cannot be increased much for the current procedure, e.g. doubled, because numerical problems appear. The determinant given by Equation 22 becomes too small or too large, and there are difficulties to obtain an exact solution of a large set of equations with limited numerical accuracy (Press et al., 2002). In these cases, we used the Fourier representation of Equation 17. The functions \(F_{m}(\boldsymbol{r},\alpha)\) with \(\boldsymbol{r}=\boldsymbol{r}(\theta)\) are periodic functions of \(\theta\) and can be expressed by their Fourier series. Then we can derive from Equation 17 a series of equations by multiplying Equation 17 by \(\cos l \theta\) or \(\sin l \theta\) and integrating it over \(\theta\), that is,

$$\begin{aligned} & \sum _{m=1}^{M} e_{m} \int _{0}^{2 \pi} F_{m}\bigl[\boldsymbol{r}(\theta), \alpha\bigr] \cos l \theta \, \mathrm{d}\theta = 0 \quad l=0,\dots,N-1 , \end{aligned}$$
(25)
$$\begin{aligned} & \sum _{m=1}^{M} e_{m} \int _{0}^{2 \pi} F_{m}\bigl[\boldsymbol{r}(\theta), \alpha\bigr] \sin l \theta \, \mathrm{d}\theta = 0 \quad l=1,\dots,N . \end{aligned}$$
(26)

This set of equations is formally the same as Equation 21, but with a different \(F_{jm}\), which now is

$$ F_{jm} = \left \{ \textstyle\begin{array}{l@{\quad}l} \int_{0}^{2 \pi} F_{m}[\boldsymbol{r}(\theta), \alpha] \sin j \theta \, \mathrm{d}\theta & j=1,\dots,N, \\ \int_{0}^{2 \pi} F_{m}[\boldsymbol{r}(\theta), \alpha] \cos (j-N-1) \theta \, \mathrm{d}\theta & j=N+1,\dots,2 N. \end{array}\displaystyle \right . $$
(27)

The coefficients are determined in the same way as described earlier. These modified equations proved to be more robust than the original equations and enable us to treat flux ropes of higher oblateness (or with asymmetric cross sections, see below Section 2.3). We used the modified method for the flux ropes displayed in Figures 3b – d (with \(N=6\)). Calculations with the modified method are slightly slower than the original calculations (assuming both methods are applicable) because they involve additional numerical integrations.

It must be noted that the Tsuji solution is not limited to circular cross sections. Only its coefficients can be evaluated analytically when flux ropes have circular cross sections. For elliptical cross sections, the coefficients may be determined numerically using sample points via procedures described above (as Tsuji noted in his work, but did not apply). We tested this approach and obtained essentially the same results as with the procedure adopted here. We conclude, however, that the current approach is much easier to implement and the involved numerical calculations are much faster.

Figure 5 compares magnetic field magnitude profiles of the three toroidal flux ropes shown in Figures 3a – 3c. The field profiles of the toroidal flux ropes with oblate cross sections are flatter than the profiles of a flux rope with a circular cross section, as has been observed for oblate cylindrical flux ropes (Vandas, Romashets, and Watari, 2005). For the same aspect ratio \(R_{0}/b\), a toroidal flux rope with an oblate cross section has its field maximum shifted toward the toroid’s hole more than that with a circular cross section. This shift increases with decreasing aspect ratios, similarly as has been found for toroidal flux ropes with circular cross sections (Tsuji, 1991).

Figure 5
figure 5

Profiles of magnetic field magnitudes along the \(x\) axes of the toroidal flux ropes displayed in Figures 3a (solid line), 3b (dashed line), and 3c (dash-dotted line).

2.3 Toroidal Flux Ropes of Elliptical Cross Sections with One Semi-Axis Inclined to the Rotational Axis

An example of such a toroidal flux rope is shown in Figure 6. These flux ropes are not symmetric with respect to the plane \(z=0\), and Equations 13 – 15 need to be generalized. There are two other independent solutions of Equation 10, namely

$$\begin{aligned} B_{\varphi} \propto & \sin (k z) J_{1}\bigl(\sqrt{ \alpha^{2}-k^{2}} r\bigr), \end{aligned}$$
(28)
$$\begin{aligned} B_{\varphi} \propto & \sin (k z) Y_{1}\bigl(\sqrt{ \alpha^{2}-k^{2}} r\bigr) . \end{aligned}$$
(29)

When these solutions are included into \(B_{\varphi}\), instead of Equations 13 – 15, we obtain

$$\begin{aligned} B_{r} = & \sum _{n=1}^{N} k_{n} \Bigl[(a_{n} \sin k_{n} z-c_{n} \cos k_{n} z) J_{1}\Bigl(r \sqrt{\alpha^{2}-k_{n}^{2}} \Bigr) \\ &{} + (b_{n} \sin k_{n} z-d_{n} \cos k_{n} z) Y_{1}\Bigl(r \sqrt{\alpha^{2}-k_{n}^{2}} \Bigr)\Bigr] , \end{aligned}$$
(30)
$$\begin{aligned} B_{\varphi} = & \sum _{n=1}^{N} \alpha \Bigl[(a_{n} \cos k_{n} z+c_{n} \sin k_{n} z) J_{1}\Bigl(r \sqrt{\alpha^{2}-k_{n}^{2}} \Bigr) \\ & {}+(b_{n} \cos k_{n} z+d_{n} \sin k_{n} z) Y_{1}\Bigl(r \sqrt{\alpha^{2}-k_{n}^{2}} \Bigr)\Bigr] , \end{aligned}$$
(31)
$$\begin{aligned} B_{z} = & \sum _{n=1}^{N} \sqrt{ \alpha^{2}-k_{n}^{2}} \Bigl[(a_{n} \cos k_{n} z+c_{n} \sin k_{n} z) J_{0} \Bigl(r \sqrt{\alpha^{2}-k_{n}^{2}}\Bigr) \\ & {}+(b_{n} \cos k_{n} z+d_{n} \sin k_{n} z) Y_{0}\Bigl(r \sqrt{\alpha^{2}-k_{n}^{2}} \Bigr)\Bigr] \end{aligned}$$
(32)

where \(c_{n}\) and \(d_{n}\) are additional coefficients. When they are zero, the field reduces to the former field determined by Equations 13 – 15.

Figure 6
figure 6

Toroidal flux rope with an elliptical cross section that is inclined with respect to the rotational axis \(z\) by the angle \(\phi_{0}\).

To find coefficients for a toroidal flux rope with a given shape of its cross section (which can be an inclined ellipse or an asymmetric shape), we proceeded in the same way as has been described in previous sections. Now we have \(M=4N\) in Equation 21, where \(e_{m}\) stands for all \(a_{n}\), \(b_{n}\), \(c_{n}\), and \(d_{n}\). The functions \(F_{jm}\) are determined from Equation 31. Because the number of coefficients is relatively large even for \(N=6\), the modified (Fourier) method was used to determine the coefficients. Sample points must cover the full range of \(\theta\), from \(0^{\circ}\) to \(360^{\circ}\).

Figure 7 shows a toroidal flux rope with its elliptical cross section inclined from the vertical direction. It was obtained by the modified method with \(N=6\). The inclination angle is denoted by \(\phi_{0}\) and it is the angle between the major semi-axis and the \(z\) axis (see Figure 6). In this nomenclature, the flux ropes in Figures 3b and 3c have \(\phi_{0}=0^{\circ}\), while it is \(\phi_{0}=90^{\circ}\) for Figure 3d. A general case has the parameterization \(x=R_{0}+b \cos \phi_{0} \cos \theta-a \sin \phi_{0} \sin \theta\), \(y=0\), and \(z=b \sin \phi_{0} \cos \theta+a \cos \phi_{0} \sin \theta\).

Figure 7
figure 7

Cross section of a toroidal flux rope with an elliptical shape and the major semi-axis inclined to the (rotational) axis \(z\) by \(\phi_{0}=30^{\circ}\). The format is the same as in the panels of Figure 3.

3 Helicity of Flux Ropes with Elliptical Cross Sections

The helicity of a magnetically closed body is defined by

$$ H = \int _{V} \boldsymbol{A} \cdot \boldsymbol{B} \, \mathrm{d}V , $$
(33)

where the integration is over the body volume \(V\), and \(\boldsymbol{A}\) is the magnetic vector potential of the field \(\boldsymbol{B}\), \(\nabla \times \boldsymbol{A} = \boldsymbol{B}\). When the field is a constant-alpha field, we may set \(\boldsymbol{A} = \boldsymbol{B}/\alpha\).

Vandas and Romashets (2015) calculated helicities of toroidal magnetic flux ropes with linear force-free fields and circular cross sections. The helicity depends on the magnetic field strength and the size of the flux rope. In order to compare helicities of different flux ropes, a dimensionless quantity \(h\) was introduced,

$$ h = \frac{H}{(B_{\max}^{2}/\alpha) V} , $$
(34)

which we may call a specific helicity. It was shown than in the limit of high aspect ratios,

$$ h \rightarrow h_{L} \equiv 2 J_{1}^{2}(a_{0}) , $$
(35)

where the value \(h_{L}\) is the (relative) specific helicity (see the next section) of a cylindrical flux rope with a circular cross section and the Lundquist field. We expect a similar behavior for toroidal flux ropes with elliptical cross sections, therefore we start with calculations of relative helicity for cylindrical flux ropes with elliptical cross sections, for which the field is known analytically.

3.1 Relative Helicity of a Cylindrical Flux Rope with an Elliptical Cross Section

Cylindrical flux ropes are not closed and their helicity is infinite. We can calculate this quantity for a part of the rope (a finite cylinder) and divide it by its length (height) to obtain a helicity per unit length. However, this new quantity is not gauge-invariant because the boundary of a cylindrical part of the flux rope is not a magnetic surface. Berger and Field (1984) have introduced another quantity, the relative helicity, which is calculated according to

$$ H_{r} = \int _{V} \bigl(\boldsymbol{A} \cdot \boldsymbol{B} - \boldsymbol{A}^{\mathrm{ref}} \cdot \boldsymbol{B}^{\mathrm{ref}}\bigr) \, \mathrm{d}V , $$
(36)

where the integration is over the volume \(V\) of the selected part of the flux rope, and \(\boldsymbol{A}\) and \(\boldsymbol{A}^{\mathrm{ref}}\) are the magnetic vector potentials of the respective magnetic fields. The relative helicity is defined as a difference between the helicity proper and the helicity of a reference field \(\boldsymbol{B}^{\mathrm{ref}}\). Berger and Field (1984) have shown that it is gauge-invariant when the reference field satisfies

$$ \boldsymbol{n} \cdot \boldsymbol{B}^{\mathrm{ref}} = \boldsymbol{n} \cdot \boldsymbol{B} $$
(37)

(the normal components \(B_{n}\) of the original and reference field are the same at the boundary) and

$$ \boldsymbol{n} \times \boldsymbol{A}^{\mathrm{ref}} = \boldsymbol{n} \times \boldsymbol{A} $$
(38)

at the whole boundary of the volume \(V\), \(\boldsymbol{n}\) is a unit normal vector to the boundary.

So the relative helicity is gauge-invariant, but it depends on the reference field. We pursue the specification of the reference field given by Dasso et al. (2003), but modify it for flux ropes with elliptical cross sections. Dasso et al. (2003) calculated the relative helicity per unit length for cylindrical flux ropes with a circular cross section and the field \(\boldsymbol{B} = [0,B_{\varphi}(r),B_{z}(r)]\) (in cylindrical coordinates). They used a cylindrical part of the flux rope with the length \(L\) for the volume \(V\) and set the reference field to \(\boldsymbol{B}^{\mathrm{ref}} = [0,0,B_{z}(r)]\) (in cylindrical coordinates).

The solution of a linear force-free magnetic field inside a cylindrical flux rope with an elliptical cross section is given by Vandas and Romashets (2003). It is expressed in elliptical cylindrical coordinates \(u\), \(v\), and \(z\),

$$\begin{aligned} x = & c \cosh u \cos v , \end{aligned}$$
(39)
$$\begin{aligned} y = & c \sinh u \sin v , \end{aligned}$$
(40)

which are firmly related to the elliptical flux-rope cross section via the parameter \(c=\sqrt{a^{2}-b^{2}}\), where \(a\) and \(b\) are the major and minor semi-axes of the elliptical cross section, respectively. Figure 8 elucidates the elliptical cylindrical coordinate system and how the flux rope is situated in it. Every \(u=\mathrm{const.}\) in the elliptical cylindrical system is a surface of an elliptical cylinder, and the boundary of our cylindrical flux rope is determined by \(u=u_{0}\) with \(\cosh u_{0}=a/c\). So our flux rope is defined by coordinates \(u \in \langle 0,u_{0}\rangle \), \(v \in \langle 0,2 \pi )\), and \(z \in (-\infty,\infty )\).

Figure 8
figure 8

Elliptical cylindrical system \(u\), \(v\), and \(z\) (the \(z\)-axis is perpendicular to the displayed plane \(xy\)), its relation to the Cartesian system, and the position of an elliptical cross section of an oblate cylindrical flux rope. The boundary of the cross section is stressed by the thick line and it is an ellipse with \(u=u_{0}\) and semi-axes \(a\) and \(b\). The foci of this ellipse are shown as two bullets at the \(x\)-axis with \(x=\pm c\).

Symbolically, we write for the field

$$ \boldsymbol{B}=\bigl[B_{u}(u,v),B_{v}(u,v),B_{z}(u,v) \bigr] $$
(41)

(all vector components in this paragraph are given in elliptical cylindrical coordinates), and its vector potential

$$ \boldsymbol{A}=\boldsymbol{B}/\alpha=\bigl[A_{u}(u,v),A_{v}(u,v),A_{z}(u,v) \bigr] . $$
(42)

Similarly to Dasso et al. (2003), the reference field is set to

$$ \boldsymbol{B}^{\mathrm{ref}} = \bigl[0,0,B_{z}(u,v) \bigr] . $$
(43)

It satisfies the condition given by Equation 37 at the cylinder surface: it is \(B_{n}=B_{z}\) at the top and at the bottom for both fields, and \(B_{n}=0\) at the side because the side is a magnetic surface. We take

$$ \boldsymbol{A}^{\mathrm{ref}} = \bigl[A_{u}(u,v),A_{v}(u,v),0 \bigr] . $$
(44)

It holds \(\nabla \times \boldsymbol{A}^{\mathrm{ref}} = \boldsymbol{B}^{\mathrm{ref}}\). The condition given by Equation 38 is satisfied at the top and at the bottom where \(\boldsymbol{n}=(0,0,\pm 1)\). At the side with \(\boldsymbol{n}=(1,0,0)\) we obtain

$$ \boldsymbol{n} \times \bigl(\boldsymbol{A}^{\mathrm{ref}}-\boldsymbol{A}\bigr) = (0,B_{z}/\alpha,0) = \mathbf{0} $$
(45)

because the axial field is zero at the (lateral) boundary of the flux rope (it is the property of the field solution, see Vandas and Romashets, 2003). The relative helicity per unit length is

$$ H^{l}_{r} = \frac{H_{r}}{L} = \frac{1}{\alpha} \int _{0}^{u_{0}} \int _{0}^{2 \pi} \boldsymbol{B} \cdot \boldsymbol{B} h_{u} h_{v} \, \mathrm{d}v \,\mathrm{d}u = \frac{2}{\alpha} \int _{0}^{u_{0}} \int _{0}^{2 \pi} \bigl(B_{u}^{2}+B_{v}^{2} \bigr) h_{u}^{2} \, \mathrm{d}v\, \mathrm{d}u , $$
(46)

where \(B_{z}\) was replaced by \(B_{u}\) and \(B_{v}\) in the last integrand, using integration per partes and the facts that the flux rope has a linear force-free field and zero axial field at its boundary. The integration is over the volume (see Equation 36), which reduces to an integration over a cross section multiplied by \(L\) (because there is no dependence on \(z\)). The Lamé coefficients are \(h_{u} = h_{v} = c \sqrt{\cosh^{2} u-\cos^{2} v}\).

In the limiting case of a circular cross section, that is, when \(c \rightarrow 0\), elliptical cylindrical coordinates tend to cylindrical ones, \(u\) is replaced by \(r\), \(v\) by \(\varphi\), and the field approaches the Lundquist field, \(B_{r}=0\), \(B_{\varphi}=B_{0} J_{1}(\alpha r)\), and \(B_{z}=B_{0} J_{0}(\alpha r)\); \(B_{0}\) is a constant. We obtain for the relative helicity per unit length

$$ H^{l}_{r} \rightarrow \frac{4 \pi}{\alpha} \int _{0}^{r_{0}} B_{\varphi}^{2} r \, \mathrm{d}r = \frac{2 B_{0}^{2} \pi r_{0}^{3}}{a_{0}} J^{2}_{1}(a_{0}) \operatorname{sign}(\alpha) , $$
(47)

where \(r_{0}\) is the flux rope radius (\(r_{0} = a = b = a_{0}/|\alpha|\)), and \(\mathrm{sign}\) is the signum function [cf. Dasso et al. (2003), Equations 2 and 5; Vandas and Romashets (2015), Equation 39].

Figure 9 shows the change in alpha with oblateness of cylindrical flux ropes. It decreases from the value given by the Lundquist solution \(|\alpha| b = |\alpha| r_{0} = a_{0}\). An analytic polynomial approximation was found by trial and error and is given by the relationship

$$ |\alpha| b \approx a_{0} + \gamma_{1} \varepsilon + \gamma_{2} \varepsilon^{2} \quad 1 \le a/b \le 7 $$
(48)

with \(\gamma_{1}=-1.234\) and \(\gamma_{2}=0.407\), which were determined by the least-squares method. The symbol \(\varepsilon=(a-b)/a\) stands for oblateness. The approximation matches the numerically determined dependence very well (the difference is smaller than 0.1%).

Figure 9
figure 9

Dependence of alpha on the oblateness of cross sections for cylindrical flux ropes (solid line). The thick dashed line is an analytic approximation. The dashed horizontal line indicates the alpha of a cylindrical flux rope with the Lundquist solution (which has a circular cross section).

We numerically calculated the relative helicity \(H^{l}_{r}\) for a set of oblatenesses using Equation 46 with formulae for \(B_{u}\) and \(B_{v}\) taken from Vandas and Romashets (2003). Our aim was to find an analytic approximation for it, similarly as we did for \(\alpha\) in Figure 9. We worked with the specific helicity, namely its modification related to the relative helicity. In accord with Equation 34, we define the relative specific helicity

$$ h_{r} = \frac{H^{l}_{r} L}{(B_{\max}^{2}/\alpha) V} = \frac{H^{l}_{r}}{(B_{\max}^{2}/\alpha) \pi a b} . $$
(49)

For a cylindrical flux rope with a circular cross section, this quantity tends to

$$ h_{r} \rightarrow h_{L} , $$
(50)

which follows from the relation given by Equation 47 and the limits \(B_{\max} \rightarrow B_{0}\), \(a \rightarrow r_{0}\), \(b \rightarrow r_{0}\), and \(|\alpha| \rightarrow a_{0}/r_{0}\).

Figure 10 shows the relative specific helicity as a function of oblateness for cylindrical flux ropes with elliptical cross sections. We approximate it by a polynomial in oblateness. From Figure 10a we see that the relative specific helicity and its derivative are \(h_{L}\) and zero, respectively, at \(\varepsilon=0\). So we set

$$ h_{r} \approx h_{L} \bigl(1 + \delta_{2} \varepsilon^{2} + \delta_{3} \varepsilon^{3} + \delta_{4} \varepsilon^{4}\bigr) \quad 1 \le a/b \le 7 , $$
(51)

where the constants \(\delta_{2}=-0.315\), \(\delta_{3}=0.543\), and \(\delta_{4}=-0.950\) were found by the least-squares method. The approximation fits very well (the difference between the numerically determined and approximated values is smaller than 0.3%).

Figure 10
figure 10

Dependence of relative specific helicities for cylindrical flux ropes with elliptical cross sections on oblateness is shown by the solid line. The thick dashed lines are their analytic approximation. The profiles are shown for two horizontal axis representations, \(a/b\) and \(\varepsilon=(a-b)/a\).

3.2 Helicity of Toroidal Flux Ropes with Elliptical Cross Sections

We used the toroidally curved cylindrical coordinates \(\rho\), \(\varphi\), and \(\theta\), given by Equations 3 – 5 to calculate the helicity. The helicity of a toroidal flux rope with an axially symmetric linear force-free field is

$$ H = \frac{2 \pi}{\alpha} \int_{0}^{2 \pi} \int_{0}^{\rho_{b}(\theta)} B^{2} \rho (R_{0} + \rho \cos \theta) \, \mathrm{d}\rho \, \mathrm{d}\theta , $$
(52)

where \(\rho_{b}(\theta)\) determines the boundary of the cross section. For instance, it is \(\rho_{b}(\theta)=1/\sqrt{\cos^{2} \theta/b^{2}+\sin^{2} \theta/a^{2}}\) for an elliptical cross section with its major semi-axis \(a\) parallel to the \(z\) axis (like in Figures 3b and 3c). In the subsequent text we analyze the results for this specific orientation (as far as it is not explicitly stated otherwise) because it is more relevant to flux ropes in the solar wind. These are expected to be oblate in the direction of their propagation (e.g. due to aerodynamic drag).

We numerically calculated helicities for toroidal flux ropes of various aspect ratios and oblatenesses using Equation 52 with magnetic fields resulting from the procedure described in Section 2. As a byproduct, we obtained values of \(\alpha\) for these cases. They are shown by asterisks in Figure 11. There is a dependence on two parameters, the aspect ratio and oblateness, therefore the results are presented in two panels. The thick line in the top panel shows alphas for toroidal flux ropes with circular cross sections (\(a/b=1\)), taken from Figure 4, while the thick line in the bottom panel are alphas for cylindrical flux ropes with elliptical cross sections (\(R_{0}/b \rightarrow \infty\)), taken from Figure 9. These lines represent limiting cases of our two parameters, and we have analytical approximations for them. We combined these approximations to obtain an analytical equation of \(\alpha\) for the other parameter values.

Figure 11
figure 11

Dependence of alpha on the aspect ratio (top panel) and oblateness of cross sections (bottom panel) for toroidal flux ropes. Results of numerical calculations are shown by asterisks and the thick lines, the thin lines are analytic approximations for selected cases. The dashed horizontal lines mark the value \(a_{0}\).

We start with Equation 48. It yields values for \(R_{0}/b \rightarrow \infty\), and the value is \(a_{0}\) in the limiting case of \(a/b \rightarrow 1\). This value yields Equation 24 for \(R_{0}/b \rightarrow \infty\), but this equation also determines values for other \(R_{0}/b\) when \(a/b=1\). We therefore replace \(a_{0}\) in Equation 48 by the right-hand side of Equation 24 and obtain

$$ |\alpha| b \stackrel{?}{\approx} a_{0} + \mu_{1} \zeta^{-1} + \mu_{2} \zeta^{-2} + \mu_{3} \zeta^{-3} + \gamma_{1} \varepsilon + \gamma_{2} \varepsilon^{2} , $$
(53)

where we introduced for simplicity a new notation, \(\zeta=R_{0}/b\) for the aspect ratio. We put the question mark in the equation because we then tested whether its form is suitable. A comparison between Equation 53 and real values from Figure 11 (asterisks) reveals that Equation 53 is only a very rough approximation. The reason may be that we have summands that are not coupled in parameters. We make a refinement in the form

$$ |\alpha| b \approx a_{0} + (1+\kappa_{1} \varepsilon) \bigl(\mu_{1} \zeta^{-1} + \mu_{2} \zeta^{-2} + \mu_{3} \zeta^{-3}\bigr) + \gamma_{1} \varepsilon + \gamma_{2} \varepsilon^{2}, $$
(54)

where the middle summand is coupled by a linear correction in \(\varepsilon\). The coefficient \(\kappa_{1}\) is found by the least-squares method. For the intervals of parameters \(1 \le a/b \le 7\) and \(R_{0}/b \ge 1.5\), this is \(\kappa_{1}=0.540\), and corresponding approximations of \(\alpha\) are shown in two examples by thin lines in Figure 11: for \(a/b=3\) (top panel) and for \(R_{0}/b=2\) (bottom panel). We see a very good coincidence with relating asterisks. The accuracy of the approximation in the given intervals is better than 0.1%.

Figure 12 shows numerically calculated values of the specific helicity, and its format is similar to that of Figure 11 for alphas. Similar as for the alphas, we constructed an analytical approximation. For the limit \(R_{0}/b \rightarrow \infty\) (cylindrical flux rope) we have Equation 51. Numerically calculated values for this limit from Equation 49 are drawn by the thick line in the bottom panel. For the other limit \(a/b \rightarrow 1\) (circular cross sections) there is an approximate analytic formula for helicity [Vandas and Romashets (2015), Equation 42]. When used, we obtain the dashed curve in the top panel of Figure 12. The top asterisks are the related numerically calculated values, and we see that this approximation is rough. Moreover, we need \(B_{\max}\) for the calculation of the specific helicity, but this quantity is not known analytically, it must be determined numerically. Therefore we turn to a polynomial approximation, through which a better approximation can be achieved, and set

$$ h_{c} \approx h_{L} + \nu_{1} \zeta^{-1} + \nu_{2} \zeta^{-2} , $$
(55)

where the constants \(\nu_{1}=-0.0035\) and \(\nu_{2}=-0.2206\) are found by the least-squares method. The subscript c refers to a circular cross section. This approximation is shown by the thicker solid line in the top panel of Figure 12. The relevant asterisks match very well. Continuing with the approximation of \(h\) in a similar way as we did for the alpha, \(h_{L}\) in Equation 55 is replaced by \(h_{r}\), Equation 51, and the constants \(\nu_{1}\) and \(\nu_{2}\) are supplemented by corrections for \(\varepsilon\). A suitable form was found by trial and error, and it is

$$ h \approx h_{r} + \bigl(\nu_{1}+ \lambda_{1} \varepsilon+\lambda_{2} \varepsilon^{2} + \lambda_{3} \varepsilon^{3}\bigr) \zeta^{-1} + \bigl(\nu_{2}+\lambda_{4} \varepsilon+ \lambda_{5} \varepsilon^{2}\bigr) \zeta^{-2} , $$
(56)

where \(\lambda_{1}=0.361\), \(\lambda_{2}=-1.218\), \(\lambda_{3}=0.682\), \(\lambda_{4}=-0.811\), and \(\lambda_{5}=1.005\) were determined by the least-squares method for values shown as asterisks in Figure 12 for \(R_{0}/b \ge 2\). Two examples of the approximation are shown by the thin solid lines in Figure 12: for \(a/b=3\) (top panel) and for \(R_{0}/b=2\) (bottom panel). The approximation given by Equation 56 is valid for \(1 \le a/b \le 6\) and \(R_{0}/b \ge 2\) with the difference from numerically determined values being ≲1%.

Figure 12
figure 12

Dependence of the specific helicity on the aspect ratio (top panel) and oblateness of cross sections (bottom panel) for toroidal flux ropes. Results of numerical calculations are shown by asterisks and the thick solid line (which corresponds to \(h_{r}\), Equation 49 and is shown in the bottom panel). The thin lines are analytic approximations for selected cases. The thicker solid line in the top panel is the analytic approximation and corresponds to \(h_{c}\), Equation 55, while the dashed line is the analytic approximation by Vandas and Romashets (2015).

This section solely studied toroidal flux ropes, where the major semi-axes of the cross sections were perpendicular to the \(xy\) plane (as shown in Figure 3c), that is, with the inclination \(\phi_{0}=0^{\circ}\). Figure 13 shows the change in values of alpha and specific helicity with inclination for selected aspect ratios and oblatenesses, to briefly demonstrate how the values differ. The alpha values remain nearly the same and the specific helicity varies only by several percent as a maximum. The differences clearly diminish with decreasing oblateness because they have to disappear for \(a/b=1\). Only values in the interval \(\langle 0,90^{\circ}\rangle\) are plotted because they repeat in the whole interval \(\langle 0,360^{\circ}\rangle\) owing to symmetry: it holds \(h(\phi_{0})=h(180^{\circ}-\phi_{0})=h(\phi_{0}-180^{\circ})\), and it obviously holds in the same way for \(\alpha(\phi_{0})\).

Figure 13
figure 13

Dependence of alpha (left panel) and the specific helicity \(h\) (right panel) on the inclination \(\phi_{0}\) of elliptical cross sections of toroidal flux ropes for several cases of aspect ratios and oblatenesses, distinguished by labels.

4 Comparison of the Helicities of Magnetic Clouds Fitted by Two Models

The relative helicity per unit length derived from a model usually serves as a basis for estimating the total helicity in a magnetic cloud, which is then related to the magnetic helicity of a solar source. As an example of using the above obtained formulae, we calculate relative helicity per unit length of two magnetic clouds. Vandas, Romashets, and Watari (2005) analyzed two magnetic clouds with very flat magnetic field magnitude profiles. They concluded that these profiles might be a manifestation of the clouds’ oblateness, and provided fits of magnetic field observations by two constant-alpha force-free cylindrical models, with a circular cross section (Lundquist, 1950; Burlaga, 1988) and with an elliptical cross section (Vandas and Romashets, 2003). It is commonly accepted that magnetic clouds are oblate, based on analyses of observations like the one we described above, on determinations of stand-off distances of bow shocks driven by magnetic clouds (Russell and Mulligan, 2002), on the Grad–Shafranov reconstruction technique (Hu and Sonnerup, 2002), on simple kinematic considerations (Riley and Crooker, 2004), and on magnetohydrodynamic simulations (Cargill et al., 1995; Vandas et al., 1995; Riley et al., 2004; Vandas, Romashets, and Geranios, 2010). Observations and fits of the two cited magnetic clouds are shown in Figures 14 – 15. Orientations of the flux rope axes (cylinders) are the same in panels a and b, as is the value of \(r_{0}=b\). The only difference is in the oblateness, which is \(a/b=1\) in (a) and \(a/b=5\) in (b). All fits are nearly central crossings, so \(B_{\max}\) can be directly estimated from the displayed profiles. The magnetic flux ropes are right-handed, that is, their helicity is positive.

Figure 14
figure 14

Magnetic field observations (hourly averages from OMNIWeb, solid lines) of the magnetic cloud from October 18 – 20, 1995. \(B\) is the magnetic field magnitude, the components \(B_{x}\), \(B_{y}\), and \(B_{z}\) are in GSE system. Estimated magnetic cloud boundaries are drawn by the dashed vertical lines. Observations are supplemented by model profiles drawn by the thick lines. Models were (a) a circular cylinder and (b) an elliptical cylinder.

Figure 15
figure 15

Magnetic field observations (hourly averages from OMNIWeb, solid lines) of the magnetic cloud on January 10 – 11, 1997, supplemented by model fits (thick lines). The format is the same as in Figure 14.

Figure 14a shows magnetic field measurements of the magnetic cloud in October 1995 (Lepping et al., 2006) fitted by a cylindrical flux rope with a circular cross section, i.e. by the Lundquist solution. Its radius is \(r_{0}=0.13~\mbox{AU}\) and therefore \(\alpha= 18~\mbox{AU}^{-1}\). It is \(B_{\max}= 24~\mbox{nT}\). The relative helicity per unit length can be calculated from the formula given by Equation 47. \(B_{0}\) of the model (Lepping, Jones, and Burlaga, 1990) coincides with \(B_{\max}\). We obtain \(H^{l}_{r}= 0.89~\mbox{nT}^{2}~\mbox{AU}^{3}\). For a flux rope with an elliptical cross section, Figure 14b, we have \(b= r_{0}= 0.13~\mbox{AU}\), \(a/b=5\), \(B_{\max}= 21~\mbox{nT}\), \(\alpha\) is determined from Equation 48, \(\alpha= 13~\mbox{AU}^{-1}\). The relative helicity per unit length is determined from Equation 49 with \(h_{r}\) given by Equation 51. It is \(H^{l}_{r} = 3.4~\mbox{nT}^{2}\,\mbox{AU}^{3}\), that is \(3.8\,{\times}\) higher than for the cloud fitted by the flux rope with the circular cross section.

A similar situation is seen for the second flux rope, which is shown in Figure 15, the magnetic cloud in January 1997 (Lepping et al., 2006). In this case, we have for the fit by a flux rope with a circular cross section \(r_{0}= 0.10~\mbox{AU}\), \(\alpha= 24~\mbox{AU}^{-1}\), and \(B_{\max}= 17~\mbox{nT}\), so \(H^{l}_{r} = 0.20~\mbox{nT}^{2}\,\mbox{AU}^{3}\). The values for a flux rope with an elliptical cross section are \(b= r_{0}= 0.10~\mbox{AU}\), \(a/b=5\), \(B_{\max}=~15~\mbox{nT}\), and \(\alpha = 17~\mbox{AU}^{-1}\), so \(H^{l}_{r} = 0.78~\mbox{nT}^{2}\,\mbox{AU}^{3}\), that is, again three to four times higher than for the circular cloud.

As discussed in Vandas, Romashets, and Watari (2005), the value of oblateness is relatively uncertain from fits. When we lower it to \(a/b=3\), the difference in relative helicity is about 2.5 ×. For \(a/b=2\) there is still a 2 × difference. The shape of a cloud substantially affects the estimation of the relative helicity per unit length. Figures 14 and 15 show that the fits of magnetic field components by both models (with circular and oblate cross sections) are comparatively good, but the models yield very different helicities.

What is a reason for this helicity difference? Figure 16 displays a slightly different representation of our results of the previous sections, namely the ratio of the helicity \(H\) of the toroidal flux rope to the relative helicity \(H_{L}\) of the cylindrical flux rope with the Lundquist field under the assumptions that both flux ropes have the same \(B_{\max}\) and the same volume in the sense that they have the same length and the same cross-sectional area. In our notation, this is

$$ \frac{H}{H_{L}} = \frac{h}{h_{L}} \frac{a_{0}}{\alpha b} \sqrt{1-\varepsilon} . $$
(57)

Figure 16 shows curves for three cases of aspect ratio. The relevant case for our magnetic clouds is shown by the solid line. It starts at 1.0 and \(H_{L}\) corresponds to the value of the helicity from the first fits of magnetic clouds. We see that the helicity decreases when the oblateness increases. At \(a/b=5\) it has about a half of the value for the circular shape. Despite this, the cross-sectional area of the flux ropes from the second fits is much larger than for the circular cross sections, and this fact outweighs the \(H/H_{L}\) decrease. So this is a much larger volume, which increases the helicity for the second fits. Figure 16 also shows that the helicity decreases with decreasing aspect ratio, but this variation is weak.

Figure 16
figure 16

Dependence of the helicity ratio on the oblateness of flux rope cross sections for three aspect ratios \(R_{0}/b\). \(H_{L}\) is the relative helicity of the Lundquist cylindrical flux rope. More details are given in the text.

5 Summary and Final Remarks

We constructed axially symmetric constant-alpha force-free magnetic fields in toroidal flux ropes with elliptical cross sections for a wide range of oblatenesses and aspect ratios. We examined values of alphas and magnetic helicities of these configurations. Because the magnetic helicity depends on the magnetic field strength and the size of the flux rope, we introduced a new quantity, a specific helicity, for a comparison between different flux ropes. The alphas decrease when the oblateness or aspect ratio increase. The specific helicity also decreases with the oblateness increase, but increases with the aspect ratio increase. We presented simple analytic formulae for approximate (≲ 1%) calculations of the alphas and magnetic helicities. Using these formulae, we calculated the relative helicities per unit length of two magnetic clouds with a probably very high oblateness. The results show that the relative helicities depend very strongly on the assumed magnetic cloud shapes. The assumption of a circular cross section may underestimate the helicity of magnetic clouds by several times in comparison with a case when an elliptical cross section is assumed.

The formulae presented in the article can serve two purposes. The equations for the magnetic field components can be used in fitting procedures of magnetic cloud observations by a toroidal flux rope with a circular or oblate cross section. The equation for helicity quickly yields this quantity for a particular fit by a cylindrical or toroidal flux rope. We demonstrated its usage for circular and oblate cylindrical flux ropes. Its application for curved flux ropes is a topic of future research.