Skip to content

feat(openfast): extrapolate the coupled loads between dtM solves - #39

Merged
SMI-Lab-Inha merged 1 commit into
devfrom
feat/load-predictor
Oct 21, 2026
Merged

SMI-Lab-Inha merged 1 commit into
devfrom
feat/load-predictor

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

Second step of the coupled time-step work, after the dtM advisor (#38).

The problem. With dtM larger than the glue DT, CableDyn solves once per nsuper glue steps and held its loads between solves. The platform therefore received them on average dtM/2 late, a first-order lag that acts as negative damping. This is why 0.2.0 defaults to dtM = DT, at four times the mooring cost of dtM = 0.1 s.

The extrapolation. Between solves, the coupled loads are now extrapolated from the last two committed solves:

F = F_c + τ (F_c − F_p), τ = (t − t_c)/dtM clamped to [0, 1]

  • The error is second order in dtM: τ(1+τ) dtM² F̈/2, against the hold's first-order lag.
  • It is used only between consecutive commits (exactly one dtM apart), so the first mooring step keeps the held loads.

How it fits the module:

  • State changes happen in CD_UpdateStates. When a mooring step starts, it shifts the loads served since the last commit into the previous ones. It does not do this on a correction re-entry over the same step. CD_CalcOutput stays state-const.
  • Checkpoint. The previous solve's loads and time go into the OtherState: new registry fields pred_t and pred_loads, with CableDyn_Types.f90 regenerated. A restart therefore continues the extrapolation from the same two commits.
  • Outputs. The output channels and the .CD.out keep the committed samples.
  • Option. Deck OPTIONS predictLoads defaults to True; False keeps the hold. It has no effect at dtM = DT.
  • Unit tests. The arithmetic lives in CableDyn_LoadPredictor, so it can be tested without OpenFAST.
  • Init message. The console note at initialisation says which mode runs.
  • Docs. openfast.rst (time-step note), modeling.rst, faq.rst and options.rst are updated, plus the CHANGELOG.

Measurement

IEA-15 VolturnUS-S, turbulent 600 s DLC-1.6, DT = 0.025 s, against dtM = DT, t ≥ 100 s. Each figure is the RMS of the time-series difference divided by the reference std.

dtM = 0.1 s, held dtM = 0.1 s, extrapolated
Chain + power cable: platform surge / sway / roll / pitch 0.42 / 0.42 / 0.35 / 0.14 % 0.08 / 0.04 / 0.04 / 0.05 %
Chain only: platform surge / sway / roll / pitch — 0.08 / 0.09 / 0.12 / 0.04 %
Chain only: wall time (141 s at dtM = DT, same machine and session) — 116 s

Verification

All runs below are OpenFAST built from this branch. The outputs are compared after the 8-line header, which carries the run date.

  • dtM = DT: the chain and mixed 600 s runs are byte-identical to the references (.out and .CD.out).

  • predictLoads False at dtM = 0.1 s: byte-identical to the held-load run of the previous code.

  • Restart (openfast -restart at 50 s, chain, dtM = 0.1 s):

    • the restart carries the previous solve's loads from the checkpoint;
    • the run continues with the restart's records within 4e-5 of the std of the continuous run's .CD.out.

    Known, pre-existing limit, not introduced here: an openfast -restart at dtM > DT is not bit-identical to the continuous run.

    • Held loads: the same test also differs, by up to 2e-3 of the std on this code.
    • dtM = DT: restarts stay bit-identical, as validated.
    • Plan: I'll fix it in a separate PR.
  • New load_predictor unit test:

    • the readiness rule: consecutive commits only, within 1e-6 dtM, never without a previous commit;
    • the clamping of τ;
    • bit-for-bit committed loads at τ = 0;
    • exact reproduction of a load linear in time;
    • the second-order error τ(1+τ)dtM² for a quadratic load.
  • Full suite (Windows, gfortran, Release, slow tier included): 296/296. Python: 2038 passed. pre-commit run --all-files and the Sphinx build with -W pass. OpenFAST builds with the regenerated registry types.

Checklist

  • pre-commit run --all-files passes
  • ctest --test-dir build --output-on-failure passes
  • python -m pytest tests python/tests passes (if Python or validation records changed)
  • VALIDATION.md updated if a validation result changed (the DLC-1.1 verification follows in its own PR)
  • CHANGELOG.md updated under [Unreleased] (heading added if missing) for user-visible changes
  • Documentation in doc/ updated for changed inputs, options, or outputs
  • Conventional Commit title (feat:, fix:, docs:, ...)
  • Commits are signed off (git commit -s) under the
    Developer Certificate of Origin

With dtM larger than the glue DT, CableDyn solves once per nsuper glue
steps and held its loads between solves, so the platform received them
on average dtM/2 late: a first-order lag that acts as negative damping
of about the mooring stiffness times dtM/2. This is why 0.2.0 defaults
to dtM = DT, at four times the mooring cost of dtM = 0.1 s.

Between solves the loads are now extrapolated from the last two
committed solves, F = F_c + tau (F_c - F_p) with tau the fraction of
the mooring step elapsed, clamped to [0, 1]; the error is second order
in dtM. The extrapolation is used only between consecutive commits, so
the first step keeps the held loads. CD_UpdateStates shifts the served
loads into the previous ones when a mooring step starts (not on a
correction re-entry over the same step), keeping CalcOutput state-const,
and mirrors them into the OtherState (pred_t, pred_loads), so a restart
continues the extrapolation. The output channels and the .CD.out keep
the committed samples. The deck OPTION predictLoads (default True)
switches it; False keeps the hold. The arithmetic lives in
CableDyn_LoadPredictor and is unit-tested.

IEA-15 MW VolturnUS-S, turbulent 600 s DLC-1.6, dtM = 0.1 s against
dtM = DT = 0.025 s: the platform surge, sway, roll and pitch differ by
at most 0.12 % of their standard deviation (0.42 % held), on the chain
and on the chain and power-cable mooring; the chain-only run takes a
fifth less time (116 s against 141 s). Runs at dtM = DT are
byte-identical, and with predictLoads False the outputs equal the held
runs byte for byte.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T09:00:52.303000Z 99d77a5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 99d77a5b1d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35292205 | 📁 Comparing 99d77a5 against latest (d3ddfeb)

  🔍 Preview build  

7 files changed · ± 7 modified

± Modified

@SMI-Lab-Inha
SMI-Lab-Inha merged commit a6439d0 into dev Oct 21, 2026
15 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/load-predictor branch October 21, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant