Bug Fix: Fixing issue that MoorDyn writes positions and tensions of t… #604
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…he wrong node to OpenFAST's output file
Feature or improvement description
MoorDyn features two different methods of generating output:
Both methods can be used to output the same physical quantities.
In general this works well, however when I analysed the outputs of some OpenFAST simulations using MoorDyn, I realized that the values of the same output parameters are not consistent between the different output files. To be more precise the values in the *.MD.out and the *.out file are the same, but those are differing from the values in the line output files (*.MD.Line#.out).
After comparing the different output files, I assume that the output of *.MD.Line#.out is the correct one and that there is a problem with the values written to the main MoorDyn and OpenFAST output file.
Doing the comparison, I realized that if one requests to write the position or the tension of an arbitrary node @ of line # using the prefix L#N@ to the OpenFAST output file, in the *.MD.out and the *.out file always the position/tension of the last node of the requested line was written and not the position/tension of the requested node @.
The proposed change of the source code in this pull request should fix this wrong behaviour. It just changes one line and is most likely just a correction of a typo in the source code.
Related issue, if one exists
No issue related. (I thought, it would be not really necessary to open up a new issue for this minor change. Please let me know, if I am wrong.)
Impacted areas of the software
MoorDyn
Additional supporting information
Note, applying this bug fix will write the correct node positions to the OpenFAST output file. However, for the tension of a requested node the tension of the segment preceding to the requested node will be output. For example, if one requests the output of L1N10Ten, then the tension at segment 10 (Seg10Ten) which to my understanding connects node 9 and 10, will be written. This leads to zero tension to be written for L#N0Ten!!!
I am not shure, if that is the expected behaviour. Especially, the zero tension for the first node seems a bit weird to me. What do you think on this @mattEhall?
Test results, if applicable
Actually, I cannot add test results here, as my regression tests are all failing with an error saying:
However, I don't think that this is related to this pull request, because I get the same error when running the regression tests on the current (original) OpenFAST dev branch.