Skip to content

Potential MoorDyn bugs #3505

Open
Open

Description

@luwang00

Bug description
Below is a list of MoorDyn issues found while reviewing the slip-support PR (#3501). We should confirm and address these at a later date.

State and restart

  • Viscoelastic state not initialized for ElasticMod == 3. In MD_Init, dl_1 is copied into x%states only when ElasticMod == 2 .or. == 4. Model 3 is skipped, so its dl_1 state starts at 0. The condition should be ElasticMod > 1.
  • Line failure status is stored in misc (m%FailList(:)%failStatus). It is not restored when the glue code repeats a step, so a failure triggered during a correction iteration stays triggered. Slip status had the same problem and was moved to OtherState in MoorDyn slip support #3501.
  • Implicit SAVE on locals in MD_Init. compVIV, compVisco and hasSyrope are given initial values in their declarations, which makes them SAVEd. Once set to .TRUE., they stay set for later MoorDyn instances (for example in FAST.Farm). That can trigger the "Linearization cannot be used with VIV or Viscoelastic" error for an instance that uses neither.

Input parsing and validation

  • External loads read the wrong column for Blin. When Blin has a single value (N==1), the code reads tempString4 (the Bquad column) instead of tempString3. The linear damping is silently set to the quadratic coefficient.
  • Missing lower-bound checks on object IDs:
    Output channels in MDIO_ProcessOutList for Point, Rod, Body and Line (for example, POINT0FX indexes out of bounds).
    Line IDs in the CONTROL section.
    Line IDs in the FAILURE section.
  • Failure check uses a Rod ID as a Point index. The "free point with all lines failing" check reads m%PointList(attachID)%typeNum even when the failure is attached to a Rod end.

Runtime

  • Tension truncated in MD_UpdateStates. tension is declared INTEGER(IntKi), so the result of Line_GetNodeTen is truncated before it is compared with FailTen and printed in the failure message.

Linearization

  • Wrong DeltaL linearization labels in MD_InitVars. The label appends num2lstr(i) (the channel number) instead of j (the line number). Also, LinStr = openfast. writes back into a fixed-length CHARACTER(32), so the appended text is dropped.
  • Velocity perturbation is hard-coded at 0.1 m/s for every velocity state. This gives secant rather than tangent damping for strongly nonlinear terms near zero velocity, such as friction and the slip-support Coulomb/LuGre models. It is documented for slip supports in MoorDyn slip support #3501 but not changed. A per-object or user-set perturbation could be considered.

Logging

  • Wrong index in the WriteLog > 1 "Points" summary. The loop runs over l = 1..nFreePoints but prints m%PointList(l)%M instead of m%PointList(m%FreePointIs(l)).

openfast_io

  • read_MoorDyn matches section headers loosely. It uses substrings such as 'lines' and 'failure', which can match the wrong section.
  • readline_filterComments loops forever at end of file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions