The Chartership Forum

Nonlinear Finite Element Analysis / Numerical failure and troubleshooting

Derivative checks and a failure record

Recognise false convergence and singular-tangent failures. Build a reproducible diagnosis from the smallest model that retains the problem.

Lesson review: expert verification remains open

This lesson has received a full-context editorial review and a check of its technical explanations. Selected arithmetic has been checked separately. This is not independent engineering sign-off.

Checks needed for project use

  • General assembled Jacobian diagnosis, residual scaling and production stopping rules. The exaggerated and singular tangents are deliberately introduced scalar faults.
  • Actual browser zoom, screen-reader/additional-browser use and native-fullscreen raster quality remain unqualified.

These are educational models and exercises. Check their assumptions before using the results. The full technical content and every diagram have not yet been independently verified.

Concrete and steel calculations retain their stated first-generation Eurocode teaching basis. Use the standards and amendments specified for your project; do not mix generations without an appropriate design basis.

Read the lesson register and outstanding review notes

What you should already know

Worked example

A tiny correction with no force balance

Given

  • P=1,000 N; initial u=0; correct initial tangent k=10⁶ N/m
  • Faulty tangent Kused=10¹⁵ N/m

Find

Residual, correction and work indicator at the initial guess.

    Scalar equilibrium ku + au³ = P with k = 1 MN/m and a = 10¹⁰ N/m³. Compare the correct derivative, a deliberately inflated tangent and a deliberately zero tangent. The latter two are diagnostic faults, not alternative material laws.

    True residual at the evaluated iterates

    Horizontal: iteration. Vertical: log10 absolute residual (N), drawing floor −8.

    -8.90-5.70.75-2.51.50.692.253.93
    • Evaluated force residual
    Diagnosis
    Equilibrium verified
    Current movement (mm)
    0.990289
    Force residual (N)
    < 10⁻⁵
    Correction estimate (mm)
    -2.165e-13
    Movement criterion alone
    Pass
    Work criterion alone
    Pass
    Force criterion
    Pass

    Acceptance requires both force balance and a small correction. A small correction or residual-times-correction product alone can be misleading. Correct a model or derivative fault before relaxing tolerances.

    A singular tangent needs a mechanical explanation

    The zero-tangent option cannot compute a correction under non-zero load and reports that condition directly. In a real model, a singular or nearly singular matrix can indicate missing restraints, a mechanism, inactive contact, loss of stiffness, a redundant constraint formulation or a genuine limit state.

    Inspect the associated displacement pattern and its relation to supports and active components. Adding a small spring may remove the algebraic singularity while changing the physical problem. If a stabilising spring is deliberately used, report its stiffness, reaction and energy and demonstrate that the quantities of interest are insensitive to reducing it.

    A singular tangent does not by itself distinguish a bifurcation from a force limit. It also does not establish physical collapse. The equilibrium path and admissible modes must be examined with an appropriate control method.

    Check derivatives at a fixed physical state

    Perturb trial displacements while holding committed history fixed, then compare finite differences of the residual with the supplied tangent. Select perturbation magnitudes relative to displacement and stiffness scales. Repeat away from and on each side of active-set or yield switches.

    At a corner, a centred difference crosses two branches and is not the derivative of either branch. Use one-sided checks and inspect the branch selection. For smooth laws, progressively reduce the perturbation until truncation error gives way to floating-point cancellation; a single arbitrarily tiny step is not a reliable test.

    For general FE assembly, check force and moment ordering, transformations, constrained degrees of freedom and external-load derivatives. If a numerical Jacobian converges while the analytical one fails, that is evidence to investigate the derivative implementation, rather than proof that the numerical solve is otherwise qualified.

    Diagnose increments and scaling separately

    A converged step establishes the discrete equilibrium at that target. It does not show that the load increment resolved an important event or that a transient time step resolved the response. Repeat with smaller steps and compare event locations, history variables and energy, not only the final load.

    Mixed translations and rotations require meaningful equation scales. A force residual and a moment residual cannot be combined numerically without stating the units and scaling. Relative tolerances also need a non-zero reference scale when the applied load passes through zero.

    If line search repeatedly reduces a correction, inspect the merit function and trial-state handling. If cutbacks stop at the same load, investigate the physical path and constraints. If the result changes with iteration order, check mutation of committed state, unintended accumulation and non-deterministic assembly.

    Produce a useful failure record

    Keep a reduced reproduction with the smallest geometry, material law and load sequence that retains the fault. Record the software version, numerical parameters, exact stopping condition and an independent expectation. A single spring, material point or two-member assembly often exposes a sign or state error more clearly than a large model.

    Once a demonstrated error is fixed, rerun the affected independent checks and the relevant regression cases. Avoid declaring the whole model verified because one convergence message changed. Calibration, discretisation, boundary conditions and physical interpretation remain separate obligations.

    In the laboratory, the consistent option continues when the work indicator becomes small before the force residual. The deliberately inflated option stops and labels the false-convergence trap. The singular option displays no invented correction or fabricated convergence trace.

    Sources and specialist review

    PETSc convergence and derivative-checking guidance was inspected for residual/correction tests, monitoring and Jacobian comparison. The faulty tangents are deliberate original examples. Production tolerance scaling, mixed equations, mechanisms, solver conditioning and project-specific failure interpretation still require specialist review. The reduced models and worked examples are original. Independent human specialist review remains open. Download the application routines and their mechanics dependency into the same folder to reproduce the calculations. These bounded checks do not qualify a model for design use.