Repository navigation
fix(waves): a MoorDyn-C mean level is added to the elevation alone - #104
Merged
Merged
Conversation
A non-zero omega = 0 row of wave_frequencies.txt (WaveKin 7), or the mean of wave_elevation.txt (WaveKin 3), is now added to the elevation alone, as MoorDyn-C does: the wave numbers stay those of WtrDpth, and the Wheeler stretching maps the water under the total elevation. CableDyn took the wave numbers at WtrDpth plus the level and measured z from it. The mean of a WaterKin WaveKinMod 1 record still raises the still-water level; the docs now say that MoorDyn-F drops it. CD_Component_Wave_Kinematics takes an optional eta_offset, a steady level in the surface the stretching maps. A new wavekin_modes case runs both files with a 0.8 m level against MoorDyn-C v2.7.2, with six WaveKin 7 components in six directions. WaveKin 7 matches to 1e-8 of its scale, where the previous rule was 7.7e-3 m off in elevation and 1e-2 in velocity. WaveKin 3 matches to the existing grid tolerances, where it was 6e-3 off in velocity. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Owner
Author
|
@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. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. 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". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A mean level in a MoorDyn-C kinematics file is now handled as MoorDyn-C handles it. This covers a non-zero
omega = 0row ofwave_frequencies.txt(WaveKin 7) and the mean ofwave_elevation.txt(WaveKin 3).WtrDpth, and the Wheeler stretching maps the water under the total elevation (SpectrumKin::getWaveKin,fillWaveGridandWaveGrid::getWaveKinof v2.7.2).WtrDpthplus the level and measuredzfrom that raised level, as it does for a WaterKin record.WaveKinMod 1: unchanged. Its mean still raises the still-water level. The docs now say that MoorDyn-F drops the mean (and the Nyquist bin) of such a record.CD_Component_Wave_Kinematicstakes an optionaleta_offset: a steady level added to the surface the stretching maps.Checks
A new
wavekin_modescase (tests/data/wavekin_mdc_mean) runs MoorDyn-C v2.7.2, built here, throughvalidation/scripts/wavekin_mdc_probe.cpp. TheWaveKin 7file has a 0.8 m level under six components in six directions; theWaveKin 3file is the shared record raised by 0.8 m. Water depth is 50 m.WaveKin 7, 40 points: elevationWaveKin 7: velocity, acceleration (of scale)WaveKin 3, 12 grid points: elevationWaveKin 3: velocity, acceleration (of scale)The
WaveKin 3remainder is MoorDyn-C's grid interpolation; the zero-mean case shows the same.tests/data/wavekin_mdcto 1e-16.wavekin_moordyn_c_reference.pyregenerates both folders and reproduces the committed rows.moordynC_wavekin, whose mean row is zero.-W -nbuilds.Results change only on
WaveKin 3andWaveKin 7decks whose mean level is not zero. The CHANGELOG entry is in this PR.