-
Notifications
You must be signed in to change notification settings - Fork 184
Description
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:
- Install the latest version of MoorDyn for WEC-Sim at: https://github.com/WEC-Sim/MoorDyn. Run BEMIO.
- Run the applications case: Paraview_Visualization\RM3_MoorDyn_Viz
- 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:
- Install the latest version of MoorDyn for WEC-Sim at: https://github.com/WEC-Sim/MoorDyn. Run BEMIO.
- Place a breakpoint in responseClass.m loadMoorDyn() method (~line 228).
- Run the applications case: Paraview_Visualization\RM3_MoorDyn_Viz
- 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
Fully written Lines.out after simulation:

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).

