You must determine the maximum time interval value (delta_t=1/2*delta_x^2/alfa) in explicit method, and thus you can choose an accurate value. However, there is no need to determine it in implicit method. Implicit is the best method.
I suggest Yunus A. Cengel, Heat and Mass Transfer, Chapter 5.
This condition is used when choosing the correct (delta t) value that will make the solution stable when using Explicit time scheme in simulation of 1D only, because there is only delta x. However, each time scheme has his advantages and disadvantages. For instance, Implicit time scheme is unconditionally stable and it takes longer execution time to converge especially when you have heavy mesh. Explicit time scheme is conditionally stable (you have to do the above check) and it gives you direct solution without iteration and it is faster than the implicit scheme. The question wasn't about how each scheme performs. the question was which one is more accurate ?
You are right. Implicit provides large step times, and equation must be solved simultaneously. Explicit is easy, and equations is must be solved consecutive. According to literature, and as far as my remember, implicit more accurate. Therfore i suggest it. However, explicit is as good as, when the stability criterion is truely selected.
INTERNATIONALJOURNAL OF ENERGY RESEARCH,VOL. 20,17-32
So the question is that which one is more accurate in a given running-time? Because you can reach very high precision if you don't need to be fast and can use very short timesteps. Even explicit Euler is very accurate then, for a diffusive problem I would use this or RK4 to reach high precision.
Do you use the built-in solver in Matlab or you code the algorithms for yourselves?
@Endre Kovács I code it my self using the TDMA solver (i prefer FORTRAN 77 rather than MATLAB, because I''m the teacher of FORTRAN course for the 2nd grade of mechanical engineering students for almost 3 years). The fully implicit scheme is considered to be the most dominant time scheme for being an unconditionally stable scheme.
Indeed, the question of which schemes are more accurate, explicit or implicit schemes was not sufficiently discussed in the literature. This is due to the fact that explicit schemes are well known to be more performant than related implicit schemes, of course if the stability condition of the explicit scheme is verified. This means that we we can reach a given accuracy in less time with explicit schemes. For instance, if we suppose that an implicit scheme have a certain accuracy for a given delta t, it is sure than we can find a smaller time step for which the explicit method is more accurate and that with less computational cost (since the implicit method is much more expensive in terms of computational cost). Hence, the question of which of the two methods is more accurate for the same delta t is not very important.
The accuracy of a method can be expressed according to the global discretization order O (dt ^ n). For any method, either expressed implicitly or explicitly, eg. Euler (n = 1) and for a fixed value of dt, in theory the same accuracy is obtained. The "difference" is of course that the explicit version is only conditionally stable under CFL conditions: Cdt 1, an explicit method would be unstable, while the implicit ones relax the solution to force the stability and therefore produce a decrease of the precision. On the other hand when choosing Cdt ~ 1, the explicit method is still slightly unstable. Therefore, for the heat diffusion problem, a good option may be to use an implicit scheme that in combination with spatial discretization in centered differences of O(dx ^ 2), produces a system of linear equations with tri-diagonal matrix that can be solved efficiently with Thomas algorithm.
As far as the explicit schemes are concerned we can indeed solve the diffusion equation with sufficiently small time step to satisfy the CFL criterion. The situation changes, however, when the equation contains stiff terms resulting for example from chemical reactions. In such situations the explicit schemes are prohibitively expensive and the only option is to use the implicit methods.
The recent advances in linear algebra and Krylov space methods are also instrumental to promote the use of the exponential integration schemes for solution of the diffusion equation. Looking at the developments in numerical mathematics I believe that the exponential integration methods are becoming the top choice for time stepping of partial differential equations.
If you are interested in this topic I will be happy to provide you some further details.
Dear Janusz Pudykiewicz, I'm interested in the methods you mentioned, and not only in one, but 2 and 3 spatial dimensions as well.
So you say that there is no explicit method which is applicable to stiff systems without serious time-stepsize problems?
As far as I understand, the simple heat equation also can be stiff if the grid contains very tiny blocks/cells as well as large ones. (It can happen that the grid is predifined for us, thus we can not chose uniform step sizes)
Explicit schemes are not practical for the stiff problems because the time step is determined by the fastest modes present in the system. Typically the stiffness is assessed by the analysis of the eigenvalues of the Jacobian matrix.
You are correct when asserting the the grid with tiny cells will lead to the stiffness, this fact can be proven by the stability analysis. In most of the actual calculations the diffusion terms are treated using the implicit time schemes.
I will prepare a set of papers with all information pertinent to the exponential schemes.
Assuming a finite difference approximation, whichever type of method one chooses, be it explicit of implicit, there is an associated order of accuracy. If one chooses to solve using a fourth order accurate timestepping scheme, for example, then halving the timestep will reduce the time-stepping error by a factor of 2^4=16, roughly. This is independent of whether the method is implicit or explicit. Explicit methods may have a timestep restriction depending on the spatial steps used, while implicit methods may have convergence difficulties if nonlinear effects are too strong. But essentially the degree of accuracy in temporal terms depends on the order of accuracy of the timestepping method.