Repository navigation
feat: cabledyn.current_steps, stepped-current VIV studies in one run - #150
Conversation
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>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
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>
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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 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.