Finite Difference Method for An Elliptic Partial Differential Equation
Problem
Use the finite difference method and MatLab code to solve the 2D steady-state heat equation (δ^{2}T/δx^{2} )+ (δ^{2}T/δy^{2} )= 0, where T(x, y) is the temperature distribution in a rectangular domain in x-y plane. The boundary condition is specified as follows in Figure.
Show (1) the temperature distribution in the whole rectangular domain (use 'contourf ').
(2) the temperature distribution along the diagonal line
(the red dotted line without the two ends) and the middle line (the blue dashed line) (use 'plot').
(Note: You should give a brief description of your way to apply the finite difference method, e.g., what kind of discrete domain and how many nodes you choose, and provide the complete MatLab program you use)