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:
- Two decks differing only in
OutFmt (ES10.3E2 vs ES18.9E3) produce clean vs
corrupt eigenanalyses from the same simulation.
- Re-truncating the wide-format matrices to 4 significant digits in numpy reproduces the
corrupt eigenvalues to the digit.
- A patched writer (fixed wide format) on a default-
OutFmt deck is clean.
To Reproduce
- Compile
dev (double precision).
- Linearize a parked BeamDyn-blade case with fully populated sectional matrices (e.g. an
IEA reference blade) using the default OutFmt.
- Run any MBC3/eigenanalysis on the
.lin file.
- 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.
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
.linfile itself and is easily misread as a physics or solver defect (we initially did).Evidence that this is purely a write-precision artifact:
OutFmt(ES10.3E2vsES18.9E3) produce clean vscorrupt eigenanalyses from the same simulation.
corrupt eigenvalues to the digit.
OutFmtdeck is clean.To Reproduce
dev(double precision).IEA reference blade) using the default
OutFmt..linfile.OutFmt "ES18.9E3"and observe a clean spectrum.Expected behavior
.linnumeric output round-trips the computed matrices at full working precision, independentof the time-series formatting choice in
OutFmt.Fix
PR #3393 (
f/lin-full-precision): all numeric.linoutput uses a fixedES24.15E3format; tabular time-series output continues to honor the user'sOutFmt.Workaround on released versions: set
OutFmt "ES18.9E3"in any input file used forlinearization.
OpenFAST Version
dev@0160d29a0; double precision, gfortran, RelWithDebInfo, macOS (arm64). The defect islong-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 bothcorrupt BD Campbell diagrams, and decks used to study one must neutralize the other.
Developed with Anthropic Claude (Claude Code) under human direction.