# Basic question on Crank-Nicolson method.

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 16, 2020, 11:34 Basic question on Crank-Nicolson method. #1 Senior Member   Mandeep Shetty Join Date: Apr 2016 Posts: 185 Rep Power: 10 I had worked with the Crank Nicolson method in college to solve the diffusion equation.... but there I had always used central differencing to discretize the space terms. Even now when I look-up most of the texts and notes explain the CN method I find the use of central differencing for the space derivative terms. My question is can we use another method, like say forward differencing or backward differencing, instead of central differencing (I realize they are first order and I don't know if they will stable) to discretize the space terms? I asking because in OpenFOAM we use CN scheme for time terms and can pick any other schemes for the Gradient or Laplacian or some other space terms, which are not central differencing. So this made me go back to what I had learned during my college days.

December 16, 2020, 12:15
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by granzer I had worked with the Crank Nicolson method in college to solve the diffusion equation.... but there I had always used central differencing to discretize the space terms. Even now when I look-up most of the texts and notes explain the CN method I find the use of central differencing for the space derivative terms. My question is can we use another method, like say forward differencing or backward differencing, instead of central differencing (I realize they are first order and I don't know if they will stable) to discretize the space terms? I asking because in OpenFOAM we use CN scheme for time terms and can pick any other schemes for the Gradient or Laplacian or some other space terms, which are not central differencing. So this made me go back to what I had learned during my college days.

The answer is that you can formally use any type of spatial discretization, the CN can be seen as a second order trapezodial rule for the time integration. But your final goal is to have a stable and accurate solution and is suitable to use at least a second order accurate spatial discretization.

I used personally with success the CN scheme coupled to a fourth order accurate spatial discretization.

December 16, 2020, 12:20
#3
Senior Member

Mandeep Shetty
Join Date: Apr 2016
Posts: 185
Rep Power: 10
Quote:
 Originally Posted by FMDenaro The answer is that you can formally use any type of spatial discretization, the CN can be seen as a second order trapezodial rule for the time integration. But your final goal is to have a stable and accurate solution and is suitable to use at least a second order accurate spatial discretization. I used personally with success the CN scheme coupled to a fourth order accurate spatial discretization.
Thank you so much! I don't know why most of the books or note that I found don't mention this...and only use th central differencing scheme for space terms.

 Tags crank-nicolson