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

Add ability to turn unsteady aero back on during a simulation #647

Merged
merged 33 commits into from
Mar 9, 2021

Conversation

bjonkman
Copy link
Contributor

@bjonkman bjonkman commented Jan 25, 2021

Feature or improvement description
This pull request allows unsteady aero (UA) to turn back on after it has been turned off. Previously, when the angle of attack exceeded a certain threshold, UA was turned off for that node for the rest of the simulation. The new algorithm blends the steady solution with the unsteady solution; it uses:

  • only the steady solution for all angles of attack above the UACutout value listed in the airfoil file
  • only the unsteady solution for all angles of attack 5 degrees below UACutout
  • a (cosine) blend of the steady and unsteady solutions within 5 degrees of UACutout

Some other changes included in this PR:

  • I updated the UA driver code to output a few more channels and write to the output file inside the UA module instead of separately in BEM, FVW, and UA driver. This means that the UA_OUTS preprocessor directive is used only in UA now.
  • I tweaked the fix for [BugFix] AD15: Fix logic for setting size of arrays for airfoil tables #627 so that if there are multiple tables and UA isn't used, there won't be an error if some of the airfoil tables are missing UA data.
  • I fixed some minor things to avoid compiler warnings:
    • a missing comma in a TurbSim format statement
    • a 0-based array index in HydroDyn (in unused code)
    • R8Ki vs DbKi in MAP++ for the double-precision C-Fortran interface

Related issue, if one exists
none

Impacted areas of the software
AeroDyn

Additional supporting information

Test results, if applicable

The following tests FAILED:
	  3 - AWT_YFree_WSt (Failed)
	  7 - AOC_YFree_WTurb (Failed)
	  8 - AOC_YFix_WSt (Failed)
	 12 - WP_VSP_ECD (Failed)
	 13 - WP_VSP_WTurb (Failed)
	 14 - SWRT_YFree_VS_EDG01 (Failed)

The failing cases 3, 7, 8, 12, and 14 previously had Warning: Turning off Unsteady Aerodynamics due to high angle of attack in their log files (i.e., printed to the console file). After rerunning those cases with additional aerodynamic outputs, I checked that the changes in output were indeed related to the outputs of unsteady aero.

Case 13 had a step or two where the angle of attack exceeded UAcutout - 5 degrees, thus slightly changing results for that case. You have to zoom in quite a bit to see differences (if we output at every time step, it might be more noticeable)

Some example plots:
Case 3: AWT
image

Case 7: AOC
image

Case 8: AOC
image

Case 12: WP ECD: This case looks the worst, especially in the acceleration outputs. However, I believe that is a result of the UA model itself, and not the new code. One option would be using a lower UAcutout value ; we have also seen that UAMod=2 seems to give better results in some of these extreme wind cases.
image
image

Case 13: WP
image

Case 14: SWRT
image

blend UA solution with steady solution:
- starts to turn off when U < 1 and off completely when U == 0
- starts to turn off at AoA > 5 degrees before UACutOff (from airfoil file) and off completely when AoA >= UACutoff
also modified definitions of time constants with UAMod=4
Fixes a warning about types when building in double precision
Allocate the spline coefficient arrays by size of coef arrays. These would only vary between different tables in an airfoil file if the IncludeUA flag was different among the tables. This will get sorted out in the UA module if that is used.
Added unfiltered alpha (non-HGM models) and weight as output channels. Also fixed units in example Unsteady aero input file.
These changes will not affect any results, but should remove some warnings from the compiler(s) used in GitHub actions. Also fixed some comments.
Copy link
Collaborator

@jjonkman jjonkman left a comment

Choose a reason for hiding this comment

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

I've discussed this enhancement with Bonnie and I'm generally happy with the approach. There are some new spikes that show up in these test results, but that is likely because of how the models are set up (likely not very realistically). The tests could be changed to eliminate these spikes, e.g,. by switching UAMod, changing the UA parameters, or lowering the UACutOut.

Copy link
Contributor

@ebranlard ebranlard left a comment

Choose a reason for hiding this comment

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

It looks good to me. It'd be nice to merge this soon so that we can push a vortex code release (that will need some merging with this).

EDIT: I've merged this with the OLAF and tested it.

@ebranlard ebranlard mentioned this pull request Jan 26, 2021
5 tasks
This will help sync with Envision code better later.
Also add nacelle inflow velocity input.
Note that none of these inputs or outputs are included in linearization.

Also: the IfW_InputSolve no longer changes the previous inputs to inflowWind. `Ifw_InputSolve` was changed to use the appropriate state, which should fix the two work-arounds that were in the code. (1) I don't see why we need to overwrite the InflowWind input history array: we don't use extrapolated values for it with the current glue code, and  (2) if we use the appropriate state, we will be using the most recently calculated `AD%OtherState%WakeLocationPoints` thus removing the need for changing the STATE_CURR values. I'm concerned that this would have given weird results with a correction step. If it doesn't, then I'm not sure why the positions are stored as an other state instead of an output. @andrew-platt should review this part, though.
@rafmudaf rafmudaf merged commit cc87086 into OpenFAST:dev Mar 9, 2021
@bjonkman bjonkman deleted the f/UA_shutoff branch April 12, 2021 17:12
@rafmudaf rafmudaf mentioned this pull request May 12, 2021
11 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.

5 participants