Question 16.17: A Poisson equation uxx + uyy = 4(x + y) is defined over a do...
A Poisson equation u_{x x}+u_{y y}=4(x+y) is defined over a domain 0 ≤ x, y ≤ 0.75 with the following boundary conditions,
u = 0 on the sides x = 0, 0.75 and y = 0 (Dirichlet conditions)
\frac{\partial u}{\partial y}=u \text { on } y=0.75 (Neumann condition)
Solve the given Poisson equation by dividing the domain into squares of side 0.25. Approximate the derivative boundary condition with the central difference, and use Gauss–Seidel method.
Learn more on how we answer questions.
Nodes in the directions of variables x and y are x_0=0, x_1=0.25, x_2=0.5, x_3=0.75 and y_0=0, y_1=0.25, y_2=0.5, y_3=0.75 respectively. The following figure shows the boundary conditions u = 0 on the sides x = 0, 0.75 and y = 0.
On replacing the derivative boundary condition at the boundary y = 0.75 \left(y=y_3\right) with the central difference, we have
\begin{aligned} &\frac{\partial u\left(x_i, y_j\right)}{\partial y}=\frac{u_{i, j+1}-u_{i, j-1}}{2 h}=u_{i j} \\ &\frac{\partial u\left(x_i, y_3\right)}{\partial y}=\frac{u_{i’4}-u_{i’2}}{0.5}=u_{i 3} \end{aligned}
u_{i, 4}=u_{i, 2}+0.5 u_{i 3} (16.85)
This formula can be used for the hypothetical values at j = 4. In another way, we are extending the boundaries to compute the required mesh values at j = 3. Using the central differences for derivative terms in the Poisson equation, we have
\begin{aligned} u_{i+1, j}+u_{i-1, j}+u_{i, j+1}+u_{i, j-1}-4 u_{i, j} &=h^2 f\left(x_i, y_j\right) \\ &=(0.25)^2 4\left(x_i+y_j\right) \\ &=(0.25)\left(x_i+y_j\right) \end{aligned}
Using different values of i, j at the mesh points, we have
\begin{array}{ll} \text { At }(1,1) & u_{21}+u_{01}+u_{12}+u_{10}-4 u_{11}=.125 \\ \text { At }(2,1) & u_{31}+u_{11}+u_{22}+u_{20}-4 u_{21}=.1875 \\ \text { At }(1,2) & u_{22}+u_{02}+u_{13}+u_{11}-4 u_{12}=.1875 \\ \text { At }(2,2) & u_{32}+u_{12}+u_{23}+u_{21}-4 u_{22}=.25 \\ \text { At }(1,3) & u_{23}+u_{03}+u_{14}+u_{12}-4 u_{13}=.25 \\ \text { At }(2,3) & u_{33}+u_{13}+u_{24}+u_{22}-4 u_{23}=.3125 \end{array}
Equation (16.85) is used to replace the values of u_{14} \text { and } u_{24} from last two equations.
Therefore, we are left with following six equations with six unknowns.
\begin{aligned} &u_{21}+u_{12}-4 u_{11}=.125 \\ &u_{11}+u_{22}-4 u_{21}=.1875 \\ &u_{22}+u_{13}+u_{11}-4 u_{12}=.1875 \\ &u_{12}+u_{23}+u_{21}-4 u_{22}=.25 \\ &u_{23}+2 u_{12}-3.5 u_{13}=.25 \\ &u_{13}+2 u_{22}-3.5 u_{23}=.3125 \end{aligned}
Applying Gauss–Seidel method, we have following iterations
Iteration 1 | |||||
–0.139828 | –0.087054 | –0.089844 | –0.054688 | –0.054688 | -0.031250 |
Iteration 2 | |||||
–0.171138 | –0.141593 | –0.144890 | –0.105748 | –0.083984 | –0.058594 |
Iteration 3 | |||||
–0.182234 | –0.159801 | –0.165518 | –0.138167 | –0.102768 | –0.078683 |
Iteration 4 | |||||
–0.186505 | –0.166660 | –0.173609 | –0.151076 | –0.111125 | –0.091484 |
Iteration 5 | |||||
–0.188174 | –0.169328 | –0.176781 | –0.156142 | –0.114477 | –0.096800 |
Iteration 6 | |||||
–0.188828 | –0.170372 | –0.178025 | –0.158129 | –0.115797 | –0.098905 |
Iteration 7 | |||||
–0.189084 | –0.170781 | –0.178512 | –0.158907 | –0.116314 | –0.099731 |
Iteration 8 | |||||
–0.189184 | –0.170942 | –0.178703 | –0.159212 | –0.116517 | –0.100055 |
After 8 iterations, we have
\begin{array}{lll} u_{11}=-0.100055 & u_{21}=-0.116517 & u_{12}=-0.159212 \\ u_{22}=-0.178703 & u_{13}=-0.170942 & u_{23}=-0.189184 \end{array}
