Skip to content

test: compare the linearisation and FAST.Farm runs with MoorDyn - #12

Merged
SMI-Lab-Inha merged 5 commits into
devfrom
docs/linearisation-moordyn
Oct 14, 2026
Merged

SMI-Lab-Inha merged 5 commits into
devfrom
docs/linearisation-moordyn

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

Closes two items of the coupled-route validation backlog and fixes a build note. No solver code changes.

  1. Linearisation compared entry by entry with MoorDyn (validation/scripts/openfast_lin_ab.py). The release check gated only invariants of CableDyn's own stiffness block and reported MoorDyn's zero-frequency reduction D − C A⁻¹ B as unusable (about 14 % asymmetric). OpenFAST writes the .lin matrices in the .fst OutFmt; with the usual 4-digit format, D (about 1e8 N/m) cancels to a 1e4 N/m result. The same case run that way reproduces the asymmetric, sign-flipped block. The check now:
    • writes both twins with OutFmt ES24.15E3, lets MoorDyn settle (TmaxIC 400) and linearises at t = 0 (platform DOFs, still water);
    • refuses a reference with fewer than 10 digits or asymmetric above 1e-3;
    • gates CableDyn against MoorDyn: per-fairlead blocks and the platform 6×6 to 0.5 %.
  2. FAST.Farm shared moorings over 600 s (validation/scripts/fastfarm_shared_ab.py, new). The record rested on one 60 s run with no script in the repository.
  3. MinGW stack for OpenFAST builds (DEVELOPMENT.md): OpenFAST's CMake raises the Windows stack to 16 MB only for Cygwin and Visual Studio builds; a MinGW FAST.Farm.exe built as DEVELOPMENT.md describes keeps 2 MB and overflows in ElastoDyn's initialisation.

Results

Linearisation (IEA-15 MW UMaine twin, examples/openfast decks):

Quantity CableDyn vs MoorDyn
Fairlead stiffness, in-plane (line 1 Kxx 49 741 / 49 706 N/m) 0.07–0.10 %
Fairlead transverse H/X term 0.29 %
Platform 6×6 diagonals (surge 77 211 / 77 156 N/m, roll 2.6473e8 / 2.6466e8 N·m/rad) ≤ 0.10 %
Every 6×6 entry, relative to √(KᵢᵢKⱼⱼ) ≤ 1.0e-3
  • Independent references: standalone CableDyn static solves reproduce the block by finite differences to 1.5e-5, and the transverse term equals the analytic H/X.
  • MoorDyn reference: written with 16 digits and symmetric to 9.4e-6.
  • Low-precision check: with OutFmt ES10.3E2 the script stops: "MoorDyn reference unusable (digits 4, asymmetry 5.66e-01)".
  • Full-system linearisation: roll and pitch are 7.29e6 N·m/rad below the module-level 6×6 for both mooring modules. A run with no mooring and a constant vertical load at the reference point reproduces the shift, so it comes from ElastoDyn/glue, not from the mooring module.

FAST.Farm (r-test MD_Shared, 600 s, statistics from 100 s; identical inputs except Mod_SharedMooring):

Quantity (CD − MD)/MD
Tension means ≤ 0.02 %
Tension minima and maxima ≤ 0.25 %
Platform motions millimetres, 0.001°
Shared-line tension std −2.2 to −2.7 % (−1.0 % at half the mooring step)

The std difference is the step: CableDyn steps implicitly at the 0.05 s coupling step, MoorDyn explicitly at 1e-4 s; halving DT_Mooring halves it. MoorDyn's initial settling does not converge for anchor legs 6 and 7 (2.4 m of excess length at t = 0), a start-up transient over by 100 s that most likely produced the 3 % end of the old 60 s record.

The comparison also found that on a line with no Fixed end (the shared lines), CableDyn's FairTen/AnchTen name the opposite ends from MoorDyn's (MoorDyn writes FairTen at AttachB). The migration guide said "same names"; it now says so, and the script pairs those channels by end.

Tests

  • openfast_lin_ab.py passes end to end, and --skip-run re-checks the same .lin files.
  • fastfarm_shared_ab.py compare reproduces the table above from the 600 s runs. prepare writes two run folders that differ only in Mod_SharedMooring.
  • The -Wl,--stack,16777216 flag gives a 16 MB reserve with this gfortran, and a FAST.Farm executable with a 16 MB reserve runs the farm case.
  • pre-commit run --all-files passes.

Checklist

  • pre-commit run --all-files passes
  • ctest --test-dir build --output-on-failure passes — not applicable, no source changes
  • python -m pytest tests python/tests passes (if Python or validation records changed) — the changed scripts are standalone validation scripts outside the test suites; both were run as described above
  • VALIDATION.md updated if a validation result changed
  • 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

The release check of the OpenFAST linearisation gated only invariants
of CableDyn's own stiffness block (symmetry, restoring diagonals, the
spread's symmetry) and reported MoorDyn's zero-frequency reduction
D - C A^-1 B as unusable: about 14 % asymmetric and violating the
spread symmetry. OpenFAST writes the .lin matrices in the .fst OutFmt,
and with the usual 4-digit format D (about 1e8 N/m) cancels to a 1e4
N/m result; the same case reproduces the asymmetric block that way.

The check now writes both twins with OutFmt ES24.15E3, lets MoorDyn
settle its initial condition (TmaxIC 400 s), linearises at t = 0 in
still water with platform DOFs only, refuses a reference with fewer
than 10 digits or asymmetric above 1e-3, and gates CableDyn against it:
per-fairlead blocks and the platform 6 x 6 to 0.5 %. On the IEA-15 MW
UMaine twin the fairlead stiffness agrees to 0.07-0.10 % (0.29 % for
the transverse H/X term) and the 6 x 6 diagonals to 0.10 %; standalone
static solves reproduce the block by finite differences to 1.5e-5.
VALIDATION.md, RELEASE.md and the manual's Linearisation bullet are
updated.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The FAST.Farm record rested on one 60 s run against stock MoorDyn, with
tension differences from 0.04 % to 3 %, and no script in the repository
reproduced it. fastfarm_shared_ab.py prepares the r-test MD_Shared farm
for both modules (identical inputs except Mod_SharedMooring) and
compares the mooring and platform channels.

Over 600 s, from 100 s on, tension means agree to 0.02 %, minima and
maxima to 0.25 %, and platform motions to millimetres and 0.001 deg.
The shared lines' tension std is 2.2-2.7 % lower with CableDyn and 1.0 %
lower at half the mooring step: CableDyn steps implicitly at the 0.05 s
coupling step, MoorDyn explicitly at 1e-4 s. MoorDyn's initial settling
does not converge for anchor legs 6 and 7, a start-up transient over by
100 s that most likely set the 3 % of the 60 s record.

The comparison also shows that on a line with no Fixed end CableDyn's
FairTen and AnchTen name the opposite ends from MoorDyn's, while the
migration guide said the names were the same; it now says so.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
OpenFAST's CMake raises the Windows stack reserve from 2 MB to 16 MB
only for Cygwin and Visual Studio builds. Built with the MinGW gfortran
of the conda environment, as DEVELOPMENT.md describes, both openfast.exe
and FAST.Farm.exe keep 2 MB, and FAST.Farm stops with a stack overflow
while ElastoDyn initialises the r-test MD_Shared farm; the same
executable with its stack reserve raised to 16 MB runs it. The guide
now adds the linker flag to the configure line.

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 14, 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-14T18:00:32.436730Z 306bf34 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 14, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35149104 | 📁 Comparing 306bf34 against latest (f27c5e3)

  🔍 Preview build  

10 files changed · ± 10 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: 6aeb992aac

ℹ️ 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 validation/scripts/fastfarm_shared_ab.py Outdated
Review found that the farm comparison scored the anchor tension of
anchor leg 4 only, while the record speaks of all four legs, legs 6
and 7 included. The r-test deck writes AnchTen1-AnchTen4 only, so
prepare now adds AnchTen5-AnchTen7 to both runs and compare scores the
anchor and fairlead ends of every leg. Rerun over 600 s: the anchor
tensions of legs 5-7 agree in mean to 0.018 % and in extremes to
0.084 %, inside the record's figures, which stand 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: a4a5188a18

ℹ️ 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 validation/scripts/fastfarm_shared_ab.py
Review found that a FAST.Farm run that stopped after the start of the
window but before TMax would still be compared over the shorter shared
prefix, without a warning. compare now reads TMax from both prepared
runs (they must agree) and refuses any mooring or turbine table that
ends more than one output interval before it (FAST.Farm's MoorDyn
output omits its last row), naming the table. The 600 s runs pass; the
same CableDyn table cut at 500 s is refused.

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. Keep them coming!

Reviewed commit: 306bf34121

ℹ️ 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 1e25ca2 into dev Oct 14, 2026
15 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the docs/linearisation-moordyn branch October 14, 2026 19:22
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