Repository navigation
feat(waves): per-component direction and a reference point for wave records - #96
Conversation
WaveKin 7 refused rows of different directions, though MoorDyn-C reads a beta per row of wave_frequencies.txt and gives each its own direction. Rows that differ now make a short-crested table in ascending frequency: CD_Component_Wave_Kinematics takes the direction cosines of each component (comp_cos, comp_sin) and sums x and y apart, in a branch of its own, so a long-crested table runs as before. Vessel RAOs take each row's heading. The beta of the omega = 0 row has no effect. The new options WaveRefX and WaveRefY give the point that an elevation record or a component file (WaterKin WaveKinMod 1, WaveKin 3 and 7) refers to: each phase uses the position relative to it, and a vessel RAO the vessel's. The default is the origin. They are an extension of CableDyn, documented as such, and a deck with any other sea, or none, is refused by name; the Python deck validator mirrors the rule. Existing decks give the same bits as before. Two directions equal the two superposed seas to 1e-15, at the depth stretched by the total elevation, across the quadrants; a shifted reference point equals the deck translated. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
DeckFile accepted WaveRefX and WaveRefY with a WaterKin file of WaveKinMod 0, which the solver refuses, and did not read the rows of wave_frequencies.txt. It now reads the WaveKinMod of a WaterKin file and the rows of wave_frequencies.txt from the deck's folder, with the rules of the native reader: directions within 2 pi, the omega = 0 first row, positive frequencies, component bounds and the effective depth. A vesselRAO deck is judged by the same WaveKinMod. A file that is not there passes this check, and the solver, which must open it, refuses it by name while it is missing. The bound on WaveRefX and WaveRefY applies to the value in force, as in the native reader: a later row replaces an earlier one. A new parity test runs 41 decks through both DeckFile and the driver and requires the same verdict. The deck format notes record how a non-zero omega = 0 row differs from MoorDyn-C. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
DeckFile left the contents of the files a deck names to the solver, so it certified decks the solver refuses. It now reads them from the deck's folder with the rules of their native readers: the WaterKin file and its wave record and current table, including a current that doubles a current row or Currents 1, 2 or 5; the Currents 1, 2 and 5 tables; motionFile rows on the route the deck takes, with TURBINES records and the roll column; vesselMotion rows; the vesselRAO table and the headings of the deck's sea; the bathymetry grid and the Fixed points on it; and the Syrope settings, OWC table and working-curve admissibility. A file that is not there passes this check, and the solver, which must open it, refuses it by name while it is missing. The parity test now runs 160 decks through DeckFile and the driver and requires the same verdict. Against the earlier validator, 28 of 1943 decks from the examples and the test suite are newly refused, and the driver refuses all 28. 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: 7674f46e8e
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7674f46e8e
ℹ️ 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 heading of a wave row missed the ochi_hubble spelling, so it read lambda1 as the direction and a one-heading RAO table at the sea's heading was refused. All the spellings the native reader takes now select the same column. A standalone static check, TMax = 0 without dtM, was refused with a WaterKin WaveKinMod 1 file, because the file rules took dtM from the explicit options. They now run on the nominal clock the native parser installs, and motion and vessel records follow its start-row rule: the grid is the t = 0 row, and a later row is not used, whatever its time step. The parity test now also takes every wave kind and keyword spelling on both clocks against a one-heading RAO table, every shipped deck as a static check without dtM, and every shipped wave deck under each spelling of the options these rules read: 507 decks through DeckFile and the driver, with the same verdict on each. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 708caab46a
ℹ️ 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 narrow spreading leaves the outer direction bins without energy, and the RAO synthesis skips their components, so DeckFile refused tables the solver accepts. It now mirrors the bin weights. A weight below the smallest normal number is exactly zero natively too, so which bins carry the sea depends on the spreading and the bin count alone, not on where the product with the spectrum underflows. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! 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". |
Summary
Per-component direction.
wave_frequencies.txt(WaveKin 7) takes a differentbetaon each row, so a component file can describe a short-crested sea. This is not an extension: MoorDyn-C v2.7.1 reads abetaper row too, and the earlier refusal was CableDyn's own limit. Short-crested tables use their own branch of the component sum, so the single-direction path is unchanged.Reference point. New options
WaveRefXandWaveRefY(m, default 0) say where a wave record or the component phases are referenced, forWaveKin 3,WaveKin 7and WaterKinWaveKinMod 1. They extend the MoorDyn-C format, and the docs say so. Vessel RAOs take each row's heading and the vessel position relative to the point.Python validator.
DeckFilenow reads the files a deck names (WaterKin, the MoorDyn-C kinematics files, motion and vessel records, the RAO table, bathymetry, Syrope) and refuses what the solver refuses. A file that is not there passes the validator and the solver refuses it by name.Deck syntax:
WaveRefX,WaveRefY; a per-rowbeta. Both are refused by name where they cannot apply, including on the coupled route.Checks
WaveKin 3,WaveKin 7andWaveKinMod 1.WaveKin 7sea with a reference point matches to 5e-7 m.test_wave_record_rules_match_the_driver: 160 decks throughDeckFileand the driver, the same verdict on all. On 1943 decks the validator's 28 new refusals are all decks the driver refuses too.sphinx -Wbuilds.The CHANGELOG entry lands with the release batch.