Report#

Part 1: Implicit Euler scheme and Newton-Raphson method#

1.1 To solve for \(c_{i+1}\) using the implicit Euler method, an iterative scheme (in this case: Newton-Raphson) was needed. Briefly explain why this is necessary for the ODE in the assignment.

The ODE is non-linear and therefore, the expression on the right-hand-sight of the implicit Euler scheme is also non-linear in \(c_{i+1}\). We can thus not rearrange the equation to directly solve for \(c_{i+1}\).

1.2 The expression for the concentration in the Newton-Raphson scheme is given by: $\(c_{i+1}^{j+1} = c_{i+1}^j - \frac{q(c_{i+1}^j)}{q^\prime(c_{i+1}^j)}\)\( What do the two indices \)i\( and \)j$ refer to?

The index \(i\) refers to the time step, whereas the index \(j\) refers to the iteration in the Newton-Raphson scheme.

Part 2: Adams-Bashforth method#

2.1 Is the Adams-Bashforth method an implicit or an explicit method? Briefly motivate your answer.

The Adams-Bashforth method is explicit since the solution at the new time (\(y_{i+1}\)) requires evaluating the ODE only at previous time points (\(f(y_i)\) and \(f(y_{i-1})\)).

2.2 When you used the Adams-Bashforth method for solving the ODE, you needed to use a different numerical scheme (in your case: explicit Euler) for the first time step. Explain why this is necessary.

The Adams-Bashforth method requires evaluating the ODE at two previous time points. At the first time point, only a single previous value (the initial value) is available. Therefore, a second value must first be generated with a different scheme (initialization).

Part 3: Numerical stability and accuracy#

3.1 In the notebook, you varied the time step for the implicit and explicit Euler scheme and the Adams-Bashforth method. Interpret your results in terms of the stability of the schemes.

The solution of the explicit Euler scheme and the Adams-Bashforth method become unstable when the time step becomes large (15 days) – their absolute value keeps getting bigger and bigger (they diverge). In contrast, the implicit Euler scheme remains stable at large time steps. Even though the solution also becomes less accurate, it still converges to zero (the steady state).

3.2 Which numerical scheme would you choose for the ODE in the assignment? Motivate your answer with concrete examples of advantages and disadvantages of the different methods that you experienced during the assignment.

Any scheme can be chosen, depending on the user’s preferences:

The explicit Euler scheme is straight-forward to implement, but it has low accuracy and becomes unstable at large time steps. An accurate solution therefore requires a very small time step size, making it computationally expensive.

The implicit Euler scheme is unconditionally stable and thus avoids exploding concentrations at large time steps. However, its accuracy is not better than the one of the explicit Euler scheme. Also, the required Newton-Rapshon iterations make it more computationally expensive. They also require calculating derivatives of the non-linear ODE which is laborious and error-prone when done by hand.

The Adams-Bashforth method is more accurate than the Euler schemes. However, at large time steps it can also become unstable.

By Anna Störiko and Ronald Brinkgreve, Delft University of Technology. CC BY 4.0, more info on the Credits page of Workbook.