Skip to content

Linearization (.lin) files are written with tabular OutFmt (default ES10.3E2, ~4 significant digits), corrupting wide-dynamic-range Jacobians on disk #3395

Description

@mayankchetan

Bug description

The glue code writes everything in linearization (.lin) files — the Jacobian matrices
(A/B/C/D, dUdu/dUdy, module blocks), the operating-point column, and the header scalars
(including Rotor Speed, which MBC3 postprocessors consume) — using the OpenFAST input's
tabular OutFmt, whose documented default "ES10.3E2" carries only ~4 significant digits.

For models whose state matrices span a wide dynamic range — e.g. BeamDyn blades with fully
populated sectional 6×6 mass/stiffness matrices, where the assembled A spans ~15 orders of
magnitude — 4 digits is not enough to round-trip the matrix through disk. Every downstream
eigenanalysis (openfast_toolbox / pyFAST, MBC3 / Campbell workflows, ACDC) then reports
physically impossible results for a parked, passive structure: spurious positive eigenvalues,
negative damping ratios, and merged or missing modes. The corruption is invisible in the
.lin file itself and is easily misread as a physics or solver defect (we initially did).

Evidence that this is purely a write-precision artifact:

  1. Two decks differing only in OutFmt (ES10.3E2 vs ES18.9E3) produce clean vs
    corrupt eigenanalyses from the same simulation.
  2. Re-truncating the wide-format matrices to 4 significant digits in numpy reproduces the
    corrupt eigenvalues to the digit.
  3. A patched writer (fixed wide format) on a default-OutFmt deck is clean.

To Reproduce

  1. Compile dev (double precision).
  2. Linearize a parked BeamDyn-blade case with fully populated sectional matrices (e.g. an
    IEA reference blade) using the default OutFmt.
  3. Run any MBC3/eigenanalysis on the .lin file.
  4. Observe positive real parts / negative damping for a passive structure; repeat with
    OutFmt "ES18.9E3" and observe a clean spectrum.

Expected behavior

.lin numeric output round-trips the computed matrices at full working precision, independent
of the time-series formatting choice in OutFmt.

Fix

PR #3393 (f/lin-full-precision): all numeric .lin output uses a fixed
ES24.15E3 format; tabular time-series output continues to honor the user's OutFmt.
Workaround on released versions: set OutFmt "ES18.9E3" in any input file used for
linearization.

OpenFAST Version

dev @ 0160d29a0; double precision, gfortran, RelWithDebInfo, macOS (arm64). The defect is
long-standing (format usage predates current dev).

Additional context

Isolated during the BeamDyn rotating-frame linearization investigation (see companion issue #3394 on
spurious spin-softening with RotStates = True); the two defects are independent but both
corrupt BD Campbell diagrams, and decks used to study one must neutralize the other.

Developed with Anthropic Claude (Claude Code) under human direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions