Fairlead Tension Output
Dear @jjonkman ,
Running the simulation will show the tension in the command line, but I would like to know how to output the Fairlead tension out with a scope inside Simulink, because I don't find a string about the tension in OutlistParameters.xlsx. I'm trying to output it out, but it reports an error.
Dear @WS991106,
FairTen1 is an output of MoorDyn if you've selected it in the OUTPUTS section of the MoorDyn input file.
The MoorDyn outputs are not documented in the OutListParameters.xlsx spreadsheet, but are documented in the online MoorDyn documentation: https://moordyn.readthedocs.io/en/latest/inputs.html#the-v2-input-file.
Best regards,
Dear @jjonkman ,
If I want to output the Fairlead tension inside simulink to a scope, do I need to modify the source code? If I need to modify it, what part of it should I modify? Is there any information to introduce it?
Best regards,
Dear @WS991106,
You don't need to change the source code for that. You should be able to extract FairTen1 (or any other OpenFAST output) from OutData via strmatch() and then send that signal to a scope.
Best regards,
Dear @jjonkman,
I tried what you said, but I still get the error as below, I don't know what the problem is.
Dear @WS991106,
I'm not sure what this error says in English. Regardless, is FairTen1 included in the OutData array?
Best regards,
Dear @jjonkman ,
Thank you very much for your help, my problem has been solved by changing the string all caps to FAIRTEN1 and it won't report an error!
Best regards,
@WS991106 -- I'm glad you solved the problem.
@RyanDavies19 @andrew-platt -- Sounds like a simple issue to fix in MoorDyn by making use a call to Conv2UC().
Best regards,
@jjonkman @andrew-platt I added a comment to the documentation to address this. For now I think its best to leave it as is, so that users who have scripts set up already don't have to make changes
@RyanDavies19 -- I'm not sure what scripts you are referring to, but using Conv2UC() would simply open up the possibility for users to select MoorDyn output FAIRTEN1 using any combination of upper or lower case letters, e.g., FairTen1. This is how most other output parameters of other OpenFAST modules work and provides user some flexibility.
@jjonkman from the MoorDyn input file side, the output channels are not case sensitive. Users could give fairten1 and it would be correctly read. MoorDyn uses Conv2UC() before processing the output channel name and assigning it to the output parameter structure as all caps, so that the output file has headers in caps.
I discussed this with Matt and the idea is that any users who have set up their own scripts to process moordyn output files will have done so based on the all caps method, so in order to not break that convention its better to leave it as is. My understanding of the OutList variable is that it contains a list of all the output channels as written by MoorDyn, so I'm not sure if there is a way to allow for searching while still having the MoorDyn output file headers be caps.
I'm not sure we're all talking about the same issue here. I don't know how MoorDyn deals with the case of channel output names, so I won't comment on that. However, the issue here is likely that the output channel from MoorDyn (possibly using whatever case the user entered in the input file) does not have the same case as the Simulink block is expecting. The best fix is to change the Simulink block to ignore case:
The Simulink model should change u(strmatch('FairTen1',OutList)) to u(strcmpi('FairTen1',OutList)). Matlab documentation also says strmatch() should not be used anymore, so this fixes both issues.
Thanks for clarifying, @bjonkman. That makes sense. I'll go ahead and close this issue.
Updated the Simulink example cases with PR #2254.