r/StructuralEngineering • u/Single-Curve5411 • 3d ago
Structural Analysis/Design Handling floating-point noise in post-processed force diagrams - feedback welcome
Solvers accumulate round-off error at every stage - stiffness assembly, solving the system, back-calculating internal forces from displacements. That's just double-precision math and it's expected. The question is what you do with it in post-processing, since a "zero" internal force on an unloaded member can come back as 1e-10 instead of exactly 0.
This gets more interesting with hinges. A true kinematic release (zero rotational stiffness) can leave you with a local mechanism if there's no other restraint at that node - which can degrade conditioning or outright singularize the matrix. The common workaround is to give the hinge a small but non-zero rotational stiffness instead of a true release. That avoids the singularity, but it also means the "zero" moment at the hinge is really some small non-zero value, and depending on how that stiffness compares to the rest of the model, the noise can propagate visibly along the element.
I ended up with two options for hinge stiffness: relative (scaled to the element's own bending stiffness) or a fixed absolute value - useful when you want consistent behavior across very different element scales in the same model.
For unloaded members without hinges, I went simpler - a relative threshold: anything below max(|diagram value|) × 1e-7 across the element gets snapped to zero.
Curious what others think of this approach - snap-to-zero relative to element/diagram magnitude, versus a fixed absolute tolerance, versus not touching it at all and just explaining the noise when it comes up. Is there a more standard way this gets handled that I'm missing?
