Skip to content

[BUG] MoorDyn with Paraview - RM3 Application #674

@akeeste

Description

@akeeste

Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.

Describe the bug
The Paraview application case using the RM3 with MoorDyn is not working. It seems the Lines.out file is not yet written completely when read, which causes issues when reading and manipulating the MoorDyn data in the post-processing stage.

WEC-Sim file(s)
write_paraview_mooring.m - line 31
responseClass.m - loadMoorDyn() method
Lines.out

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest version of MoorDyn for WEC-Sim at: https://github.com/WEC-Sim/MoorDyn. Run BEMIO.
  2. Run the applications case: Paraview_Visualization\RM3_MoorDyn_Viz
  3. See error:
Error using wecSim (line 45)
Error evaluating 'StopFcn' callback of Frames block (mask) 'RM3MoorDyn/Global Reference Frame'.
Callback string is 'run('wecSimStopFunction')'
Caused by:
    Error using wecSim (line 45)
    X and V must be of the same length.

Steps to better see the error during simulation:

  1. Install the latest version of MoorDyn for WEC-Sim at: https://github.com/WEC-Sim/MoorDyn. Run BEMIO.
  2. Place a breakpoint in responseClass.m loadMoorDyn() method (~line 228).
  3. Run the applications case: Paraview_Visualization\RM3_MoorDyn_Viz
  4. While the simulation is paused, open moordyn\Lines.out and view data.

When I stop the simulation at the breakpoint and reopen Lines.out, it appears fully written. Has anyone else seen this issue? Perhaps we can put in a check that ensures MoorDyn has fully written the output files before reading them back in.

Expected behavior
I expect the case to run as is without issue, and to fully print all output data to Lines.out

Screenshots
Error message:
image

Partially written Lines.out:
image

Fully written Lines.out after simulation:
image

Workstation Information (this section MUST BE completed):

  • OS: Windows 10
  • MATLAB/Simulink 2021a
  • WEC-Sim v4.3

Additional context
Discovered this while reviewing Applications PR 7. However the updates are not actually causing this issue (rather the PR is revealing the issue as it should).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugbug in WEC-Sim source, high priorityMoorDynMoorDyn implementation in WEC-Sim

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions