Skip to content

MHK inflow calls#3306

Merged
andrew-platt merged 15 commits intoOpenFAST:rc-5.0.1from
hkross:bug/MHK_Inflow_Calls
Apr 21, 2026
Merged

MHK inflow calls#3306
andrew-platt merged 15 commits intoOpenFAST:rc-5.0.1from
hkross:bug/MHK_Inflow_Calls

Conversation

@hkross
Copy link
Copy Markdown
Contributor

@hkross hkross commented Apr 13, 2026

This pull request is ready to be merged.

Feature or improvement description

  • Addresses minor bugs in calls to MHK inflow (wave+current)
  • Sets all flow field kinematics below the seabed to zero
  • Includes a few documentation updates

Impacted areas of the software

  • AeroDyn
  • SeaState
  • Documentation

Test results

  • r-test branch merging required

The following r-tests were impacted

  1. ad_MHK_RM1_Floating: A node was querying the flow field out-of-bounds in the x direction. The flow field was expanded, thereby causing a slight phase shift in the x and z inflow velocities. The following plots compare the previous baseline (legend 0.0) with the new baseline (legend 0.1). As expected, peaks in the X direction loads see a corresponding phase shift.
HWindSpeedX HWindSpeedZ RtFIdFxh RtFIdMxh
  1. MHK_RM1_Floating_Tank-scaled: This r-test used currents defined in SeaState rather than InflowWind. This pull request disallows the definition of currents in SeaState for MHK cases, so an equivalent current was defined in InflowWind instead. Prior to this pull request, flow field kinematics were non-zero below the seabed for flows defined in SeaState. This pull request improves consistency by zeroing all flow field kinematics below the seabed, regardless of the module in which they are defined. This effect can be seen in the following plots, where 0_SS uses a current defined in SeaState, with non-zero flow kinematics below the seabed, 1_SS uses a current defined in SeaState with zero flow kinematics below the seabed, and 1_IfW uses a current defined in InflowWind with zero flow kinematics below the seabed. The 1_SS and 1_IfW cases match, as defining a steady current in SeaState vs InflowWind gives an equivalent flow field. The 0_SS case sees higher anchor tensions, due to non-zero velocities seen by mooring line nodes at or below the seabed. Three platform motions are shown below, though the results are similar for all.
PtfmRoll PtfmSurge PtfmSway ANCHTEN1 ANCHTEN2 ANCHTEN3 ANCHTEN4
  1. py_wavetank_test1: This r-test uses currents defined in SeaState and in InflowWind. It previously called the SeaState file from MHK_RM1_Floating_Tank-scaled. However, this SeaState file was updated to set the current to 0, and an equivalent current was defined in InflowWind. Because the SeaState pointer is not currently passed through the ADI c-bindings, wave-current coupling does not work properly when using the c-bindings (see Feature request: SeaState pointer passed into c-bindings #3315), so defining an equivalent current in InflowWind does not reproduce the baseline of the py_wavetank_test1 case. As a workaround, this pull request defines a separate SeaState file for the py_wavetank_test1 case that includes current. This change should be addressed when the SeaState pointer is integrated into the c-bindings, and the input files should be made consistent with the MHK_RM1_Floating_Tank-scaled test.

@andrew-platt andrew-platt self-assigned this Apr 13, 2026
@andrew-platt andrew-platt requested a review from luwang00 April 13, 2026 19:23
@andrew-platt andrew-platt added Module: AeroDyn Feature: MHK Marine Hydro-Kinetic Module: SeaState SeaState module for wave data generation labels Apr 13, 2026
@andrew-platt andrew-platt added this to the v5.0.1 milestone Apr 13, 2026
@hkross hkross marked this pull request as draft April 13, 2026 19:37
if (dvr%MHK /= MHK_None .and. dvr%MHK /= MHK_FixedBottom .and. dvr%MHK /= MHK_Floating) call SetErrStat(ErrID_Fatal, 'MHK switch must be 0, 1, or 2.', ErrStat, ErrMsg, RoutineName)

if (dvr%MHK /= MHK_None .and. dvr%SS_InitInp%CompSeaSt == 1 .and. dvr%IW_InitInp%CompInflow /= 1) call SetErrStat( ErrID_Fatal, 'InflowWind must be activated for MHK turbines when SeaState is used.', ErrStat, ErrMsg, RoutineName )
if (dvr%MHK /= MHK_None .and. dvr%SS_InitInp%CompSeaSt == 1 .and. dvr%IW_InitInp%CompInflow == 0 .and. dvr%IW_InitInp%HWindSpeed > 0) call SetErrStat( ErrID_Fatal, 'Steady Wind option cannot be used for MHK turbines with SeaState.', ErrStat, ErrMsg, RoutineName )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clarify this is the steady wind option in the AeroDyn driver (as opposed to in InflowWind) if that's what you meant?

@hkross hkross closed this Apr 13, 2026
@hkross hkross force-pushed the bug/MHK_Inflow_Calls branch from 2f4ba2d to 2bb3b37 Compare April 13, 2026 21:59
@hkross hkross reopened this Apr 13, 2026
@hkross hkross marked this pull request as ready for review April 21, 2026 16:34
@andrew-platt andrew-platt merged commit 43401ed into OpenFAST:rc-5.0.1 Apr 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature: MHK Marine Hydro-Kinetic Module: AeroDyn Module: SeaState SeaState module for wave data generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants