Вы находитесь на странице: 1из 1

ChE 420, Spring 2012

Howework 3
1. This homework is due on March 1, 2012, 4:00 PM. 2. Please provide the detailed work (including the schemes as well as results) and attach your computer codes. See the guidelines for detailed grading policy. The MATLAB code bvp2d-fd-example.m solve the Poisson problem on a square (M + 1) (M + 1) grids with hx = hy = h, using the 5-point Laplacian. It is set up to solve a test problem with Dirichlet boundary conditions on the domain [0, 1]2 . 1. For the Poisson problem y 5 exp(x + ), (x, y) = [0, 1]2 , 4 2 y y u(0, y) = exp( ), u(1, y) = exp(1 + ), y [0, 1], 2 2 1 u(x, 0) = exp(x), u(x, 1) = exp(x + ), x [0, 1]. 2
2

u=

(a) Discretize it by the central difference scheme and write the resulting system into the form AU = F; (b) Modify the code bvp2d-fd-example.m to solve it; (c) Test the code by performing a grid renement study to verify that it is second order accurate; 2. Consider the Poisson problem
2

u = 2 sin(x) sin(y),

(x, y) = [0, ]2 ,

u(x, y) = 0 (x, y) \{x = 0}, u = sin(y), n x=0 (a) Discretize it by the central difference scheme and write the resulting system into the form AU = F; (b) Modify the code bvp2d-fd-example.m to solve it;

Вам также может понравиться