2025-05-12 03:48:15
This post is part of a series of articles on the Finite Difference Method, with other posts in the series focusing on:
In the previous tutorial on Finite Difference Methods it was shown that the explicit method of numerically solving the heat equation lead to an extremely restrictive time step. This motivates another scheme which allows for larger time steps, but with the trade off of more computational work per step. This method is known as the Crank-Nicolson scheme.
The explicit method for the heat-equation involved a forward difference term for the time derivative and a centred second derivative for the second space derivative:
The Crank-Nicolson scheme modifies this to incorporate a weighted average of the second spatial step at time n and time n + 1. An obvious response is that the values of f are not known at n + 1 and questions arise over how they are calculated. These questions will be answered below. One final question occurs over how to split the weighting of the two second derivatives. The Crank-Nicolson scheme uses a 50-50 split, but others are possible. Stability is a concern here with
The Crank-Nicolson scheme for the 1D heat equation is given below by:
Letting
Since there three unkown terms on the left hand side, it indicates that for each time step a set of simultaneous linear equations must be solved. For any particular time step n there will be I - 2 equations to solve. These correspond to each of the interior spatial grid points. Since we are using Dirichlet boundary conditions (i.e. fixed), the end points do not require such a linear system to be solved.
The linear system can be represented by a matrix equation AF = D
, where
A first attempt at solving this system might involve inverting the matrix A to give the values of the column matrix F as
Reference: Crank-Nicholson Implicit Scheme
From https://www.quantstart.com/articles/Crank-Nicholson-Implicit-Scheme/
2025-01-10 10:12:01
2024-05-31 03:06:49
2024-05-28 03:09:25
There are many other interesting articles, try selecting them from below.
2024-05-10 01:34:44
2024-08-19 10:58:38
2024-03-22 03:12:18
2024-12-03 01:51:43
2024-04-19 03:03:34
2023-09-18 05:55:18
2023-09-06 09:23:55
2024-08-07 10:54:58