Numerical solution and accuracy
Mechanics and floating-point arithmetic
The chapters State variables and transfer and Stations and equation system reduce the beam problem to a linear equation system. In exact arithmetic, its solution is the solution of the beam equation. The calculation, however, is carried out in the binary64 number format of IEEE 754 with a relative rounding of about per operation. Every operation rounds, and the roundings can amplify in unfavorable models, for example with very short sections next to very long ones or with loads of very different magnitude.1
This chapter therefore separates two questions. The first is mechanical: is the model stably supported and uniquely solvable? The second is numerical: can the solution be demonstrably determined accurately enough with the available numbers? Only if both answers are yes does SpanDraft output a result.
Order of checks
Every calculation goes through the same steps. If a step aborts, no further steps follow, and there is no partial result.
| Step | What is checked | Message on abort |
|---|---|---|
| Model check | complete and valid inputs, positions within the beam, no duplicate supports | Calculation unavailable · Supports missing or incomplete model |
| Supports | exact check of the rigid-body motions, independent of loads and stiffness | Calculation unavailable · Insufficient support |
| Number range | inputs, flexural rigidity, distances, loads and intermediate values lie within the representable range | Calculation not possible |
| Solution | scaling, LU decomposition and iterative refinement without a vanishing pivot element | Calculation not possible |
| Error proof | verified bound for the error of the calculated states | Calculation not possible |
| Output check | error bound of every output value against the output criterion | Calculation not possible |
The check of the supports comes before all numerical steps. A model with unstable supports is therefore always reported as a support problem, even if it were additionally numerically unfavorable. Conversely, “Calculation not possible” is no indication of unstable supports: the model is mechanically uniquely solvable, but the solution cannot be determined with the required certainty.
A special case is a model without load. If all stored loads are exactly zero, the exact solution is zero everywhere. After passing the model, support and range checks, SpanDraft then outputs exact zeros without solving the system. Loads that merely cancel each other do not count; they go through the complete check.
Scaling and solution
The entries of the equation system carry different units: lengths stand next to lengths cubed divided by the flexural rigidity. Their numerical values can differ by many orders of magnitude without this meaning anything mechanically. SpanDraft therefore prepares the system in two steps:
- Nondimensionalization. Lengths, stiffnesses and loads are related to reference quantities of the model. The factors are powers of two. A multiplication by a power of two changes only the exponent in the binary number format and is therefore exact as long as the result stays within the normal number range.
- Equilibration. Rows and columns are scaled iteratively so that their largest entries are of similar size.2 These factors are also rounded to powers of two. The scaling improves the solution but by itself guarantees no accuracy.
The scaled system is solved with an LU decomposition with row interchange (partial pivoting).1 Because each equation couples only neighboring stations, the matrix is sparse within a narrow band; with this band structure, the growth of the intermediate values remains bounded by a constant that does not depend on the number of supports.3 The solution is then improved by iterative refinement: with the residual , a correction is calculated and added. At least one such step is always carried out; under mild conditions, even one step makes the solution componentwise backward stable.4 Further steps follow as long as they improve the solution markedly, at most five.
Why a small residual is not enough
It is common to judge a solution by its residual or an estimated condition number. For a release, this is not sufficient. A small residual means only that the calculated solution solves a slightly altered system exactly; how far it is from the true solution additionally depends on the sensitivity of the system. A condition number describes this sensitivity but is itself only estimated and usually very pessimistic.
Analytical
Fixed thresholds for residual or condition are easy to check. However, they reject some well solvable models and can overlook a large error in others, because they describe the error only indirectly.
SpanDraft
SpanDraft encloses the error of the calculated solution itself. Residual and condition serve only for diagnosis; only the proven error bound decides on the output.
For the bound, the system is considered again with an approximate inverse. If it is proven that this approximation inverts the matrix sufficiently well, an upper bound for the distance between calculated and exact solution follows. All roundings required for this are enclosed with bounds of their own, including the rounding of the input data in the equation system. The bound is then carried on to every output value: through the transfer to the evaluation location, the load integrals and the conversion back to SI units.
Deep dive: error bound, reference quantities and band structure
Verified bound. The basis is a classical theorem of verified numerics.5 If is an arbitrary approximation of the inverse of and holds in a suitable norm, then is nonsingular, and for the calculated solution , the following holds:
SpanDraft uses this idea componentwise with a weighted norm. The rows of are the solutions of the adjoint systems for the individual state components. A contraction factor is required, and the residual is estimated upward together with its own rounding. If the proof of fails, no result is output. Support reactions receive a bound of their own for their jump.
Reference quantities. The reference quantity of a value links the magnitude of the loading with the magnitude of the result. With the reference load from the sum of the force magnitudes, the resultant of the distributed load magnitudes and the moment magnitudes divided by , the beam length and the smallest flexural rigidity , the following holds:
The maxima are formed over all event stations and both sides. For , and reactions, the magnitude of the value itself also counts. For the check, the reference quantities are enclosed with directed rounding downward, so that the threshold is never too generous.
Band structure. If the unknowns are ordered by stations, the matrix has at most two nonzero off-diagonals below and above the main diagonal. This follows from the structure of the transfer, not from a measurement. For band matrices, the growth of the intermediate values with partial pivoting depends only on the bandwidth.3 SpanDraft nevertheless stores the matrix completely; memory requirement and effort of the error proof therefore grow quadratically and cubically, respectively, with the number of supports.
The output criterion
A result is output only if, for every value delivered, the following holds:
Here is the exact value of the model, the proven error bound and the mechanical reference quantity of the value. The check is made at all event stations on both sides, at the support reactions and over the interior of each piece, thus also at every location at which an extreme value lies later. The comparison with uses the exact value with directed rounding, not a rounded error quotient. The bounds themselves are internal calculation quantities and are not displayed.
What the criterion states is narrowly defined:
- Reference. The reference is the exact solution of the beam equation for the input values stored in SpanDraft. Roundings in entering, in converting units or in calculating the cross-section properties are not part of it; only the product is additionally enclosed by SpanDraft.
- Reference quantity instead of individual value. The bound refers to a quantity of the whole beam. It is not a relative accuracy of an individual value: a moment near a zero crossing can be inaccurate relative to itself; in absolute terms, its error remains below of the reference quantity, which comprises the largest moment and the loading of the whole beam.
- No verification of the inputs. The criterion says nothing about whether material, cross-section, loads and supports match reality. Compared with the usual uncertainties of this data, is vanishingly small.
- Values, not locations. For extreme values, the bound applies at the output location. How accurately this location itself is determined is covered in the chapter Continuous results and extreme values.
Ordinary models satisfy the criterion by a wide margin; in the verification, the deviations from the analytical solutions lie many orders of magnitude below the comparison tolerances. There is, however, no commitment as to what share of arbitrary models is delivered. It depends on how sensitive a model is.
When a model is rejected
The help under Troubleshooting guides through the checking of inputs and error messages in the application.
“Calculation not possible” can have several causes, all of which are numerical in nature:
- Number range. An input or an intermediate value leaves the normal number range, for example because a load would become too small after nondimensionalization or a distance power too small. SpanDraft does not silently round such values to zero but rejects them.
- Vanishing pivot element. The decomposition encounters a numerically singular matrix despite stable supports.
- No error proof. The contraction cannot be proven.
- Output criterion missed. For at least one value, the proven bound is larger than .
- Internal self-check. A value is not finite, or an internal consistency check fails.
The bounds are conservative. Even a mechanically stable model whose actual error would be small can therefore be rejected. Closeness alone is no reason for rejection: two supports a few nanometers apart are permissible and are calculated as long as the error proof succeeds. SpanDraft does not change positions, does not use artificial springs or penalty stiffnesses, and does not fall back on a pseudoinverse or another method.
The remedy depends on the cause. The system matrix is determined by geometry, supports and flexural rigidity , and only these quantities influence its condition. With poor conditioning, it usually helps to avoid extreme length ratios or to merge supports lying very close together if their distance plays no mechanical role. Loads, in contrast, change only the right-hand side of the equation system and thus not the condition of the matrix. Extreme load magnitudes or size ratios between loads can leave the representable range or cause a loss of significant digits during evaluation. If they describe the real model correctly, however, they must not be changed for numerical reasons. If the error proof then fails, SpanDraft rejects the calculation instead of outputting an unverified result.
Limits
- The calculation is done in binary64. Small rounding residues in transferred values are neither smoothed nor blanket-set to zero.
- The matrix is stored completely. For single beams with few supports, this is irrelevant; SpanDraft makes no guarantee regarding maximum model size or computation time.
- Many loads in one section make the repeated evaluation of the load integrals more expensive but do not change the equation system.
- Very short pieces far from the coordinate origin can limit how finely the position of an interior extreme value can be represented.
The independent checking of the solver against analytical solutions and external programs is described in the chapter Solver verification.
Sources
- Nicholas J. Higham. Accuracy and Stability of Numerical Algorithms. 2nd edition. Society for Industrial and Applied Mathematics, Philadelphia. 2002. DOI 10.1137/1.9780898718027. Accessed .
- Daniel Ruiz. A Scaling Algorithm to Equilibrate Both Rows and Columns Norms in Matrices. Technical Report RAL-TR-2001-034, Rutherford Appleton Laboratory. 2001. Accessed .
- Zvonimir Bohte. Bounds for Rounding Errors in the Gaussian Elimination for Band Systems. IMA Journal of Applied Mathematics 16 (2). 1975. pp. 133–142. DOI 10.1093/imamat/16.2.133. Accessed .
- Robert D. Skeel. Iterative Refinement Implies Numerical Stability for Gaussian Elimination. Mathematics of Computation 35 (151). 1980. pp. 817–832. DOI 10.1090/S0025-5718-1980-0572859-4. Accessed .
- Siegfried M. Rump. Verification Methods: Rigorous Results Using Floating-Point Arithmetic. Acta Numerica 19. 2010. pp. 287–449. DOI 10.1017/S096249291000005X. Accessed .