Bug Fix: AeroDyn driver output files contained wrong channel names #2287
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.
Feature or improvement description
The AeroDyn driver code uses AeroDyn_Inflow (ADI). ADI concatenates the output headers from InflowWind and AeroDyn's first rotor into one array at initialization. However, at each time step, it makes the driver code concatenate the
WriteOutput
arrays. The AeroDyn driver concatenated AeroDyn's outputs from the first rotor and InflowWind output channels (the opposite order of ADI), so all of the AD and IfW channels were mislabeled if both modules were used.I changed the order of the
WriteOutput
channels in the AeroDyn driver so that they now match the order of the concatenated headers from ADI. It likely would have caused fewer issues with the regression tests if I had just relabeled the columns, but since ADI is used elsewhere (I think), this seemed like it was less likely to cause issues with other codes that use ADI.It seems like ADI should handle the concatenation of arrays instead of the driver. If it does it at initialization, it should do it at each time step, too. This would make sure only one code (ADI) needs to be concerned about the internal order of the columns. However, I will leave this as an exercise for someone else to do later.
I also fixed a problem where AD driver was attempting to print the AD version in the text output file, but not initializing the variable it uses. This left a bunch of non-printable characters in the text file.
Finally, I am printing the git hash (version info) in the output files generated by the AeroDyn driver. This applies to both the text and binary files.
Related issue, if one exists
Impacted areas of the software
AeroDyn driver
Test results, if applicable
All of the AeroDyn driver tests that contain outputs from both AD and InflowWind will fail due to the outputs being in a different order.