Report#
Please be concise, but include essential elements such as analyses, figures, and explanations that support your answers to the questions.
Part I#
Question 1 (1 pt)
Which expression did you reach for the truncation error of the Crank-Nicolson scheme?
Copy here your answer of Task 1.1. Including the mathematical formulations is sufficient, but you may want to add comments on what was done for clarity.
First, we replace the numerical solution \(y^n\) by the exact one, that is, \(y(t_n)\). Hence, we consider the following equation for the error analysis
with \(\tau_{\Delta t}\) the truncation error.
Next, we expand the function \(y(t_{n+1})\) using Taylor series till order 3, as follows
with \(y_t\), \(y_{tt}\) and \(y_{ttt}\) the first, second and third derivatives of \(y\) to \(t\), respectively. Note that we have truncated the Taylor series after third order since we expect second order accuracy approximation for the first derivative (2+1=3).
By substitution we obtain the following expression of the truncation error
Note that we have used the following expressions here:
so that the first two colored terms can be cancelled.
(1pt): the essence is showing that y’’ = \lambda y’ has been used in the Taylor expansion. If this was not shown, then 0.5 pt.
Question 2 (0.5 pt)
Given the test equation
Why does \(\lambda\) have to be negative? Include in your answer what happens to the solution when \(\lambda > 0\) and \(\lambda < 0\).
Write your answer here.
The solution of the test equation is given by
where \(y_0\) is the integration constant that can be determined by an initial condition.
Clearly, when \(\lambda > 0\) the solution is continuously increasing in such a way that \(y(t) \rightarrow \infty\), if \(t \rightarrow \infty\). This implies that the test equation with \(\lambda > 0\) is an ill-posed problem. (Its solution is not bounded.)
On the other hand, if \(\lambda < 0\), then \(y(t) \rightarrow 0\) for \(t \rightarrow \infty\), so that the solution remains stable. Therefore, we required for the above test equation that \(\lambda < 0\).
(0.5pt): showing either by formula’s or graph is okay
Question 3 (1 pt)
Provide a brief explanation with two figures from Tasks 1.3 and 1.4 on how you arrived at the final time steps of both Crank-Nicolson and forward Euler schemes in such a way that they are sufficiently accurate. Base your explanation on the concept of order of accuracy. Include any relevant quantitative values and graphs.
The solution to the advection-diffusion equation obtained with the Crank-Nicolson (trapezoidal rule) is depicted in the following graph.
The final time step with which the solution has converged was \(\Delta t = 500\) s, corresponding to Courant number \(\sigma = 2.5\).
With respect to the forward Euler scheme, its solution is plotted here.
The final solution was obtained with \(\Delta t = 20\) s (the corresponding Courant number is 0.1). Even with that small time step / Courant number the solution is still not converged (see the difference in color near the maximum of the profile). This implies that the order of accuracy of the forward Euler scheme is lower than that of the trapezoidal rule. Indeed, the latter scheme is second order in time while the former is first order accurate.
(1 pt): only showing graphs is 0.5 pt, while including an explanation is another 0.5 pt
Part II#
The following five questions are related to Task 2.1 of the notebook. You may copy your answers from this task directly.
See also the following figure of Task 2.1.
Question 4 (0.5 pt)
Which of the schemes has the most numerical diffusion?
The BTCS scheme. (This is due to the backward Euler scheme.)
Question 5 (0.5 pt)
For what value of \(\theta\) is the numerical diffusion the largest?
\(\theta = 1\). (One can proof that this value corresponding to backward Euler produces the most diffusion.)
Question 6 (0.5 pt)
For what value of \(\theta\) is there no numerical diffusion?
\(\theta = \frac12\). (This is general the case.)
Question 7 (0.5 pt)
Which of the two contributions to numerical diffusion has the largest impact?
the first order upwind scheme or
the \(\theta\)-method
The \(\theta\)-method. (This is general the case.)
Question 8 (0.5 pt)
Which of the schemes gives a non-negative solution?
The FTBS scheme. (Note: other schemes produce negative values in the front of the box-profile!)
For all in Part 2: no explanation is needed, just numbers and/or name of the scheme.
Part III#
Question 9 (1 pt)
Provide here a figure of the results according to Task 3.1. In your answer, comment on the cases without and with diffusion include the corresponding values of \(K\). What is the mesh Péclet number?
The figure for Task 3.1 is plotted here.
The case without diffusion (\(K=0\)) represents a propagated substance along the river as shown by the green curve. Its shape is fixed throughout the propagation. However, the Crank-Nicolson scheme is not able to conserve this block-shaped profile. The associated numerical solution contains wiggles as the scheme does not have numerical diffusion.
The case with diffusion (\(K = 55\) m2/s) represents a propagated substance while it spreads in the river as time proceeds. So its shape becomes more smooth during its journey through the river and also takes the shape of a Gaussian bell curve.
The Crank-Nicolson scheme seems to be able to reproduce this curve (see blue curve) because the mesh Péclet number = \(0.35 \times 100 / 55\) = 0.64 is less than 2. Also note that this scheme has no numerical diffusion so the smoothing is caused solely by physical diffusion.
(1pt): at least an explanation of the notion of physical diffusion must be included, if not then 0.5 pt less
Question 10 (1 pt)
Provide here two figures from Tasks 3.2 and 3.3, respectively.
The FTCS solution of Task 3.2 is plotted here which is unstable.
The FTCS solution of Task 3.3 is plotted here which is stable.
Derive the stability limit for the FTCS scheme. Show your derivation!
See the MUDE book. The stability condition is given by
Provide here your explanation and conclusions based on your findings. Include any calculations you made to reach your conclusions, and any recommendations for modifying any parameters, if at all.
With \(K = 55\) m2/s, \(\Delta x = 100\) m and \(\Delta t = 0.75\Delta x/v = 0.75 \times 100 / 0.35 = 214.3\) s, we obtain
This explains the plot of Task 3.2. We should therefore decrease the time step such that the solution becomes stable. It is given by
and the corresponding solution is plotted above.
(1pt): if derivation has not been given then 0.5 pt less
Question 11 (1 pt)
Provide here two figures from Tasks 3.4 and 3.5, respectively.
The FTBS solution of Task 3.4 is plotted here which is unstable.
The FTBS solution of Task 3.5 is plotted here which is stable.
Derive the stability limit for the FTBS scheme. Show your derivation!
The difference with the FTCS scheme here is the addition of the numerical diffusion which is given by
Hence, we should consider the total diffusion coefficient of \(K + K_a\) instead of just the physical diffusion coefficient \(K\). For instance, the stability condition is like the previous one except that we now have the following condition for FTBS
Provide here your explanation and conclusions based on your findings. Include any calculations you made to reach your conclusions, and any recommendations for modifying any parameters, if at all.
First, we calculate the amount of numerical diffusion which reads
Furthermore, \(K = 55\) m2/s, so that the total amount of diffusion is 72.5 m2/s. The maximum time step for a stable solution is then
So, the solution obtained with \(\Delta t = 90.9\) s is thus unstable but the solution with a time step of smaller than 69 s is stable.
(1pt): idem dito, however, there is an alternative to show stability by requiring non-negative solutions, which also okay!
Question 12 (1 pt)
Provide a figure that shows three stable numerical solutions of the advection-diffusion equation with \(v= 0.35\) m/s and \(K = 55\) m2/s, namely,
the one obtained from Crank-Nicolson with central differences (Task 3.1),
the one obtained from stable FTCS scheme (Task 3.3), and
the one obtained from stable FTBS scheme (Task 3.5).
The three stable solutions of Tasks 3.1, 3.3 and 3.5 are plotted here.
Answer the following questions.
Which of the schemes is the most accurate one? Why?
Which of the numerical solutions has the largest maximum? Why? You may include numerical values to help illustrate your answer.
The answers are:
The Crank-Nicolson scheme because it is second order accurate both in time and space and does not contain numerical diffusion.
The FTCS scheme because the forward Euler scheme produces negative amount of diffusion which implies a larger maximum.
(1pt): the essence is the second part of the question, namely, “negative amount of diffusion” which is graded with 0.5 pt.
End of file.