Numerical Method · Unit 6 · 5 hrs
Solution of Partial Differential Equations
Exam-focused notes for Solution of Partial Differential Equations (Numerical Method, CSC212): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.
Solution of Partial Differential Equations in short
A partial differential equation (PDE) involves an unknown function of two or more independent variables and its partial derivatives. This chapter reduces PDEs to a grid of algebraic equations that can be solved with the linear-system methods already developed, and applies the idea to the Laplace and Poisson equations that govern steady-state physical fields.
What this unit covers
- Review of partial differential equations
- Classification of partial differential equation
- Deriving difference equations
- Laplacian equation and Poisson's equation
- engineering examples
Laplacian equation and Poisson's equation
2081 · 5 marks
Solve the Poisson equation with boundary conditions:
$$\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = -64xy, \quad 0 \leq x \leq 1, ; 0 \leq y \leq 1$$
$$u(0,y) = 0, ; u(x,0) = 0, ; u(1,y) = 150, ; u(x,1) = 150, ; h = \frac{1}{3}$$
[5]
2080 · 5 marks
Solve the Poisson's equation $\nabla^2 f = xy$ and $f = 2$ on boundary by assuming square domain $0 \leq x \leq 3$ and $0 \leq y \leq 3$ and $h = 1$. [5]
Show solved answerHide answer
Poisson's Equation: ∇²f = xy with f = 2 on Boundary
Given
- PDE: $\nabla^2 f = xy$
- Boundary condition: $f = 2$ on all boundaries
- Domain: $0 \le x \le 3$, $0 \le y \le 3$
- Step size: $h = 1$
Grid points at $x = 0,1,2,3$ and $y = 0,1,2,3$. Interior nodes at $(1,1),(2,1),(1,2),(2,2)$.
Solution
Finite difference form
$$f_{i-1,j} + f_{i+1,j} + f_{i,j-1} + f_{i,j+1} - 4f_{i,j} = h^2 (xy)$$
With $h = 1$, RHS $= xy$ at each node.
Grid layout
y=3: 2 2 2 2
y=2: 2 f3 f4 2
y=1: 2 f1 f2 2
y=0: 2 2 2 2
x=0 x=1 x=2 x=3
- $f_1 = (1,1)$, $f_2 = (2,1)$, $f_3 = (1,2)$, $f_4 = (2,2)$
Equations
f1 at (1,1), xy = 1: $$2 + f_2 + 2 + f_3 - 4f_1 = 1 \Rightarrow -4f_1 + f_2 + f_3 = -3 \quad (1)$$
f2 at (2,1), xy = 2: $$f_1 + 2 + 2 + f_4 - 4f_2 = 2 \Rightarrow f_1 - 4f_2 + f_4 = -2 \quad (2)$$
f3 at (1,2), xy = 2: $$2 + f_4 + f_1 + 2 - 4f_3 = 2 \Rightarrow f_1 - 4f_3 + f_4 = -2 \quad (3)$$
f4 at (2,2), xy = 4: $$f_3 + 2 + f_2 + 2 - 4f_4 = 4 \Rightarrow f_2 + f_3 - 4f_4 = 0 \quad (4)$$
Solving
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 + 3 = -8$$ $$-12p = -11 \Rightarrow p = \frac{11}{12} \approx 0.9167$$
Back-substitution
$$f_2 = f_3 = \frac{11}{12} \approx 0.9167$$
$$f_1 = \frac{2(11/12) + 3}{4} = \frac{11/6 + 18/6}{4} = \frac{29/6}{4} = \frac{29}{24} \approx 1.2083$$
$$f_4 = \frac{p}{2} = \frac{11}{24} \approx 0.4583$$
Verification (Eq. 4)
$$f_2 + f_3 - 4f_4 = \frac{11}{12} + \frac{11}{12} - 4\cdot\frac{11}{24} = \frac{22}{12} - \frac{44}{24} = \frac{11}{6} - \frac{11}{6} = 0 \checkmark$$
Final Answers
$$\boxed{f_1 = \frac{29}{24} \approx 1.2083,\quad f_2 = f_3 = \frac{11}{12} \approx 0.9167,\quad f_4 = \frac{11}{24} \approx 0.4583}$$
The complete value is $f_4 = 11/24 \approx 0.4583$.
2079 · 5 marks
Solve the Poisson's equation $\nabla^2 f = 3x^2y$ over the square domain $0 \leq x \leq 3$, $0 \leq y \leq 3$ with $f = 0$ on the boundary and $h = 1$. [5]
Show solved answerHide answer
Poisson's Equation $\nabla^2 f = 3x^2y$ over $[0,3]\times[0,3]$, $f=0$ on boundary, $h=1$
Given
- PDE: $\nabla^2 f = 3x^2y$, so source $g(x,y) = 3x^2y$
- Domain: $0 \le x \le 3$, $0 \le y \le 3$ (square)
- Boundary condition: $f = 0$ on all boundaries
- Mesh size: $h = 1$
Solution
Grid
With $h=1$, interior nodes at $x=1,2$ and $y=1,2$. Four unknowns.
Label (using standard layout):
| $x=1$ | $x=2$ | |
|---|---|---|
| $y=2$ | $f_1$ | $f_2$ |
| $y=1$ | $f_3$ | $f_4$ |
$f_1=f(1,2),\ f_2=f(2,2),\ f_3=f(1,1),\ f_4=f(2,1)$.
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)$$
with $h^2=1$.
Source term $g=3x^2y$
| Node | $x$ | $y$ | $g=3x^2y$ |
|---|---|---|---|
| $f_1$ | 1 | 2 | 6 |
| $f_2$ | 2 | 2 | 24 |
| $f_3$ | 1 | 1 | 3 |
| $f_4$ | 2 | 1 | 12 |
Equations (boundary values = 0)
At $f_1(1,2)$: neighbors $f_2$ (right), $0$ (left), $0$ (top, y=3), $f_3$ (bottom): $$-4f_1+f_2+f_3=6 \quad (1)$$
At $f_2(2,2)$: neighbors $0$ (right), $f_1$ (left), $0$ (top), $f_4$ (bottom): $$f_1-4f_2+f_4=24 \quad (2)$$
At $f_3(1,1)$: neighbors $f_4$ (right), $0$ (left), $f_1$ (top), $0$ (bottom): $$f_1-4f_3+f_4=3 \quad (3)$$
At $f_4(2,1)$: neighbors $0$ (right), $f_3$ (left), $f_2$ (top), $0$ (bottom): $$f_2+f_3-4f_4=12 \quad (4)$$
Solving
Sum of all four: $$-2(f_1+f_2+f_3+f_4)=45 \Rightarrow S = f_1+f_2+f_3+f_4 = -22.5 \quad (5)$$
Subtract (1)-(3): $$(-4f_1+f_2+f_3)-(f_1-4f_3+f_4)=6-3$$ $$-5f_1+f_2+5f_3-f_4=3 \quad (6)$$
Subtract (2)-(4): $$(f_1-4f_2+f_4)-(f_2+f_3-4f_4)=24-12$$ $$f_1-5f_2-f_3+5f_4=12 \quad (7)$$
Solve directly. From symmetry-free direct elimination, use variables.
Add (1)+(3): $-3f_1+f_2-3f_3+f_4=9 \quad (A)$ Add (2)+(4): $f_1-3f_2+f_3-3f_4=36 \quad (B)$
Let $P=f_1+f_3$, $Q=f_2+f_4$. Then $P+Q=-22.5$.
(A): $-3P+Q=9$ (B): $P-3Q=36$
From (A): $Q=9+3P$. Substitute into (B): $P-3(9+3P)=36 \Rightarrow P-27-9P=36 \Rightarrow -8P=63 \Rightarrow P=-7.875$. Then $Q=9+3(-7.875)=9-23.625=-14.625$. Check: $P+Q=-22.5$ ✓
Now subtract (1)-(3): $-5f_1+f_2+5f_3-f_4=3 \quad (6)$ Group as $-5(f_1-f_3)+(f_2-f_4)=3$. Let $U=f_1-f_3,\ V=f_2-f_4$: $$-5U+V=3 \quad (6')$$
Subtract (2)-(4): $f_1-5f_2-f_3+5f_4=12$ $= (f_1-f_3)-5(f_2-f_4)=12 \Rightarrow U-5V=12 \quad (7')$
From (6'): $V=3+5U$. Sub into (7'): $U-5(3+5U)=12 \Rightarrow U-15-25U=12 \Rightarrow -24U=27 \Rightarrow U=-1.125$. Then $V=3+5(-1.125)=3-5.625=-2.625$.
Recover values:
- $f_1=(P+U)/2=(-7.875-1.125)/2=-9/2=-4.5$
- $f_3=(P-U)/2=(-7.875+1.125)/2=-6.75/2=-3.375$
- $f_2=(Q+V)/2=(-14.625-2.625)/2=-17.25/2=-8.625$
- $f_4=(Q-V)/2=(-14.625+2.625)/2=-12/2=-6.0$
Verification in original equations
(1): $-4(-4.5)+(-8.625)+(-3.375)=18-12=6$ ✓ (2): $-4.5-4(-8.625)+(-6.0)=-4.5+34.5-6=24$ ✓ (3): $-4.5-4(-3.375)+(-6.0)=-4.5+13.5-6=3$ ✓ (4): $-8.625+(-3.375)-4(-6.0)=-12+24=12$ ✓
Final Result
$$\boxed{f_1=f(1,2)=-4.5,\quad f_2=f(2,2)=-8.625,\quad f_3=f(1,1)=-3.375,\quad f_4=f(2,1)=-6.0}$$
2078 · 5 marks
Consider a metallic plate of size 90cm by 90cm. The two adjacent sides of the plate are maintained at a temperature of $100^\circ C$ and the remaining two adjacent sides are held at $200^\circ C$. Calculate the steady-state temperature at interior points assuming a grid size of 30 cm by 30 cm. [5]
2077 · 5 marks
A plate of dimension 18cm x 18cm is subjected to temperatures as follows: left side at $100^\circ C$, right side at $200^\circ C$. Upper part at $50^\circ C$, and lower at $150^\circ C$. If square grid length of 6cm x 6cm is assumed, what will be the temperature at the interior nodes? [5]
2075 · 5 marks
Solve the Poisson's equation over the square domain $0 \leq x \leq 1.5$, $0 \leq y \leq 1.5$ with $f = 0$ on the boundary and $h = 0.5$. [5]
Make Unit 6 stick
Practice CSC212 with flashcards & quizzes