Repository navigation
feat(current): deck currents on the standalone mixed EI=0 + finite-EI deck - #79
Conversation
… deck The standalone mixed deck (EI = 0 lines and finite-EI cables between Fixed/Coupled/Vessel points, run by the driver on the aggregate) refused every deck current. It now takes those the single-line routes take: a current OPTION (uniform or profile), a WaterKin CurrentMod 1 table and MoorDyn-C Currents 1/2/5. CD_Init_Deck_Aggregate and CD_AGG_Init_From_Deck take an optional deck_current, passed only by run_mixed_held_deck. The static solves of the chains and cables take the current at t = 0. CD_DeckCurrentRuntimeType holds it, and the aggregate samples it with the single-line routes' updaters (update_system_line_hydro, update_hermite_deck_fluid): - at t = 0 at Init; - at the row-1 station (CD_AGG_Refresh_Accelerations); - at t_committed before every CD_AGG_Step_Moving. The cable sampler takes an optional workspace, so the march allocates nothing per step. Deck waves stay refused. The coupled route keeps the host's field. mixed_route_currents compares the mixed route with the single-line routes, a cable and a chain in cross currents: - the static start agrees exactly (chain) and to 4.9e-6 of the range (cable, the coupled build's static polish); - with the same Newton controls the march agrees to 4.9e-6 (cable) and 2.1e-5 (chain); - a wrapping Currents 2 table equals its unrolled form bit for bit; - a uniform Currents 1 profile equals uniform bit for bit, and a uniform Currents 5 grid equals it to 3.9e-8; - correction rewinds are bit-identical. step_allocations_mixed_current finds 0 heap allocations in 160 steps. The Python validator follows the native verdicts. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
Codex Review SummaryThis 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. Can't wait for the next one! 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". |
Gate 4 of mixed_route_currents required the uniform Currents 1 profile to reproduce OPTION uniform bit for bit. The profile's linear interpolation between equal levels is exact on Windows and one ulp off on Linux gfortran, which the march carries: the Linux Release CI job measured 3.87e-8 of each channel's range and failed the gate. The gate now takes the grid case's round-off tolerance (GRID_TOL 1e-7), and the CHANGELOG and VALIDATION wording says to round-off. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
…#81) ## Summary A finite-EI cable on the coupled aggregate (a mixed `EI = 0` + finite-EI standalone deck, OpenFAST `CompMooring = 5`, FAST.Farm, the C API) stepped to a fixed relative Newton tolerance of 5e-3 (200 iterations), whatever the deck's `dynamic_solver` row said; the same cable alone in a deck stepped to the deck's tolerance (default 1e-8, 30 iterations). Every route now takes the deck's `rel` and `max_iter`, and the static start `min(1e-6, rel)`. ## What the loose step did - **Silent wrong tensions.** A lazy cable beside a chain, both fairleads moved 3.5 m: at `rhoInf` 1, `dtM` 0.05 s the mixed route's fairlead tension peaked at 4.3e5 N (anchor 5.5e5 N) against 1.9e4 N (2.1e3 N) for the cable alone; at `dtM` 0.1 s it fell to 8307 N against 10 799 N and the fairlead bend moment rose to 1612 against 3.9 N m (robustness campaign D03). - **A non-dissipative coupled cable.** Held at both ends in still water, the residual each step left grew at `rhoInf` 0.4 into a sustained oscillation (+-14 N at 8 Hz on 1.2e4 N on the IEA-15 MW mixed cable, also inside OpenFAST), and at `rhoInf` 1 the march diverged (6.1e5 N within 5 s) (end-to-end validation E2E-D2). On that reproducer the held cable now stays constant (0 N range over the second half of 80 s at `rhoInf` 0.4, and at `rhoInf` 1). Now the routes, and the C API, OpenFAST and FAST.Farm builds driven through the same motion, agree to 5e-8 of the peak tension; a seeded disturbance decays as on the single-line route. ## Also - The standalone vessel march passed `TRANSPOSE(motion%rot(...))` as an orientation argument every step, which the compiler packed into a heap temporary; the DCM is formed in a local array (gate `step_allocations_driver_vessel`). - `mixed_route_currents` (#79) needed a 2e-3 cable tolerance only because of the loose coupled step; its driver-level comparison now agrees exactly and the gate is at 1e-6. ## Cost About 2.0 tangent factorisations per coupled cable step instead of 1.1: the aggregate step of the IEA-15 MW mixed example takes 38 % more CPU time. ## Checks - New test `coupled_cable_tolerance` (gates 1-3: mixed vs single-line route at `rhoInf` 1 / `dtM` 0.05 and `rhoInf` 0.4 / `dtM` 0.1; C API, OpenFAST and FAST.Farm builds; held and seeded cables at `rhoInf` 0, 0.4, 1), each failing on the old code. - ctest 350 of 350; checked Debug build (`-fcheck=all`) on the 13 touched tests; example A/B 53 of 53 identical; pre-commit, Sphinx `-W`, no duplicate `PUBLIC`. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Summary
The standalone mixed deck (
EI = 0lines and finite-EI cables betweenFixed/Coupled/Vesselpoints, run by the driver on the OpenFAST aggregate) now takes every deck current the single-line
routes take: a
currentOPTION (uniform or profile), a WaterKinCurrentMod 1table andMoorDyn-C
Currents 1/2/5. Until now the route refused all of them (and the aggregate alsorefused a deck current on any deck with a finite-EI cable).
Deck waves stay refused on the mixed route, and the coupled OpenFAST/FAST.Farm route is unchanged:
it keeps taking the host's field and refusing deck currents.
Design
CD_Init_Deck_Aggregate/CD_AGG_Init_From_Decktake a new optionaldeck_current(passed onlyby the driver's
run_mixed_held_deck). With it, the current refusals (forbid_deck_ambient, thefinite-EI scope, MoorDyn-C
Currents 1/2/5) are lifted. The refusals ofWaveKin 3/7and deckwaves stay. A deck-owned current is refused by name beside a host field (
external_fluid), ahost placement/farm/
static_current, or bodies, rods andConnect/Freepoints (those decksrun on the multibody or point-system march). Without
dtMit is refused as on the single-lineroutes.
opts(with the statictangent gradient of a profile or grid). They now see the deck current at
t = 0, as on thesingle-line routes.
CD_DeckCurrentRuntimeType(the deck options that carry the current, plus asample workspace) is held by the aggregate. Its samplers call the single-line routes' own updaters:
update_system_line_hydro(the system twin ofupdate_wave_models) on theEI = 0lines andupdate_hermite_deck_fluidon the cables. Every field therefore goes throughdeck_current_velocity, as on the other routes.CD_AGG_Init_From_Decksamples it att = 0at the static state (the cables' first held fieldsets the consistent start acceleration).
CD_AGG_Refresh_Accelerations(the row-1 station of a motion) samples it again att = 0atthe installed row.
CD_AGG_Step_Movingsamples it att_committedat the step-start nodes, as the single-linemarches do;
t_committedis required.update_hermite_deck_fluidtakes an optional workspace, so the aggregate's march makes no heapallocation per step. The single-line routes still call it without one, unchanged.
DeckFilemirrors the change: a mixed deck accepts the currents, and refuses deck wavesand
WaveKin 3/7with the native wording.Validation
New
mixed_route_currentstest (driver plus library): a 100 m cable and a 110 m chain, bothfairleads surging 1 m from rest, in cross currents. Numbers are fractions of each channel's range,
mixed route against the single-line routes. On dev every driver run of the mixed decks is refused.
uniform/profile,Currents 1/2/5: static startCurrents 2wrapping past its last sampleCurrents 1/Currents 5CD_AGG_Snapshot, step,CD_AGG_Restore, step) x10, still water andCurrents 2uniformbesideCurrents 2, current withoutdtMFurther checks:
step_allocations_mixed_current: 0 heap allocations in 160 steps in aCurrents 5grid. It made640 (4 per step) with the cables' automatic sample arrays before the workspace.
driver_msg_mixed_currentnow runs the lazy-wave deck in its current, and
driver_msg_mixed_waveschecks the waves refusal.Checks:
-fcheck=all): 10/10 new and touched tests (mixed_route_currents,step_allocations_mixed_current,mixed_route_torsion,mdc_currents,openfast_aggregate*,driver_msg_mixed*).against the dev driver.
-W, ifx duplicate-PUBLIC scan: 0.Docs:
driver_format.md,standalone_driver.rst,capabilities.rst,troubleshooting.rst,VALIDATION.md,CHANGELOG.md.