Question 6.6: Use the problem in Example 6.2 with φ = 1 to illustrate mesh...

Use the problem in Example 6.2 with φ = 1 to illustrate mesh refinement from n = 3 to n = 7.

The blue check mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.

Recalling the notation of Eq. (6.3.9), we have Δx = 1/2 so α = −2.25. The problem we need to solve is

\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & ··· & 0& 0 & 0 \\ 1 & α & 1 & 0 & 0 & ··· & 0 & 0 & 0\\ 0 & 1 & α & 1 & 0 & ··· & 0 & 0 & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ 0 & 0 & 0 & 0 & 0 & ··· & 1 & α & 1 \\ 0 & 0 & 0 & 0 & 0 &···& 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \\ c_3\\\vdots \\c_{n−1} \\c_n \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\ 0\\\vdots \\0 \\1 \end{bmatrix}                            (6.3.9)

\begin{bmatrix} 1 & 0& 0\\ 1& −2.25 &1\\ 0& 0&1 \end{bmatrix} \begin{bmatrix} c^{(3)}_1 \\ c^{(3)}_2 \\ c^{(3)}_3 \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\1 \end{bmatrix}                                   (6.3.52)

We use the superscript notation to denote the number of nodes in order to keep the numbering convention the same as we change n. The solution to this problem is

\begin{bmatrix} c^{(3)}_1 \\ c^{(3)}_2 \\ c^{(3)}_3 \end{bmatrix}=\begin{bmatrix} 0 \\ 0.4444 \\ 1 \end{bmatrix}                                                                 (6.3.53)

The only value that is of interest is c^{(3)}_2 = c(1/2), since we get the boundary conditions exactly.

For n = 5, we have Δx = 1/4 so

\begin{bmatrix} 1 & 0& 0& 0&0\\1& −2.0625 &1 &0 &0\\0 &1 &−2.0625 &1 &0\\0& 0 &1 &−2.0625 &1 \\ 0 & 0 &0 &0 &1 \end{bmatrix} \begin{bmatrix} c^{(5)}_1\\ c^{(5)}_2\\ c^{(5)}_3\\c^{(5)}_4\\c^{(5)}_5\end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\ 0\\ 0\\ 1 \end{bmatrix} (6.3.54)

Notice that the diagonal entry for the interior nodes has changed, since the value of Δx depends on n. The solution is

\begin{bmatrix} c^{(5)}_1\\ c^{(5)}_2\\ c^{(5)}_3\\c^{(5)}_4\\c^{(5)}_5\end{bmatrix}=\begin{bmatrix} 0 \\ 0.2151 \\ 0.4437 \\ 0.7000\\ 1 \end{bmatrix}                                                  (6.3.55)

To see if we have a sufficiently refined mesh, we want to compare the interior nodes that are the same. For this case we want to look at c^{(3)}_2  and  c^{(5)}_3 , which are at the same point x = 1/2. To evaluate the error, we could use

\epsilon =\frac{\left|c_2^{(3)}-c_3^{(5)}\right| }{\left|c_2^{(3)}\right| } =0.0017                                                  (6.3.56)

So the change in the solution is only 0.2% going from three nodes to five nodes. What if this is not accurate enough for us? After all, we frequently solve problems down to machine precision, which is 10^{−16} or thereabouts. If we want to do another stage of mesh refinement, we should go to n = 9 nodes. The matrix problem becomes

\begin{bmatrix} 1 & 0 & 0 &0 &0 & 0 & 0 & 0 & 0\\ 1 & α & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ 0& 1 &α &1 &0 &0 &0 &0 &0 \\0 &0 & 1 &α &1 &0 &0 &0 &0\\ 0 &0 & 0 &1 &α &1 &0 &0 &0\\ 0 &0& 0& 0& 1& α& 1& 0 &0 \\0& 0& 0& 0& 0& 1& α& 1& 0\\ 0& 0& 0& 0& 0& 0& 1& α& 1\\ 0& 0& 0& 0& 0& 0& 0& 0& 1 \end{bmatrix} \begin{bmatrix} c^{(9)}_1 \\ c^{(9)}_2\\ c^{(9)}_3 \\ c^{(9)}_4 \\ c^{(9)}_5 \\ c^{(9)}_6 \\ c^{(9)}_7 \\ c^ {(9)}_8\\c^{(9)}_9 \end{bmatrix} =\begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\0 \\1 \end{bmatrix}                                                             (6.3.57)

where α = −2.0156 for n = 9. The solution is now

\begin{bmatrix} c^{(9)}_1 \\ c^{(9)}_2\\ c^{(9)}_3 \\ c^{(9)}_4 \\ c^{(9)}_5 \\ c^{(9)}_6 \\ c^{(9)}_7 \\ c^ {(9)}_8\\c^{(9)}_9 \end{bmatrix}=\begin{bmatrix} 0 \\ 0.1067 \\ 0.2150 \\0.3267 \\ 0.4435 \\ 0.5672 \\ 0.6998 \\ 0.8433 \\ 1 \end{bmatrix}                                                          (6.3.58)

The nodes that we now need to compare are at x = 1/4, x = 1/2 and x = 3/4. Let’s define these as the vectors

c^{(5)}_{interior}=\begin{bmatrix} 0.2151 \\ 0.4437 \\ 0.7000 \end{bmatrix}                                                          (6.3.59)

and

c^{(9)}_{interior}=\begin{bmatrix} 0.2150 \\ 0.4435 \\ 0.6998 \end{bmatrix}                                  (6.3.60)

for the two solutions. We can thus assess the improvement in mesh refinement by computing

\epsilon =\frac{\left\|c^{(5)}_{interior}- c^{(9)}_{interior}\right\| }{\left\|c^{(5)}_{interior}\right\| } = 3.4261 × 10^{−4}                                             (6.3.61)

We can continue on in this vein indefinitely, but it becomes tedious to write out the equations. Figure 6.11 shows the results of the mesh refinement where we define the error between the grids as

\epsilon (n^{(old)})=\frac{\left\|c^{(new)}_{interior}-c^{(old)}_{interior}\right\| }{\left\|c^{(old)}_{interior}\right\| }                                                                              (6.3.62)

We can thus use a plot of this type to dial in the desired amount of error in the solution.

6.11

Related Answered Questions

Question: 6.1

Verified Answer:

For each evaluation point, we need to use the Tayl...