The Newton-Raphson method#

Analysis.NL_method = 'NR', the default, solves the non-linear static problem of Non-linear static analyses under load control: the load factor \(\lambda\) goes from zero to one in increments, and at each increment the equilibrium \(\boldsymbol{R}(\boldsymbol{u}, \lambda) = \boldsymbol{0}\) is solved for the configuration by Newton’s method, with the solver pyfe3d.solver.newton_raphson._solver_NR() and the iterations of pyfe3d.solver.newton_raphson._NR_iterations(). The same iterations correct the increments of the arc-length methods, see Arc-length methods.

Newton’s method at a fixed load factor#

Expanding the residual about the current iterate \(\boldsymbol{u}^{(i)}\) and truncating after the linear term gives the correction that would make the residual vanish if it were linear:

(1)#\[\boldsymbol{K}_T^{(i)} \, \delta \boldsymbol{u} = -\boldsymbol{R}^{(i)}, \qquad \boldsymbol{u}^{(i+1)} = \boldsymbol{u}^{(i)} + \eta \, \delta \boldsymbol{u}, \qquad \boldsymbol{R}^{(i)} = \boldsymbol{F}_{int}(\boldsymbol{u}^{(i)}, \lambda) - \lambda \boldsymbol{F}_{ext}\]

with \(\boldsymbol{K}_T^{(i)} = \partial \boldsymbol{R}/\partial \boldsymbol{u}\) at \(\boldsymbol{u}^{(i)}\), given by calc_kC + calc_kG, and \(\eta = 1\) without line search. When \(\boldsymbol{K}_T\) is the exact Jacobian, the error is squared at each iteration near the solution, quadratic convergence (Crisfield 1991, Sec. 1.2.2, p. 9), and Crisfield’s \(\zeta\) of Convergence criteria falls as \(\zeta^{(i+1)} \sim (\zeta^{(i)})^2\). The tangent stiffness matrix controls only the rate of convergence; the converged configuration is controlled by the residual alone. An approximate tangent, e.g. a missing calc_kG or the symmetric part of an unsymmetric load stiffness, still converges to the same equilibrium when it converges, linearly and in more iterations, which tests/test_solver_newton_raphson.py measures.

The tangent stiffness matrix is factorized with the sparse LU factorization of scipy.sparse.linalg.splu(), valid for unsymmetric matrices, see pyfe3d.solver.static._factorize(): the load stiffness of a follower load needs no symmetrisation. A singular tangent, e.g. at a limit point, does not raise; it stops the iterations of the step, which is then cut, see below.

Full and modified Newton-Raphson#

With full Newton-Raphson, an.modified_NR = False, the default, \(\boldsymbol{K}_T\) is evaluated and factorized at every iteration. With an.modified_NR = True, it is evaluated at the first iteration of each step and then every an.compute_every_n iterations, 6 by default, and its factorization is reused in between, each iteration costing only one evaluation of the internal forces and a forward and backward substitution; the convergence is then linear (Crisfield 1991, Secs. 1.2.2 and 1.2.3, pp. 8-13). With an.kT_initial_state = False, the first iteration of the first step uses \(\boldsymbol{K}_{C0}\) instead of the tangent of the initial state, which differ when the initial state is already stressed or deformed, e.g. with initial imperfections in the callables. The modified method pays off when the factorization dominates the cost and the path is mildly non-linear; near limit points and with tight tolerances the full method is the robust choice.

Increments#

The increments of the load factor are controlled by the attributes of Analysis and by the module constants of pyfe3d.solver.newton_raphson:

  1. The first increment is an.initialInc, 0.1 by default, and its predictor is the linear solution scaled by it, \(\Delta \boldsymbol{u} = \Delta \lambda \, \boldsymbol{K}_{C0}^{-1} \boldsymbol{F}_{ext}\), the solution of the first Newton iteration from the undeformed state. When calc_fext declares lbd, e.g. under prescribed displacements, \(\boldsymbol{F}_{ext}\) is replaced by \(-\partial \boldsymbol{R}/\partial \lambda\) at \(\boldsymbol{u} = \boldsymbol{0}\), \(\lambda = 0\), which is not null under a prescribed displacement alone, see Load- and configuration-dependent loads.

  2. Each next increment starts from the converged increment of the configuration of the previous step, scaled by the ratio of the new and the previous load increments, a secant extrapolation of the path.

  3. After a step that converged without being cut, the load increment is multiplied by INC_GROWTH_FACTOR \(= 1.1111\), up to an.maxInc.

  4. A step that fails is repeated from the last converged state with the load increment multiplied by INC_CUT_FACTOR \(= 0.5\); the analysis stops, keeping the converged increments, when the increment falls below an.minInc.

  5. A step that would end within max(an.minInc, 1e-12) of the load factor 1.0, or beyond it, is replaced by the step to 1.0 exactly, such that a completed analysis ends with an.increments[-1] == 1..

A step fails when the iterations are stopped by pyfe3d.solver.newton_raphson._check_divergence() or by a singular tangent. With \(r_i\) the norm of the residual at the iteration \(i\) of the step, in the norm of the convergence criterion, the iterations stop at iteration \(j\) when \(r_j\) is not finite; when an.maxNumIter corrections, 30 by default, were done; and, after NUM_ITER_BEFORE_DIVERGENCE_CHECK \(= 5\) iterations, when the residual diverges, \(r_j > 10^3 r_1\), or decreases too slowly,

(2)#\[\min(r_{j-W+1}, \ldots, r_j) > (1 - \tau) \min(r_1, \ldots, r_{j-W})\]

with \(W\) = TOO_SLOW_WINDOW \(= 5\) and \(\tau\) = an.too_slow_TOL, 0.005 by default. The checks are delayed because a non-monotonic residual in the first iterations is normal, especially in post-buckling, and they compare norms of the same step only, which with Crisfield’s criterion do not depend on the units of the dofs.

Beyond a limit point of the load, load control has no nearby equilibrium: the step is cut until an.minInc, or the iterations converge to a configuration on another part of the path. Such paths are traced with Arc-length methods.

Verification#

tests/test_solver_newton_raphson.py checks the iterations on analytic problems with exact tangents, hardening springs, the shallow von Mises truss of Crisfield (1991, Sec. 1.2, Eq. (1.7)) and a linear problem: equilibrium, the solution of a dense Newton-Raphson reference, the measured convergence orders, quadratic with the exact tangent and with the line search, linear with the modified method and with an inconsistent tangent, the step cutting and the bookkeeping of the load factor. tests/test_solver_nonlinear_static.py and tests/test_nonlinear_static_newton_raphson.py check the quadratic convergence of the models of plates and beams of the elements.

References#

  • Crisfield, M. A., Non-linear Finite Element Analysis of Solids and Structures, Volume 1: Essentials, John Wiley & Sons, Chichester, 1991.

  • Dennis, J. E., Jr. and Schnabel, R. B., Numerical Methods for Unconstrained Optimization and Nonlinear Equations, SIAM, Philadelphia, 1996 (first published by Prentice-Hall, Englewood Cliffs, NJ, 1983). https://doi.org/10.1137/1.9781611971200