Skip to content

feat: cabledyn.current_steps, stepped-current VIV studies in one run - #150

Merged
SMI-Lab-Inha merged 2 commits into
devfrom
feat/stepped-current
Nov 12, 2026
Merged

SMI-Lab-Inha merged 2 commits into
devfrom
feat/stepped-current

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

A stepped-current study holds the current at a sequence of speeds and
lets each step start from the state the previous one left, so the
response follows its branch up and back down; separate runs would each
start from rest. The standalone driver has no restart file, but its
MoorDyn-C Currents 2 table (a depth profile in time) carries the whole
sweep in one run.

current_steps(speeds, hold=, ramp=, direction=) returns a CurrentSteps
schedule: each speed held, then ramped linearly to the next. Its write()
puts current_profile_dynamic.txt in the deck folder (uniform over two
depths), duration is the TMax to give, windows(settle) the analysis
window of every hold, and responses() the viv_response of each. The
table is resampled at its smallest interval, the ramp, so a hold must be
a whole number of ramps (refused otherwise).

Checks: the schedule, the file rows and the refusals
(python/tests/test_viv.py); end to end, the in-line VIV example under
0.10 -> 0.18 -> 0.10 m/s: the lock-in frequency rises with the current
and returns with it. Full pytest, ruff, mypy strict, Sphinx -W.

A stepped-current study holds the current at a sequence of speeds and
lets each step start from the state the previous one left, so the
response follows its branch up and back down; separate runs would each
start from rest. The standalone driver has no restart file, but its
MoorDyn-C Currents 2 table (a depth profile in time) carries the whole
sweep in one run.

current_steps(speeds, hold=, ramp=, direction=) returns a CurrentSteps
schedule: each speed held, then ramped linearly to the next. Its write()
puts current_profile_dynamic.txt in the deck folder (uniform over two
depths), duration is the TMax to give, windows(settle) the analysis
window of every hold, and responses() the viv_response of each. The
table is resampled at its smallest interval, the ramp, so a hold must be
a whole number of ramps (refused otherwise).

Checks: the schedule, the file rows and the refusals
(python/tests/test_viv.py); end to end, the in-line VIV example under
0.10 -> 0.18 -> 0.10 m/s: the lock-in frequency rises with the current
and returns with it. Full pytest, ruff, mypy strict, Sphinx -W.

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 12, 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-12T04:29:45.339921Z 6b77863 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 Nov 12, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35829847 | 📁 Comparing 6b77863 against latest (789cb6d)

  🔍 Preview build  

11 files changed · ± 11 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: 4247124fd7

ℹ️ 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 python/cabledyn/viv.py Resolved
The resampled current table has floor(t_last/dt) + 1 samples and takes
its first sample over its last interval (CD_Current_Grid_Velocity, as
in MoorDyn-C), so a file that ended at the last hold's end returned to
the first speed at TMax. With a rounded resampling step it did so a
whole step early: speeds (0.5, 1.0) held 0.3 s with 0.1 s ramps give
dt = 0.10000000000000003, the table ends at 0.6 s, and the last 0.1 s of
the last hold ran at 0.5 m/s.

CurrentSteps.write now ends the file two ramps after duration, still at
the last speed. The last sample then lies at least about one ramp past
TMax, so neither the wrap nor a dropped step reaches the run.

Checks: the written file, evaluated by the native resampling rule, gives
the last speed over the whole last hold for the case above, an integer
schedule and a single speed; without the guard row the same rule
returns the first speed. Full pytest (with the stepped-current
end-to-end run), ruff, mypy, Sphinx -W, pre-commit.

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. 🚀

Reviewed commit: 6b7786333e

ℹ️ 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 42aeab3 into dev Nov 12, 2026
22 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/stepped-current branch November 12, 2026 07:04
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