2078 12

BIT203 ยท 2078 ยท 5 marks

Solve the Poisson's Equation nabla2 f = 2x2 y2 over the square domain 0 leq x leq 3 and 0 leq y leq 3 with f = 0 on the boundary and h = 1.

Solve the Poisson's Equation $\nabla^2 f = 2x^2 y^2$ over the square domain $0 \leq x \leq 3$ and $0 \leq y \leq 3$ with $f = 0$ on the boundary and $h = 1$. [5]

Numerical MethodsChapter 10: Partial Differential EquationsPoisson's equation and finite difference methodNumerical: Poisson's equation

Solving Poisson's Equation by Finite Difference Method

Given

  • PDE: $\nabla^2 f = f_{xx} + f_{yy} = 2x^2y^2$
  • Domain: $0 \le x \le 3$, $0 \le y \le 3$ (square)
  • Boundary condition: $f = 0$ on all boundaries
  • Step size: $h = 1$

With $h=1$ over $[0,3]$, interior nodes are at $x=1,2$ and $y=1,2$ (four interior points).


Solution

Five-point formula: $$f_{i+1,j}+f_{i-1,j}+f_{i,j+1}+f_{i,j-1}-4f_{i,j}=h^2 g(x_i,y_j)=2x_i^2 y_j^2$$

Interior points and RHS $=2x^2y^2$:

Label$(x,y)$RHS
$f_1$$(1,1)$$2$
$f_2$$(2,1)$$8$
$f_3$$(1,2)$$8$
$f_4$$(2,2)$$32$

Equations (boundaries = 0):

$(1,1):; -4f_1+f_2+f_3=2$ ...(1)

$(2,1):; f_1-4f_2+f_4=8$ ...(2)

$(1,2):; f_1-4f_3+f_4=8$ ...(3)

$(2,2):; f_2+f_3-4f_4=32$ ...(4)

Symmetry: (2) and (3) give $f_2=f_3$.

From (1): $-4f_1+2f_2=2 \Rightarrow f_1=\dfrac{2f_2-2}{4}=\dfrac{f_2-1}{2}$ ...(5)

From (4): $2f_2-4f_4=32 \Rightarrow f_4=\dfrac{2f_2-32}{4}=\dfrac{f_2-16}{2}$ ...(6)

Substitute into (2): $f_1-4f_2+f_4=8$

$$\frac{f_2-1}{2}-4f_2+\frac{f_2-16}{2}=8$$

$$\frac{(f_2-1)+(f_2-16)}{2}-4f_2=8$$

$$\frac{2f_2-17}{2}-4f_2=8$$

$$f_2-8.5-4f_2=8$$

$$-3f_2=16.5 \Rightarrow f_2=-5.5$$

Back-substitute:

$$f_3=f_2=-5.5$$

$$f_1=\frac{f_2-1}{2}=\frac{-5.5-1}{2}=\frac{-6.5}{2}=-3.25$$

$$f_4=\frac{f_2-16}{2}=\frac{-5.5-16}{2}=\frac{-21.5}{2}=-10.75$$

Verification with (1): $-4(-3.25)+(-5.5)+(-5.5)=13-11=2$ โœ“ With (4): $-5.5-5.5-4(-10.75)=-11+43=32$ โœ“


Final Result

$$\boxed{f_1=f(1,1)=-3.25,\quad f_2=f(2,1)=-5.5,\quad f_3=f(1,2)=-5.5,\quad f_4=f(2,2)=-10.75}$$

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.