Skip to content

feat(openfast): range graphs in coupled runs and a SeaState depth-grid note - #90

Merged
SMI-Lab-Inha merged 3 commits into
devfrom
feat/coupled-range-graph
Nov 7, 2026
Merged

SMI-Lab-Inha merged 3 commits into
devfrom
feat/coupled-range-graph

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

Range graphs in coupled OpenFAST runs. The LINES flag r was refused in OpenFAST. A single-turbine coupled run now writes <RootName>.CD.Line<L>.range.out from RangeStart, as the standalone route does.

  • Samples are taken at committed steps, matching the rows of .CD.out; supercycle calls, CalcOutput probes and retried steps add nothing.
  • The accumulators survive a restart. They are double precision whatever ReKi is.
  • The file is written only if the run reaches TMax. A stale file is removed at the start, and a range file that cannot be completed is deleted on any route.
  • FAST.Farm shared moorings and the C API refuse the flag by name. The C API EI = 0 route used to ignore it silently.
  • RangeStart is accepted in coupled decks without TMax.

Checkpoint format: OtherState gains the range state, so checkpoints from earlier builds cannot be restarted.

SeaState depth grid note. The deepest interval of SeaState's cosine grid is coarse, and the current falls linearly across it, so near the seabed the field differs from a deck depth table. doc/openfast.rst says so, and an initialisation note states the interval when it exceeds 5 % of the depth and a line reaches into it (NZ below 33).

Checks

  • Range values against the node channels of .CD.out: worst relative difference 4.2e-7, its print rounding, swept over dtM = 1, 2 and 4 DT and five window starts, in double and single precision.
  • Seven restarts in double precision and two in single: range files bit-identical to the uninterrupted run.
  • Forced retries: no double count. A mid-run abort leaves no file.
  • A deck without the flag: .CD.out and .out identical to 0.4.0, continuous and after a restart.
  • The note fires and stays silent as specified in real OpenFAST runs, and does not change .CD.out.
  • CTest 359 of 359 on the default kernel, with OPENBLAS_CORETYPE=Prescott and in Debug; pytest passes.

The CHANGELOG entry lands with the release batch.

The LINES Outputs flag r and RangeStart now work in OpenFAST as on the
standalone routes: <RootName>.CD.Line<L>.range.out holds the minimum,
maximum and mean at every node over the rows of .CD.out in the window.

The module samples the aggregate once per committed mooring step, at
t = 0 and in CD_UpdateStates after the commit, so an intermediate
supercycle call, a CalcOutput probe and an abandoned step add nothing.
A retried step takes its sample back: CD_AGG_Snapshot/Restore carry the
accumulators, and on the glue's state copy the rebuild reloads them from
the OtherState. The accumulators are double precision on every host
build and ride the checkpoint (OtherState range_state), so a restart
writes the file of an uninterrupted run. This changes the checkpoint
format.

The file is written at the end of a run that reaches TMax. A run that
stops earlier says so and writes none, and the file of an earlier run
goes at initialisation, so nothing stale stands in for the result. A
range file that cannot be completed is now removed on every route.

RangeStart is held against the host's run time: a coupled deck needs no
TMax, and a deck TMax neither clamps nor bounds the window there.

A FAST.Farm shared mooring and the C API refuse the flag by name, the C
API now also on an EI = 0 deck, which it accepted without writing a file.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…grid

SeaState's depth levels are cosine-spaced, so the grid is coarsest at the
bottom: the deepest interval is Z_Depth*sin(pi/(2*(NZ - 1))), about 22 m
at 200 m depth with NZ = 15, and the field is linear across it down to
the seabed, unlike a deck depth table.

The OpenFAST module now says so at initialisation when that interval
exceeds 5 % of the depth (NZ below 33) and a line lies in it, with the
interval, the nodes in it and the NZ that brings it under 5 %. For the
1/7-power current the linear ramp is up to 62 % low whatever the interval
is, so the interval alone sets how much of the column carries the
difference: the depth integral lacks 3/7*(H/D)^(8/7), 1.4 % at the
threshold and 3.5 % at NZ = 15.

The note applies only when waves or a current come from SeaState and the
grid reaches the seabed; a shorter grid has the out-of-grid warning. It
is printed once, at initialisation, and changes no result.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
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 Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T12:16:44.904625Z eee5d76 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.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35718473 | 📁 Comparing eee5d76 against latest (3d04008)

  🔍 Preview build  

9 files changed · ± 9 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: eee5d765d9

ℹ️ 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".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit 10d4df0 into dev Nov 7, 2026
21 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/coupled-range-graph branch November 7, 2026 13:17
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