Skip to content

feat(openfast): warn when line nodes lie outside the SeaState wave grid - #24

Merged
SMI-Lab-Inha merged 11 commits into
devfrom
feat/seastate-grid-warning
Oct 19, 2026
Merged

SMI-Lab-Inha merged 11 commits into
devfrom
feat/seastate-grid-warning

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

SeaState evaluates its wave kinematics on a grid (X_HalfWidth, Y_HalfWidth, Z_Depth) and clamps any point outside it to the boundary. The grid in r-test's MD_Shared SeaState inputs, reused by the OpenFAST tutorial and examples/openfast, spans 100 m and 40 m depth. That covers the platform but not the moorings, whose nodes reach 840 m out and 200 m deep. Those nodes took the boundary kinematics, and their fluid loads were wrong with no message: SeaState's own clamping notice is a module-initialisation warning, which the OpenFAST glue discards.

  • The warning. The CableDyn shell now checks the positions it samples, at the static equilibrium and at every CableDyn step until it has warned once. It then prints one warning:

    147 of the 153 CableDyn sampling nodes in the water lie outside the SeaState wave-kinematics grid at t = 0 s (warned once) … Farthest: x = −837.6 m (grid |x| ≤ X_HalfWidth = 100 m) … enlarge X_HalfWidth, Y_HalfWidth and Z_Depth …

    The message is built without truncation and drops the farthest-node details if they would not fit.

  • What is checked:

    • Only submerged nodes count: at or below the sampled free surface, or the still water level without wave stretching. A rope or jumper above water does not trigger it.
    • Waves are checked in x, y and depth; a SeaState current in depth only.
    • Nodes below a grid that reaches the seabed are not reported.
    • FAST.Farm and still water sample nothing and check nothing.
    • After the warning the check costs nothing.
  • The tutorial and examples/openfast now enlarge the grid (half-widths 900 m, Z_Depth to the seabed) and quote their results for it. With the MD_Shared grid, the line-1 fairlead tension standard deviation was 18 % too high (0.136 against 0.115 MN).

  • Docs: the manual's OpenFAST page gains a SeaState grid section. A troubleshooting table whose header row sat below two rows is fixed.

Tests

  • OpenFAST build: the module builds. A 10 s IEA-15 MW UMaine run with the MD_Shared grid terminates normally and prints the warning once.
  • Full suite (Windows, gfortran, Release, slow tier included): 265/265. Python: 2007 passed. pre-commit run --all-files and the Sphinx build with -W pass.

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 — no validation result changes
  • 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

SeaState evaluates its wave kinematics on a grid (X_HalfWidth,
Y_HalfWidth, Z_Depth) and clamps a point outside it to the boundary.
The r-test MD_Shared SeaState inputs, which the OpenFAST tutorial and
examples/openfast reuse, span 100 m and 40 m depth: they cover the
platform but not the moorings, whose nodes reach 840 m and 200 m depth.
Those nodes took the kinematics of the grid boundary, and their fluid
loads were wrong without a message: SeaState's own clamping notice is a
module-initialisation warning, which the OpenFAST glue discards.

The shell now checks the positions it samples, at the static
equilibrium and at every CableDyn step until it has warned once, and
prints one warning with the number of nodes outside the grid, the
farthest node in each direction and the SeaState inputs to enlarge.
Waves are checked in x, y and depth, a SeaState current in depth only;
nodes below a grid that reaches the seabed are not reported. FAST.Farm
and still water sample nothing and check nothing. After the warning
the check costs nothing.

The tutorial and examples/openfast now enlarge the grid (half-widths
900 m, Z_Depth to the seabed) and quote their results for it: with the
MD_Shared grid the line-1 fairlead tension standard deviation was 18 %
too high (0.136 against 0.115 MN). The manual's OpenFAST page gains a
SeaState grid section. The troubleshooting table had its header row
below two rows, which now sit under it.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The SeaState grid check counted every line node, so a rope or jumper
above water reaching beyond the grid triggered the warning although it
carries no wave load there. It now runs after sampling and counts only
nodes at or below the sampled free surface (and at or below the still
water level without wave stretching). The message states that it is
issued once in its first sentence and is built without truncation,
dropping the farthest-node details if they would not fit.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Rerun the OpenFAST tutorial cases with the current solver on the
enlarged SeaState grid (CableDyn and MoorDyn, supercycling, still water,
power cable, line failure), on the MD_Shared grid, and on the two refined
grids, and recompute the quoted figures with the same post-processing.

All quoted tensions, statistics, the grid warning and the memory estimate
are unchanged at their printed precision. Three figures change: the
t = 0 Curv4N38 of the power-cable case (9.01821E-02 to 9.01822E-02 1/m),
the grid-refinement bound in the SeaState grid section (less than 0.05 %
to less than 0.1 %, since NX = 73 moves the mean surge by 0.08 %), and
the wall time of the 400 s line-failure run (about 30 s to about 60 s).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The tutorial's run time is about a third SeaState's wave grid (6 of
16 s), not most of it; the quoted dtM console lines match the padding
the shell prints; a test comment quotes the t = 0 FairTen1 of the
example with its enlarged SeaState grid.

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 17, 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 🔄 Running since 2026-10-19T14:20:20.446809Z 4b0abf1 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

read-the-docs-community Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35248114 | 📁 Comparing 4b0abf1 against latest (f27c5e3)

  🔍 Preview build  

29 files changed · ± 29 modified

± Modified

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30502d9211

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

Comment thread src/openfast/CableDyn_OF.f90 Resolved
Under Wheeler stretching (WaveStMod = 3) SeaState interpolates its wave
kinematics at the node depth mapped linearly from [-EffWtrDpth, wave
elevation] to [-EffWtrDpth, 0], not at the node's physical depth. The
wave-grid check compared the physical depth with -Z_Depth, so a node
just above the grid bottom under a crest, whose mapped depth lies below
it, was missed, and one under a trough could be reported needlessly.
The check now uses the same mapping (clamped to the still-water level,
as SeaState does). The other stretching models are unchanged.

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5c9f92abe

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

Comment thread src/openfast/CableDyn_OF.f90 Resolved
Comment thread src/openfast/CableDyn_OF.f90 Resolved
With the host waves off and the host current on, fx_wl takes the
still-water level for CableDyn's wetting, while SeaState still
interpolates the current at the depth Wheeler-mapped with the wave
elevation it sampled. The grid check now keeps that sampled elevation
per node and applies the mapping whenever SeaState stretches with
WaveStMod 3, not only when the host waves are on. The manual says that
a dynamic (InflowWind-driven) current field, read on its own grid, is
not part of the SeaState grid check.

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a46decfff

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

Comment thread src/openfast/CableDyn_OF.f90 Resolved
… check runs

The per-node SeaState elevation that the wave-grid check reads was
allocated on every mooring step, also after the one warning had been
issued. It is now allocated and filled only while the check is still
active; once it has warned, the sampling step allocates nothing.

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d67c3ca7f

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

Comment thread src/openfast/CableDyn_OF.f90 Resolved
SeaState measures its wave field and kinematics grid from the
still-water level, and its node queries take SWL-relative positions,
while the mooring samples it at positions relative to the mean sea
level. With MSL2SWL /= 0 the sampled kinematics, the waterline and the
wave-grid check were all shifted by MSL2SWL. A run with host waves or
current now refuses a nonzero MSL2SWL at initialisation, by name.

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a9736d805

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

Comment thread src/openfast/CableDyn_OF.f90 Resolved
The MSL2SWL refusal ran before the deck's WaterKin policy was known, so a
deck taking both its waves and current from WaterKin (which never queries
SeaState) was refused too. It now runs where the samples are taken, only
when host waves or current are enabled.

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

Copy link
Copy Markdown

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

Reviewed commit: 06d665c47f

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

A dynamically populated current field (an InflowWind-driven MHK
current) is read on its own field, at the node position raised by the
water depth, not on the SeaState grid, so the SeaState grid check did
not cover it. For a gridded (Grid3D) current field the shell now also
checks the submerged sampling nodes against the field's vertical extent
[GridBase, GridBase + 2 ZHWid] and lateral half-width (in the field's
frame when the box is rotated) and warns once, with the farthest
excursion. Other field types have no extent to check.

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 595dd0eaa2

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

Comment thread src/openfast/CableDyn_OF.f90 Resolved
The InflowWind current-grid warning wrote six real values with five ES
descriptors, which raises a runtime I/O error when it fires. The format
now has six; the message was checked with gfortran -fcheck=all.

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

Copy link
Copy Markdown
Owner Author

@codex review

@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/seastate-grid-warning branch October 19, 2026 17:13
@SMI-Lab-Inha
SMI-Lab-Inha restored the feat/seastate-grid-warning branch October 19, 2026 17:13
@SMI-Lab-Inha SMI-Lab-Inha reopened this Oct 19, 2026
@SMI-Lab-Inha
SMI-Lab-Inha merged commit b687d09 into dev Oct 19, 2026
29 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/seastate-grid-warning branch October 19, 2026 20:55
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