Mathematical Physics - Volume II - Numerical Methods
14 Chapter 1. Finite difference method and Finite element method
1.1.4 Parabolic equations – application to diffusion equation One-dimensional diffusion equation: u t = a 2 u xx
(1.11) is used as a typical parabolic partial differential equation, for which we will derive the corresponding finite difference equation. For a mesh ( x n , t j ) = ( nh , jk ) , there are several possible finite difference equations. Here we will consider three of the most commonly used two-level equations, whose solution is known during step j , and is explicitly or implicitly used in order to determine a new solution in j + 1: 1) Explicit method ("forward difference") U n , j + 1 − U n j k = a 2 U n + 1 , j − 2 U n j + U n − 1 , j h 2 (1.12) or, in short: U n , j + 1 = ( 1 + r δ 2 x ) U n j ( r = a 2 k / h 2 ) . 2) Implicit method ("backward difference") U n , j + 1 − U n j k = a 2 U n + 1 , j + 1 − 2 U n , j + 1 + U n − 1 , j + 1 h 2 (1.13) or, in short: ( 1 − r δ 2 x ) U n , j + 1 = U n j ( r = a 2 k / h 2 ) . 3) Implicit method (Crank - Nicolson) U n , j + 1 − U n j k = a 2 2 δ 2 x U n j + δ 2 x U n , j + 1 h 2 (1.14) or, in short: ( 1 − r 2 δ 2 x ) U n , j + 1 = ( 1 + r 2 δ 2 x ) U n j . Implicit methods are unconditionally stable with local rounding error of O ( k + h 2 ) for the forward method and O ( k 2 + h 2 ) for the Crank – Nicolson method, whereas the explicit method is conditionally stable ( r ≤ 1 / 2 ) and has a local rounding error of O ( k + h 2 ) . Fir two-dimensional diffusion equation : u t = a 2 ( u xx + u yy ) (1.15) the mesh is ( x m , y n , t j ) = ( mh , nh , jk ) i U mn j ≈ u mn j = u ( x m , y n , t j ) . Analogous to the previous equations, we now have the following: U mn , j + 1 = [ 1 + r ( δ 2 x + δ 2 y )] U mn j (1.16) [ 1 − r ( δ 2 x + δ 2 y )] U mn , j + 1 = U mn j (1.17) [ 1 − r 2 ( δ 2 x + δ 2 y )] U mn , j + 1 = [ 1 + r 2 ( δ 2 x + δ 2 y )] U mn j (1.18)
Made with FlippingBook flipbook maker