Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: AeroDyn driver output files contained wrong channel names #2287

Merged
merged 3 commits into from
Jun 29, 2024

Conversation

bjonkman
Copy link
Contributor

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.

The following tests FAILED:
	 57 - ad_EllipticalWingInf_OLAF (Failed)
	 58 - ad_HelicalWakeInf_OLAF (Failed)
	 59 - ad_Kite_OLAF (Failed)
	 60 - ad_MultipleHAWT (Failed)
	 67 - ad_BAR_SineMotion (Failed)
	 68 - ad_BAR_SineMotion_UA4_DBEMT3 (Failed)

bjonkman added 2 commits June 27, 2024 13:58
- the header in the text file output contained non-printable characters because AD_ver was printed by not initialized.
- I added the git version data to the output file header
- The output file header listed InflowWind before AeroDyn rotor 1, but the columns printed AeroDyn rotor 1 before InflowWind, resulting in all of the AD and IfW columns being mislabeled if both modules had output
Copy link
Collaborator

@andrew-platt andrew-platt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for doing this -- the order was rather confusing before IfW outputs following the first turbine.

I'll update the regression tests and merge.

@andrew-platt
Copy link
Collaborator

I agree it would be better to move some of the concatenation into the ADI library instead of having it duplicated in the driver and in the c-bindings interface. Sometime we might have spare time to condense that.

@andrew-platt
Copy link
Collaborator

Thanks for fixing this!

@andrew-platt andrew-platt merged commit 580e346 into OpenFAST:dev Jun 29, 2024
21 checks passed
@bjonkman bjonkman deleted the b/AD_Driver_output branch July 17, 2024 14:38
@andrew-platt andrew-platt mentioned this pull request Dec 24, 2024
38 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants