Skip to content

Add open-source HydroL hydrodynamics module (Morison equation + wave kinematics)#3

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-134895103-949515393-269a4f11-ada1-47ee-b3b3-d403aee49a4e
Draft

Add open-source HydroL hydrodynamics module (Morison equation + wave kinematics)#3
Copilot wants to merge 2 commits intomainfrom
copilot/fix-134895103-949515393-269a4f11-ada1-47ee-b3b3-d403aee49a4e

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 17, 2026

Implements the open-source HydroL水动力计算 module for Spar-type floating offshore wind turbines. Covers wave generation (JONSWAP/PM spectra, regular waves) and Morison-equation-based load integration, following the same structural patterns as existing modules (MSAL, AeroL).

New files

  • HydroL_Types.cs — All enums (WaveMod_Type, HydroMod_Type, MoorLine_Type, PotMod_Type, HydroL_Loadchannels) and data structs (HydroL1, SparMemberNode, WaveKinematics, HydroL_AllOuts, HydroL_ParameterType, HydroL_RtHndSideType)

  • WaveL/WaveL_Subs.cs — Linear wave theory engine:

    • JONSWAP spectrum with σ_a=0.07/σ_b=0.09 (DNV-RP-C205) and automatic γ selection
    • PM spectrum (γ=1 degenerate case)
    • Regular wave generation
    • Newton-Raphson dispersion relation solver: ω² = gk·tanh(kd)
    • Water particle kinematics (velocity, acceleration, dynamic pressure) at arbitrary depth
  • Morison/Morison_Subs.cs — Morison equation per unit length:

    F = ρ·Cm·A·ü_w − ρ·(Cm−1)·A·ü_b + 0.5·ρ·Cd·D·|u_rel|·u_rel
    

    Trapezoidal integration along Spar axis → 6-DOF load vector at reference point; added mass matrix computation.

  • HydroL_INI.cs — Initialization: dispatches wave generation by WaveMod, builds SparMemberNode[] from input joints/properties, constructs piecewise-linear current velocity interpolant.

  • HydroL_IO_Subs.cs.dat input file parser (ReadHydroL_MainFile) and output writer (HydroL_IO_Outs), consistent with MSA_IO_Subs/MSA_IO_Outs conventions including IO_ChannelType, per-channel file output, and dimension-aware variable expansion for Spar node outputs.

  • HydroL_OutputParam.cs — 38 output variables across 5 channels (total hydro loads, PRP motions, Spar node loads, mooring loads, wave elevation) with units and dimension flags.

Matches demo input

Compatible with demo/5MW_Spar/Hydro/HawtC2_HydroL_Main_5MW.dat (OC3 Hywind 5 MW Spar), including all listed OutList variables.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…eneration)

Co-authored-by: a1821216780 <66454392+a1821216780@users.noreply.github.com>
Copilot AI changed the title [WIP] Add open source hydrodynamic calculation software Add open-source HydroL hydrodynamics module (Morison equation + wave kinematics) Mar 17, 2026
Copilot AI requested a review from a1821216780 March 17, 2026 02:51
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.

2 participants