Using the Finite Difference Method (FDM), please solve the partial differential equation:
$\nabla^2\psi = 0$
Where $\psi(x, y)$ is the stream function in a 2D domain described in Figure 1.
$\psi_1 = Q$
(3,3)
$\psi_1 = Q$
(3,2)
$\frac{\partial\psi}{\partial x} = 0$
$\nabla^2\psi = 0$
$\frac{\partial\psi}{\partial x} = 0$
(3,1)
$\psi_2 = 0$
(0,0)
$\psi_2 = 0$
Figure 1: Domain where the PDE $\nabla^2\psi = 0$ is valid with the appropriate boundary conditions.
The boundary conditions for the PDE are:
a) $\psi = Q$ in the entire horizontal top edge of the domain ($0 \le x \le 3$, $y = 3$),
b) $\psi = Q$ in the partial vertical upper right edge of the domain ($x = 3$, $2 \le y \le 3$),
c) $\psi = 0$ in the partial vertical lower right edge of the domain ($x = 3$, $0 \le y \le 1$),
d) $\psi = 0$ in the entire horizontal lower edge of the domain ($0 \le x \le 3$, $y = 0$),
e) $\frac{\partial\psi}{\partial x} = 0$ in the entire vertical left edge ($x = 0$, $0 \le y \le 3$),
f) and $\frac{\partial\psi}{\partial x} = 0$ in the partial vertical right edge ($x = 3$, $1 \le y \le 2$).
where Q = 1.