tailieunhanh - APPLIED NUMERICAL METHODS USING MATLAB phần 9
Thay thế các phái sinh đầu tiên trên biên giới phía trái (x = x0) xấp xỉ ba điểm khác biệt trung tâm () cho i = 1, 2,. . . , Mỹ - 1 () và sau đó thay thế ràng buộc này vào Eq. () tại các điểm ranh giới, chúng ta có ui, | ELLIPTIC PDE 405 Figure Temperature distribution over a plate Example . Replacing the first derivative on the left-side boundary x x0 by its three-point central difference approximation ui 1 ui _ 1 2Ax bX 0 yủ Ui -1 Ui 1 - 2b X0 yi Ax for i 1 2 . My - 1 and then substituting this constraint into Eq. at the boundary points we have ui 0 ry ui 1 ui -1 rx ui 1 0 Ui-1 0 rxy gi 0ui 0 fi 0 ry ui 1 ui 1 - 2b x0 yi x rx ui 1 0 ui-1 0 rxy gi 0ui 0 - fi 0 2ryUi 1 rx ui 1 0 Ui-1 0 Txy gi 0Ui 0 - fi 0 - 2bX0 yi Ax for i 1 2 . My - 1 If the boundary condition on the lower side boundary y y0 is also of Neumann type then we need to write similar equations for j 1 2 . Mx - 1 U0 j ry u0 j 1 U0 j-1 2rxU1 j rxy g0 jU0 j - f0 j - 2by0 xj Ay and additionally for the left-lower corner point x0 y0 U0 0 2 ryU0 1 rxU1 0 rxy g0 0U0 0 - f0 0 - 2 b X0 y0 kx 2by0 x0 Ay 406 PARTIAL DIFFERENTIAL EQUATIONS PARABOLIC PDE An example of a parabolic PDE is a one-dimensional heat equation describing the temperature distribution u x t x is position t is time as 9 2u x t du x t . _ A 7 7 for 0 x xf 0 t T dx2 dt In order for this equation to be solvable the boundary conditions u 0 t b0 t u xf t bxf t as well as the initial condition u x 0 i0 x should be provided. The Explicit Forward Euler Method To apply the finite difference method we divide the spatial domain 0 xf into M sections each of length Ax xf M and divide the time domain 0 T into N segments each of duration At T N and then replace the second partial derivative on the left-hand side and the first partial derivative on the right-hand side of the above equation by the central difference approximation and the forward difference approximation respectively so that we have A 2u u -1 u u Ax2 At v 7 This can be cast into the following algorithm called the explicit forward Euler method which is to be solved iteratively uk 1 r uk 1 uk-1 1 - 2r uk with r A- - i i 1
đang nạp các trang xem trước