• No se han encontrado resultados

We focus on four experimental cases :

1. CFL number fixed by the stability condition, and different values for the grid parameter Nx;

2. different values of CFL under the stability condition CF L < 1 ; 3. CF L ≃ 1 ;

4. violation of the theoretical stability condition, namely CF L > 1. First case. We fix CF L = 0.95 < 1 in (5.5), so that increasing Nx induces

∆x, and then ∆t, to decrease. We observe an improvement of the numerical solution in Figure 5.4, which is due to the numerical accuracy. This prop- erty of the algorithm reflects into the accuracy of the results, it depends only on the numerical parameters and not on the problem itself, and typically the refinement of grid points through ∆x leads the spurious modes to vanish. Second case. We want to check the theoretical condition CF L < 1 for the discrete maximum principle through coherent numerical results.

The main question reads : is the maximum principle satisfied whenever the condition CF L < 1 holds? Unfortunately, the answer is not. The range for which the discrete maximum principle is actually satisfied looks like

CF L ≤ 0.85 , (5.7)

that is considerably lower than the theoretical one.

Referring to Figure 5.5(a), we can see in all subintervals of the domain where the solution decreases with time, it exhibits a maximum value below that at previous times, which is a sign that the maximum principle is satisfied. In Figure 5.5(b), for a bigger CF L number, the solution changes its convex- ity, and clearly there is violation of the maximum principle. To emphasize this phenomenon, we consider CF L = 0.98 >> 0.85 and Nx = 50 , and we

perform the numerical tests reproduced in Figure 5.6. For T = 0.3 , three iterations are achieved; for T = 0.3 + ∆t , the method executes another it- eration, but the maximum of the numerical solution at the last iteration is

(a) ∆x = 0.4

(b) ∆x = 0.2

Figure 5.4: reducing the numerical instability with grid refinement higher than the previous one, thus violating the maximum principle.

(a) CF L = 0.85

(b) CF L = 0.86

(a) numerical solution at time T = 0.3

(b) numerical solution at time T = 0.3 + ∆t

The fact that the experimental limit CF L = 0.85 for the discrete max- imum/minimum principle is less than the theoretical prediction CF L = 1 can be explained through the analysis of the computational errors carried out by the computer’s software when approximating arithmetical operations, and this question comes together with the floating point representation of the real numbers [30]. Whenever we use computer programs, we must take into account that any real number x actually has its machine representation f l(x) = (1 ± ǫM) x , (5.8)

where ǫM depends on the computer characteristics, and it measures the

relative error made in replacing x with its floating point representation,

x − fl(x)

|x| = ǫM.

We remark that (5.8) is better than the alternative definition f l(x) = x±ǫM,

because the latter expresses the truncation error in percent.

We return to the explicit scheme (3.6), and we assume that solely the values of the numerical solution are affected by representation errors, so that

(1 ± ǫ1)un+1i = h 1 − 2 a fl∆x∆t2i(1 ± ǫ2)uni + a f l  ∆t ∆x2  (1 ± ǫ3)uni+1 + a f l ∆t ∆x2  (1 ± ǫ4)uni−1,

with the hypothesis that integer numbers satisfy 2 = f l(2) and a = f l(a) . For simplicity, we impose the same error for all the values un

i, because we

can always estimate with the maximum of the ǫk, k = 1, 2, 3, 4 . In order to

have a convex combination of coefficients, the theoretical stability condition reads 0 ≤ 2a∆x∆t2 ≤ 1 , and the floating point representation implies

2 a f l ∆t ∆x2  = 2 a  (1 ± ǫ∆t)∆t (1 ± ǫ∆x)2∆x2  = 2 a ∆t ∆x2 ErrM, (5.9) where ErrM = (1±ǫ(1±ǫ∆t)

∆x)2 and, typically, it holds ErrM >> 1 . The positivity

is still satisfied because the floating point representation preserves the sign, instead the contractivity condition for (5.9) is fulfilled if

2 a ∆t ∆x2ErrM ≤ 1 =⇒ 2 a ∆t ∆x2 ≤ 1 ErrM ,

therefore the numerical errors influence the theoretical results by straitening the CF L-condition and, obviously, the experimental requirement (5.7) turns out to be more restrictive.

Third case. Now, we study more carefully the behaviour of the numerical solution when CF L ≃ 1. We start by remarking another interesting phe- nomenon in Figure 5.6 : we focus on the monotone branches and we see that, although exhibiting small artificial steps, the solution does not change its convexity. If we increase the CF L number, the convexity is unaltered, as shown in Figure 5.7(a), until CF L = 1 is reached and some parts of the vertical branches clearly flatten in Figure 5.7(b). If we further increase the value of CF L, the convexity changes drastically and a stronger instability occurs, resulting in uncontrolled oscillations (refer to Figure 5.8), thus show- ing that the l2-stability persists more that the l-stability encoded into the

discrete maximum/minimum principle.

For CF L = 1 , the explicit scheme (3.6) reduces to the arithmetic average between the values uni−1 and uni+1, namely

un+1i = 1 2u n i−1+ 1 2u n i+1,

so that, to calculate the numerical solution at the same point xiat time tn+1,

we take the values at previous time tnand we make the average of the left and right neighborhoods. In this way, for the components un

i on the monotone

branches, the convexity does not change because the neighboring values are one above and one below uni, respectively. But, if uni is the maximum value at time tn, very likely un

i−1 and uni+1 are equal, and the convexity changes,

as we have already seen in Figure 5.6. More precisely, the maximum value u(t3, 0) at the third iteration is below the maximum value u(t2, 0) at the previous one, but for the fourth iteration the value u(t4, 0) is greater than

u(t3, 0) as it is just equal to

u(t4, 0) = u(t

3, −∆x) + u(t3, ∆x)

2 = u(t

3, −∆x) = u(t3, ∆x) > u(t3, 0)

and this is clearly a violation of the maximum principle.

In conclusion, in case of change of convexity in the numerical solution, the maximum/minimum principle is no longer satisfied. Moreover, we have seen in the second case how the validity of the maximum principle deterio- rates if CF L ≥ 0.85 with ∆x fixed, whereas it is satisfied if we fix the CF L number small enough and increase Nx in the first case. These two comple-

mentary aspects find an explanation in the sensitivity of the problem with respect to the discrete maximum/minimum principle, in comparison to the standard numerical instability (which is further analyzed in the next case) : the stability through the Von Neumann analysis considers the L2-norm, i.e.

the integral norm, which is lighter than the L∞-norm used for the maxi-

(a) CF L = 0.99

(b) CF L = 1

Figure 5.7: change of convexity due to imminent instability regimes parameters inside the numerical scheme.

Figure 5.8: appearance of instabilities for CF L > 1

Fourth case. When the CF L-condition exceeds the theoretically predicted values for stability, the numerical solution starts oscillating around the exact solution, as we have seen in Figure 5.8. This phenomenon in known as the Ultraviolet Catastrophe (borrowing a term from quantum mechanics). This usually happens in those situations in which one wants to approximate a model (the one-dimensional heat equation, for example) with another (the numerical algorithm) which has a similar behaviour on low frequencies, and we can apply the Fourier analysis, but it is very different on high frequencies, i.e. short wavelengths and, therefore, ultraviolet electromagnetic spectrum. Indeed, recalling the arguments developed in Section 3.1.2, the amplifi- cation factor for the explicit scheme (3.6) is given by (3.20) fixing θ = 0 , so that using (5.5) and the definition λ = ∆x∆t2, we can rewrite it as

G = 1 − 4 a λ sin2 ∆x ξ

2  = 1 − 2 CF L · sin

2 ∆x ξ

2 .

For the stability condition |G| ≤ 1 , the upper bound is always satisfied since CF L > 0 , while the lower bound holds if

−1 ≤ 1 − 2 CF L · sin2 ∆x ξ2 

=⇒ CF L · sin2 ∆x ξ2  ≤ 1 .

It is clear that, if we put CF L ≤ 1, the above inequality is always satisfied independently from the value of ξ , whereas if we fix CF L > 1, the worst

value of sin2(∆x ξ2 ) obviously being 1, the stability condition can be violated. In this sense, we have a stable numerical approximation for low frequencies because, as ξ becomes small, the factor sin2(∆x ξ2 ) < 1 makes the inequal- ity even stronger; moreover, for moderate frequencies, reducing ∆x would always improve the stability, regardless the value of CF L, and then the dissipation mechanism of the numerical scheme appears similar to that of the continuous model. On the other hand, for the high frequencies, when ξ becomes large, the amplification factor could actually becomes greater than 1, and we can assist to oscillations inside the numerical solution, although the continuous model is able to dump out possible oscillations. Therefore, it is required to control the stability with the CF L number, to limit the ampli- fication factor, otherwise we witness fluctuations that are not typical of the model to approximate. That is the essence of the Ultraviolet Catastrophe.