Conversation
…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
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.
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:ω² = gk·tanh(kd)Morison/Morison_Subs.cs— Morison equation per unit length:Trapezoidal integration along Spar axis → 6-DOF load vector at reference point; added mass matrix computation.
HydroL_INI.cs— Initialization: dispatches wave generation byWaveMod, buildsSparMemberNode[]from input joints/properties, constructs piecewise-linear current velocity interpolant.HydroL_IO_Subs.cs—.datinput file parser (ReadHydroL_MainFile) and output writer (HydroL_IO_Outs), consistent withMSA_IO_Subs/MSA_IO_Outsconventions includingIO_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 listedOutListvariables.💬 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.