Page 467 - Applied Numerical Methods Using MATLAB
P. 467
456 PARTIAL DIFFERENTIAL EQUATIONS
9.8 PDEtool: GUI (Graphical User Interface) of MATLAB for Solving PDEs
(a) Consider the PDE
2
2
2
∂ u(x, y) ∂ u(x, y) ∂ u(x, y)
4 − 4 + = 0 for 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
∂x 2 ∂x∂y ∂y 2
(P9.8.1)
with the boundary conditions
2y
u(0,y) = ye , u(1,y) = (1 + y)e 1+2y ,
(P9.8.2)
x
u(x, 0) = xe , u(x, 1) = (x + 1)e x+2
Noting that the field of coefficient c should be filled in as
Elliptic c 4-2-21 4-21
in the PDE specification dialog box and the true analytical solution is
u(x, y) = (x + y)e x+2y (P9.8.3)
use the PDEtool to solve this PDE and fill in Table P9.8.1 with the
maximum absolute error and the number of nodes together with those of
Problem 9.2(d) for comparison.
You can refer to Example 9.8 for the procedure to get the numerical
value of the maximum absolute error. Notice that the number of nodes is
the number of columns of p, which is obtained by clicking ‘Export Mesh’
in the Mesh pull-down menu and then, clicking the OK button in the
Export dialog box. You can also refer to Example 9.10 for the usage
of ‘Adaptive Mesh’, but in this case you only have to check the box
on the left of ‘Adaptive Mode’ and click the OK button in the ‘Solve
Parameters’ dialog box opened by clicking ‘Parameters’ in the Solve
pull-down menu, and then the mesh is adaptively refined every time you
click the = button in the tool-bar to get the solution. With the box on the
left of ‘Adaptive Mode’ unchecked in the ‘Solve Parameters’ dialog box,
Table P9.8.1 The Maximum Absolute Error and the Number of Nodes
The Maximum The Number
Absolute Error of Nodes
poisson() 1.9256 41 × 41
PDEtool with Initialize Mesh 0.1914 177
PDEtool with Refine Mesh
PDEtool with second Refine Mesh
PDEtool with Adaptive Mesh
PDEtool with second Adaptive Mesh

