1.7.4 Newton-Raphson: Implement Implicit Methods on Nonlinear Problems
Measurable Outcome 1.3, Measurable Outcome 1.4, Measurable Outcome 1.12, Measurable Outcome 1.13, Measurable Outcome 1.14, Measurable Outcome 1.19
When the ODE's are nonlinear, implicit methods require the solution of a nonlinear system of algebraic equations at each iteration. To see this, consider the use of the trapezoidal method for a nonlinear problem,
We can define the following residual vector for the trapezoidal method,
Thus, \(v^{n+1}\) for the trapezoidal method is given by the solution of,
which is a nonlinear algebraic system of equations for \(v^{n+1}\).
One of the standard methods for solving a nonlinear system of algebraic equations is the Newton-Raphson method. It begins with an initial guess for \(v^{n+1}\) and solves a linearized version of \(R=0\) to find a correction to the initial guess for \(v^{n+1}\). So, define the current guess for \(v^{n+1}\) as \(w^ m\) where \(m\) indicates the sub-iteration in the Newton-Raphson method. Note, common useage is to call the iterations in the Newton-Raphson solution for \(v^{n+1}\) sub-iterations since these are iterations which occur within every time iteration from \(n\) to \(n+1\). To find the correction, \(\Delta w\), where
we linearize and solve the nonlinear residual equation,
This last line is a linear system of equations for the correction since \({\partial R}/{\partial w}\) is a \(d \times d\) matrix when the original ODE's are a system of \(d\) equations. For example, for the trapezoidal method,
Usually, the initial guess for \(v^{n+1}\) is the previous iteration, i.e. \(w^0 = v^ n\). So, the entire iteration from \(n\) to \(n+1\) has the following form,
-
Set initial guess: \(w^0 = v^ n\) and \(m=0\).
-
Calculate residual \(R(w^ m)\) and linearization \({\partial R}/{\partial w}|_{w^ m}\).
-
Solve Equation 1.134 for \(\Delta w\).
-
Update \(w^{m+1} = w^ m + \Delta w\).
-
Check if \(R(w^{m+1})\) is small. If not, set \(m \leftarrow m+1\) and repeat steps 1 through 4.