Numerical Methods · Unit 10
Partial Differential Equations
Exam-focused notes for Partial Differential Equations (Numerical Methods, BIT203): what the TU syllabus asks and how it has actually been tested, with 4 solved past questions from this unit.
Partial Differential Equations in short
Partial differential equations (PDEs) describe heat flow, electric fields, fluid flow and many other physical systems. We solve them numerically by replacing derivatives with differences on a grid of points.
What this unit covers
- Poisson's equation and finite difference method
- Laplace equation and steady state problems
- Grid discretization and boundary conditions
- Iterative solution of PDE systems
- Heat conduction and temperature distribution problems
Poisson's equation and finite difference method
2080 · 5 marks
Solve the Poisson's equation ∂2f/∂x2+∂2f/∂y2=2x2y2\partial^2f/\partial x^2+\partial^2f/\partial y^2 = 2x^2y^2∂2f/∂x2+∂2f/∂y2=2x2y2 over the square domain 0<=x<=3 and 0<=y<=3 with f=0 on the boundary and h = 1. [5]
2078 · 5 marks
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]
Show solved answerHide answer
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}$$
0 · 5 marks
Solve the Poisson's equation $\nabla^2 f = xy$ with $f = 2$ on boundary by assuming square domain $0 \leq x \leq 3$, $0 \leq y \leq 3$ and $h = 1$. [5]
Show solved answerHide answer
Solving Poisson's Equation ∇²f = xy
Given
- PDE: $\nabla^2 f = xy$, i.e. $g(x,y) = xy$
- Domain: $0 \le x \le 3$, $0 \le y \le 3$
- Step size: $h = 1$
- Boundary condition: $f = 2$ on all boundaries
Solution
Grid
With $h = 1$: nodes at $x = 0,1,2,3$ and $y = 0,1,2,3$.
Interior unknowns:
- $f_1 = f(1,1)$
- $f_2 = f(2,1)$
- $f_3 = f(1,2)$
- $f_4 = f(2,2)$
All boundary nodes have $f = 2$.
Finite Difference 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)$$
With $h=1$, RHS $= xy$ at each interior node.
Node Equations
$f_1=f(1,1)$, $g = 1$; neighbors $f_2, 2, f_3, 2$: $$f_2 + 2 + f_3 + 2 - 4f_1 = 1 \Rightarrow -4f_1 + f_2 + f_3 = -3 \quad (1)$$
$f_2=f(2,1)$, $g = 2$; neighbors $2, f_1, f_4, 2$: $$2 + f_1 + f_4 + 2 - 4f_2 = 2 \Rightarrow f_1 - 4f_2 + f_4 = -2 \quad (2)$$
$f_3=f(1,2)$, $g = 2$; neighbors $f_4, 2, 2, f_1$: $$f_4 + 2 + 2 + f_1 - 4f_3 = 2 \Rightarrow f_1 - 4f_3 + f_4 = -2 \quad (3)$$
$f_4=f(2,2)$, $g = 4$; neighbors $2, f_3, 2, f_2$: $$2 + f_3 + 2 + f_2 - 4f_4 = 4 \Rightarrow f_2 + f_3 - 4f_4 = 0 \quad (4)$$
Solve
Equations (2) and (3) are identical, so $f_2 = f_3 = p$.
From (1): $-4f_1 + 2p = -3 \Rightarrow f_1 = \dfrac{2p+3}{4}$
From (4): $2p - 4f_4 = 0 \Rightarrow f_4 = \dfrac{p}{2}$
Substitute into (2): $f_1 - 4p + f_4 = -2$
$$\frac{2p+3}{4} - 4p + \frac{p}{2} = -2$$
Multiply by 4: $$2p + 3 - 16p + 2p = -8$$ $$-12p = -11 \Rightarrow p = \frac{11}{12}$$
Back-substitute:
$$f_1 = \frac{2(11/12)+3}{4} = \frac{11/6 + 18/6}{4} = \frac{29/6}{4} = \frac{29}{24} \approx 1.208$$
$$f_2 = f_3 = \frac{11}{12} \approx 0.917$$
$$f_4 = \frac{p}{2} = \frac{11}{24} \approx 0.458$$
Verification (Eq. 4): $\frac{11}{12} + \frac{11}{12} - 4\cdot\frac{11}{24} = \frac{11}{6} - \frac{11}{6} = 0$ ✓
Final Results
| Node | (x,y) | f value |
|---|---|---|
| $f_1$ | (1,1) | $29/24 \approx 1.208$ |
| $f_2$ | (2,1) | $11/12 \approx 0.917$ |
| $f_3$ | (1,2) | $11/12 \approx 0.917$ |
| $f_4$ | (2,2) | $11/24 \approx 0.458$ |
Laplace equation and steady state problems
2079 · 5 marks
Consider a steel plate of size 24cm x 24cm. If two of the opposite sides are held at 100 degree Celsius and the other two opposite sides at 0 degree Celsius, find the steady state temperatures of interior points, assuming a grid size of 8cm x 8cm. [5]
Make Unit 10 stick
Practice BIT203 with flashcards & quizzes