03 - 1D Heat Diffusion (implicit)
This exercise focuses on solving the one-dimensional heat diffusion equation without internal heat generation using the implicit (backward Euler) scheme. The implicit approach is unconditionally stable and thus avoids the restrictive time-step limitation of explicit methods. However, stability does not imply higher accuracy, and the scheme requires solving a linear system at each time step.
The main objectives are:
- Discretization of the PDE and approximation of derivatives with finite difference operators,
- Defining Dirichlet and Neumann boundary conditions,
- Setting up the coefficient matrix,
- Exploring different approaches to implement the numerical scheme: a) using a for-loop over the grid and solving the linear system with a direct method, b) employing predefined functions from
GeoModBox.jl
, and c) solving the linear system iteratively with the defect correction method, - Storing the solution as a GIF animation.
The resulting transient evolution of a Gaussian temperature anomaly is shown in Figure 1.
Figure 1. Transient behavior of a one-dimensional Gaussian temperature anomaly.