Alternating-direction implicit method: Difference between revisions

Content deleted Content added
Example: 2D diffusion equation: removed <math>= \Delta u</math> for doubled notation (<math>\Delta</math> already being used for the "step")
Example: 2D diffusion equation: added "second" for central differences and reviewed some of the notation (previously confusing)
Line 65:
 
: <math>{u_{ij}^{n+1}-u_{ij}^n\over \Delta t} =
{1 \over 2(\Delta x)^2}\left(\delta_x^2+\delta_y^2\right)
\left(u_{ij}^{n+1}+u_{ij}^n\right)</math>
 
where:
 
: <math>\Delta \equiv \Delta x = \Delta y</math>
 
and <math>\delta_p^2</math> is the central second difference operator for the ''p''-th coordinate. After performing a [[Von Neumann stability analysis|stability analysis]], it can be shown that this method will be stable for any <math>\Delta t</math>.
: <math>\delta_p^2 u_{ij}=u_{ij+e_p}-2u_{ij}+u_{ij-e_p}</math>
with <math>e_p=(1,0)</math> or <math>(0,1)</math> for <math>p=x</math> or <math>y</math> respectively.
 
After performing a [[Von Neumann stability analysis|stability analysis]], it can be shown that this method will be stable for any <math>\Delta t</math>.
 
A disadvantage of the Crank–Nicolson method is that the matrix in the above equation is [[band matrix|banded]] with a band width that is generally quite large. This makes direct solution of the [[system of linear equations]] quite costly (although efficient approximate solutions exist, for example use of the [[conjugate gradient method]] preconditioned with [[incomplete Cholesky factorization]]).