Before starting with the comparisons, we note that for very specific models
(namely those characterized by a constant magnetic field intensity and
inclination, and a constant velocity field in the l.o.s. but an azimuth of
magnetic field varying linearly with depth) DIAGONAL provides an exact
solution, independently of the number of layers. We can take advantage of that
to test the convergence rate of DELO in a non-trivial
case (if by trivial we refer to the Rachkowsky solution). The model
presented in
Table 1 has been used to this purpose. Azimuth gradient is bigger
than the usual values considered for solar model atmospheres, but we wanted to
observe the convergence rate, and not absolute values of precision.
We have integrated the model with DELO using 30 to 530 integration layers.
DIAGONAL provided the correct solution and the precision of DELO's integration
is referred to this solution. The results are shown in Fig. 6.
Figure 6: Precision versus number of layers figure for DELO with the model atmosphere presented in Table 1 |
DELO is shown to be a second-order approximation while solving for Milne-Eddington models (although in this particular case, a null second derivative of the source function makes exact any approximation to second or bigger order). Bellot Rubio et al. showed that DELO converged also as a second-order approximation for a general atmosphere solved numerically. The results shown in Fig. 6 confirm this statement for a non-trivial analytical solution: DELO converges quadratically with the inverse of the thickness of the integration layer.
Next, we present the two models which have served to verify the convergence of DIAGONAL. We have chosen first a model with a gradient of magnetic field intensity as the sole varying parameter, and a second one in which gradients of azimuth and l.o.s. velocity are also considered. Table 2 describes both models (labeled Model 1 and Model 2). By selecting these two particular models we want to characterize the behaviour of DIAGONAL. As stated in previous sections, it can be summarized in 3 basic points:
Model 1 has constant with depth parameters except for magnetic intensity. In terms of solutions DIAGONAL is not better than DELO. In fact the comparison graphic (Fig. 7) shows that the convergence rate is equal for both codes from a certain number of layers. The difference is the exact calculation of the exponential, which improves the convergence of DIAGONAL for a small number of layers. The bigger the number of layers, the better the DELO's second order approximation for the exponential is. Once DELO compensates for the advantage of DIAGONAL, both codes behave similarly. This paragraph can be repeated for Model 2 (Fig. 8). But in this case DIAGONAL treats analytically the non-zero azimuth gradient, thus increasing its advantage over DELO, specially when few integration layers are used (see the referred figure).
Figure 7: Precision versus number of layers figure for DELO (dashed line) and DIAGONAL (continuous line) with model atmosphere 1 |
Figure 8: Precision versus number of layers figure for DELO (dashed line) and DIAGONAL (continuous line) with model atmosphere 2 |
After these 2 examples, the following statement appears to be a reasonable description of DIAGONAL: This new code behaves at worst as DELO, but always presents a faster convergence for a small number of layers. The first part of this assertion was already predicted in our error analysis in Sect. 2, the second part was the searched objective for DIAGONAL, and this fast convergence shows the success of the code. It means that the analytical approach is indeed very useful and desirable. The elaborated algebra implicit in the DIAGONAL code implies a longer integration time per layer than DELO. Therefore, it is in the interest of this new code to use as few layers as possible to attain a desired precision. To illustrate this point of DIAGONAL, namely its slowness in integrating a single layer, we present in Fig. 9 a graph of time versus number of layers for both DELO and DIAGONAL. DELO appears to be 1.6 times faster per layer than DIAGONAL. If DIAGONAL is still a faster code, it is due to the fact that it can attain the desired precision with up to 6 times fewer layers than DELO.
Figure 9: Comparison of time versus number of layers for both: DELO (points line) and DIAGONAL (continuous line) |
Copyright The European Southern Observatory (ESO)