Skip to content

Conversation

@RyanDavies19
Copy link
Contributor

@RyanDavies19 RyanDavies19 commented Mar 28, 2025

Feature or improvement description
This is the beginning of coupling MoorDyn to SeaState. So far it only supports waves, no currents. MoorDyn now has three options for water kinematics:

  1. The existing method, with user provided wave and current information and grid information (Old method, WaterKin = 1)
  2. A user defined grid in MoorDyn that the SeaState wave and current input data is interpolated to (Hybrid method, WaterKin = 2)
  3. SeaState grid and wave and current data passed directly to MoorDyn, accessed every time step (SeaState method, WaterKin = 3)

Options 1 and 2 are specified in the WaterKin.dat file that MoorDyn currently requires for water kinematics (there are modifications for specifying the current grid if using option 2. They follow the same approach as defining the Z grid point data for waves). The input variables WaveKinMod and CurrentMod trigger which method is used; they must be equal or one must be zero. Option 3 is triggered by the keyword SeaState (case insensitive) in the WaterKin flag in the main MoorDyn input file.

This is currently only set up to support waves, currents are on the todo list.

Much of the approach follows how the SeaState WaveField pointer is passed into Hydrodyn. The MoorDyn driver calls SeaState Init and then passes MoorDyn the pointer. Otherwise, FAST_subs and FAST_Farm_subs will pass it in. In the case of FAST Farm, option 3 (the full SeaState coupling) is not allowed because there is not a farm level SeaState instance. Instead (if using option 2), FAST_Farm_subs will pass MoorDyn the WaveField pointer from the first SeaState instance, because it contains the same seed information as all the other instances. This will change in future development once the farm level SeaState is implemented.

Impacted areas of the software
MoorDyn
OpenFAST
FAST.Farm
C-Bindings

Test results, if applicable
Tested for no seg faults when running the three SeaState - MoorDyn coupling options in OpenFAST and FF.
Tested for numerical accuracy by matching frequency of input waves with MD outputs, and matching current speeds w/ MD output current speeds.

TODO before release to main OpenFAST dev branch
These will be addressed in future PR's to the dev-cbind branch

  • typo in FAST_Farms_subs
  • revert changes to Python wrapper of C-bind
  • Add in coupling for currents
    • SeaState
  • Add wave directional spreading into MoorDyn for WaterKin = 2 (SeaState inputs to the MoorDyn grid)
  • C-bind pointer passing (@rafmudaf is leading this)
  • Test implementation for accuracy
    • Currents
    • Waves
  • Add regression test for water kinematics in MoorDyn, include example input files
  • Docs update with new input file formats

@RyanDavies19 RyanDavies19 marked this pull request as ready for review March 31, 2025 20:37
@RyanDavies19 RyanDavies19 changed the title WIP: MoorDyn-SeaState Coupling MoorDyn-SeaState Coupling (untested) Apr 2, 2025
@andrew-platt andrew-platt added this to the v4.1.0 milestone Apr 2, 2025
@RyanDavies19 RyanDavies19 marked this pull request as draft April 16, 2025 20:38
@RyanDavies19
Copy link
Contributor Author

Change to draft until currents are added

@RyanDavies19 RyanDavies19 marked this pull request as ready for review April 18, 2025 22:36
@RyanDavies19 RyanDavies19 changed the title MoorDyn-SeaState Coupling (untested) MoorDyn-SeaState Coupling Apr 18, 2025
@RyanDavies19
Copy link
Contributor Author

Ready to merge. Updated regression tests PR will be made to r-test, updated docs PR will be made to MD-C. Wave spreading will come in a later PR.

…x for zero length rods, seg fault fix for current profile bigger than 100.
@andrew-platt andrew-platt merged commit 8425c28 into OpenFAST:dev-cbind Apr 28, 2025
22 checks passed
@RyanDavies19 RyanDavies19 deleted the MD_SS_coupling branch April 28, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants