Repository navigation
pyBmodes 1.19.0
Highlights
Frequencies no longer depend on how many modes you ask for. Every blade and tower below the 500-DOF sparse threshold went through a dense solve whose error on the lowest modes was several percent and moved with n_modes. On the bundled NREL 5MW blade the first flap mode read anywhere from 0.710 to 0.766 Hz depending on the request. The dense path now solves the inverted pencil, agrees with the sparse path to roundoff and returns the same modes for any n_modes. Expect dense-path frequencies to shift by up to the old error, about 5 % on the lowest NREL 5MW blade modes and about 0.3 % on the tower.
Floating models built from OpenFAST decks get their roll and pitch back. A WAMIT .hst leaves out the body weight, which OpenFAST adds through ElastoDyn. from_elastodyn_with_mooring and from_windio_floating now add it, so a ballast-stabilised spar is no longer read as unstable. OC3 Hywind returns all six rigid-body modes, matching Jonkman (2010) to within 1.4 %. Ballast declared as HydroDyn filled members is now lumped into the platform too, which puts the OC4 DeepCwind semi at 1.3476e7 kg with its centre of mass 13.460 m below MSL, against 1.3473e7 kg and 13.46 m in Robertson et al. (2014).
NumPy 1.26 works again. Several code paths used np.trapezoid, which only exists from NumPy 2.0, so on the supported floor every Tower.run() failed.
The bundled reference decks and floating samples were regenerated. Every deck verdict is unchanged.
Details
Changed
- Reference decks regenerated with the corrected dense solver. The
six patched ElastoDyn decks underreference_decks/carry mode shapes
from then_modes-independent solve described under Fixed, so their
polynomial coefficients shift, typically by a few percent on the blade
flap and edge blocks (NREL 5MWBldFl1Sh(3)2.612 → 2.590) and by
less on the tower blocks. Every block keeps its verdict: all PASS,
apart from the documentedTwSSM2ShWARN on IEA-15 UMaine VolturnUS-S.
Fixed
-
Dense symmetric solves depended on how many modes were requested.
The dense path reducedK x = λ M xthrough a Cholesky factor of the
mass matrix, and a backward-stable symmetric eigensolver gets each
eigenvalue of the reduced matrix only to an absolute accuracy of
abouteps · λ_max. The ElastoDyn adapters floor rotary inertia at
1e-6, which putsλ_max / λ_minnear 1e15, so the lowest modes carried
errors of several percent that moved with thesubset_by_index
window. On the bundled NREL 5MW blade at 12.1 rpm the first flap mode
read 0.7154 / 0.7096 / 0.7661 / 0.7282 Hz forn_modes= 4 / 6 /
10 / 20, and first edge 1.1221 / 1.1184 / 1.0884 / 1.1303 Hz; the tower
fore-aft / side-side pair moved and swapped. Every model below the
500-DOF sparse threshold took this path — every ElastoDyn blade and
tower.The dense path now solves the inverted pencil
M x = μ (K + s M) x,
μ = 1 / (λ + s), which puts the wanted modes at the top of the
spectrum where the same absolute accuracy is a relative one — the
shift-invert transformation the sparse path already used. The shift is
zero whenKis positive definite and is otherwise grown from an
estimate of the lowest eigenvalues untilK + s Mfactorises, so
rigid-body modes and the negative eigenvalues of a column loaded past
buckling are still returned. A request reaching into the upper half of
the spectrum takes those modes from the mass-reduced form, which is the
accurate one there. Results are now independent ofn_modesand agree
with the sparse path to roundoff: blade flap1 / edge1 / flap2 =
0.72865 / 1.09754 / 2.00842 Hz at every window, tower 1st pair
0.33483 / 0.33561 Hz, backward error ~1e-10 (was ~5e-2). Frequencies of
every dense-path model change by up to the old error — on the NREL 5MW
blade up to ~5 % on the lowest flap / edge modes, on the tower ~0.3 %.When one strongly negative eigenvalue forces a shift much larger than
the soft end of the spectrum, those soft modes all map to the sameμ
to working precision. The window is then grown until its edge falls in
a resolvable gap, and each such cluster is re-solved by Rayleigh-Ritz
on its own subspace, so the soft modes come back in order and
independent ofn_modes(K = diag(−1e16, 1, 2, 3, 4)returns
[−1e16, 1]for two modes, not[−1e16, 4]).The mass-reduced form is kept as the fallback for a pencil no shift
makes definite, and the residual retry of 1.18.0 still stands behind
it; the near-singular-mass case it was built for now solves directly
on the dense path without a retry or a warning.
tests/test_campbell.py::test_first_flap_lifts_endpoint_to_endpoint,
which sat at 2.95 % against its 3 % gate on some BLAS builds, now
measures 7.6 %. -
Floating models built from OpenFAST decks lost their roll and pitch
modes.Tower.from_elastodyn_with_mooringtook the restoring from
the WAMIT.hst, which holds only the hydrostatic part
ρ g I_wp + ρ g V z_B. OpenFAST adds the body weight through
ElastoDyn's gravity; the model did not, so a ballast-stabilised spar
read as unstable — OC3 HywindC44 = C55 = −5.0e9 N·m/rad— and the
general eigensolver silently dropped the two negative-eigenvalue modes,
returning four of the six rigid-body modes. The constructor now adds the
weight restoring−g Σ mᵢ (zᵢ − z_ref)of the platform, the tower and
the RNA tohydro_K(+6.17e9 N·m/rad on OC3: +6.58e9 of ballast,
−0.41e9 of tower and RNA). It is added only when a HydroDyn deck is
given, since weight without the buoyancy that balances it does not
describe a floating body.Tower.from_windio_floatingadds the same
term in both of its tiers, so the deck-backed tier stays equivalent to
from_elastodyn_with_mooring. OC3 Hywind from the r-test decks now
gives surge / sway / heave / roll / pitch / yaw = 0.00806 / 0.00806 /
0.03241 / 0.03383 / 0.03383 / 0.04121 Hz against Jonkman (2010)
0.0080 / 0.0080 / 0.0324 / 0.0342 / 0.0343 Hz (roll and pitch were
absent before). Yaw is the catenary-only value; the published 0.1210 Hz
includes an additional 9.834e7 N·m/rad crowfoot spring the r-test
MoorDyn deck does not carry. The coupled first tower pair moves from
0.4887 / 0.4903 to 0.4922 / 0.4938 Hz. -
A negative-stiffness rigid-body mode is no longer dropped silently.
Tower.runon a free-free floating model now warns (UserWarning)
whenhydro_K + mooring_Khas a negative direction, naming the
dominant DOFs: the platform is statically unstable there and the
general solver leaves those modes out of the result. -
Ballast held in HydroDyn filled members was missing from floating
models. Some decks keep their water ballast out of ElastoDyn's
PtfmMassand declare it as HydroDyn filled-member groups, which
OpenFAST applies through HydroDyn at run time. The OC4 DeepCwind semi
is the standard case, with 3.852e6 kg of steel inPtfmMassand
9.62e6 kg of water in two fill groups.Tower.from_elastodyn_with_mooring
and the deck-backed tier ofTower.from_windio_floatingnow read the
joints, cross-sections, members and fill groups of the HydroDyn deck
and lump the fill into the platform as the rigid, body-fixed ballast
HydroDyn models it as: mass, centre of mass and full 3×3 inertia about
the combined centre of mass. On OC4 this gives 1.3476e7 kg with the
centre of mass 13.460 m below MSL, against 1.3473e7 kg and 13.46 m in
Robertson et al. (2014), NREL/TP-5000-60601. Roll / pitch restoring
goes from −3.8e8 to +9.85e8 N·m/rad and all six rigid-body modes come
back (surge / sway 0.0088, heave 0.0579, roll / pitch 0.0390, yaw
0.0125 Hz); before, the modes labelled roll and pitch were tower
bending. Decks without fill groups are unaffected. Only cylindrical
filled members are supported; a rectangular one raises
NotImplementedErrorrather than being skipped. -
Bundled floating samples regenerated.
08_nrel5mw_oc4seminow
carries the ballasted platform above (its first tower FA mode moves
from 0.4507 to 0.4284 Hz), and09_iea15_umainesemi,
10_iea22_semiand11_upscale25_centraltowernow include the weight
restoring inhydro_K(roll / pitch +3.4e8, +1.3e7 and −1.4e9
N·m/rad; all stay positive). Every sample README picks up the
corrected dense-solver frequencies. -
Tower.add_point_masson a deck-built floater now updates the
weight restoring. The weight term is formed when the model is
constructed, so a lump added afterwards reached the FEM mass matrix but
not the roll / pitch restoring. The lump's−m g (z − z_ref)is now
added tohydro_Kas well, which matches a model rebuilt with the lump
in place. -
NumPy 1.26 support. Several code paths called
np.trapezoid,
which only exists from NumPy 2.0, so on the supportednumpy>=1.26
everyTower.run()(through the pre-solve checks), every ElastoDyn
blade read and every floating constructor failed with
AttributeError. They now share one version-independent trapezoid
helper, and a test keeps the NumPy-2-only spelling out of the package. -
The first tower pair of the IEA-3.4 and IFE UPSCALE 25MW decks is no
longer degenerate. Both towers are symmetric in stiffness, but the
lumped RNA is not (pitch inertia 1.9× and 3.0× roll inertia, plus an
ixzproduct), which splits the first FA / SS pair by 0.09 % and 1.0 %.
The dense solver above, the sparse path and aneigh(M, K)solve all
agree on the split. The old dense path returned the pair degenerate
only because its error on the lowest modes was larger than the split,
and two integration tests had pinned that; they now pin the split. -
WindIO discovery ignored every yaml under a path containing
"OpenFAST". The exclusion meant for theOpenFAST/deck directory of
an RWT layout matched the absolute path, so a checkout living under
e.g.~/OpenFAST-GUI/found no ontology at all. Only the part of the
path below the search root is examined now.