- #1
pafcu
- 10
- 0
Hi all,
A diffusion equation is of the form
[tex]\frac{\partial u}{\partial t}=k \frac{\partial^2u}{\partial x^2}[/tex]
Usually an equation like this seems to be solved numerically using the Crank-Nicolson method:
[tex]\frac{u_{i}^{n + 1} - u_{i}^{n}}{\Delta t} = \frac{k}{2 (\Delta x)^2}\left((u_{i + 1}^{n + 1} - 2 u_{i}^{n + 1} + u_{i - 1}^{n + 1}) + (u_{i + 1}^{n} - 2 u_{i}^{n} + u_{i - 1}^{n})\right)[/tex]
i.e the time-related part is approximated using a 2-point forward difference approximation and the space-part using an average of two 3-point central difference approximation. ([tex]u_{i}^{n}[/tex] means value of u at point i at timestep n, i.e u(i,n))
Is there a specific reason why a central difference is not used for the time? Since a central difference results in a smaller error, yet it's not usually used, what drawback does it have?
What about the central difference for the space-related part? Is there a reason for using the 3-point version instead of the 5-point version? Or is the simpler one usually used because it results in a tridiagonal matrix which is easier to solve?
edit: Clarified notation
A diffusion equation is of the form
[tex]\frac{\partial u}{\partial t}=k \frac{\partial^2u}{\partial x^2}[/tex]
Usually an equation like this seems to be solved numerically using the Crank-Nicolson method:
[tex]\frac{u_{i}^{n + 1} - u_{i}^{n}}{\Delta t} = \frac{k}{2 (\Delta x)^2}\left((u_{i + 1}^{n + 1} - 2 u_{i}^{n + 1} + u_{i - 1}^{n + 1}) + (u_{i + 1}^{n} - 2 u_{i}^{n} + u_{i - 1}^{n})\right)[/tex]
i.e the time-related part is approximated using a 2-point forward difference approximation and the space-part using an average of two 3-point central difference approximation. ([tex]u_{i}^{n}[/tex] means value of u at point i at timestep n, i.e u(i,n))
Is there a specific reason why a central difference is not used for the time? Since a central difference results in a smaller error, yet it's not usually used, what drawback does it have?
What about the central difference for the space-related part? Is there a reason for using the 3-point version instead of the 5-point version? Or is the simpler one usually used because it results in a tridiagonal matrix which is easier to solve?
edit: Clarified notation
Last edited: