-
Notifications
You must be signed in to change notification settings - Fork 465
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
Added option for 2D airfoil interpolation #213
Conversation
This code came from GHayman in Feb 2018; I fixed some merge conflicts and some minor details. It compiles (with the exception of UA driver) and gives same results as before. I did not add the AFI driver or move the AFI code into a separate source-code directory,
Any airfoils that use "default" interpolation will see different results.
BEMTU_Wind was calculating Re based on dynamic viscosity instead of kinematic viscosity as reported here: OpenFAST#71 Fixed the calculation and cleaned up calling routines that don't need the airDens variable anymore.
- These shouldn't cause errors if there are no input or output types in a module any more (-noextrap command isn't as critical now) - AirfoilInfo module will have extrap-interp routines generated for Output Type and UA_BL_Type data structures.
- added `UserProp` input to AeroDyn for 2D airfoil interpolation (currently not implemented in OpenFAST driver) - changed Registry so that it generates extrap-interp routines for AFI output type and UA_BL (parameter) types - removed fitpack from build (was used only in previous code for 2D cubic splines, which are not used now)\ - fixed a bug that could cause a seg fault if the first airfoil contained coordinates, but other airfoil files did not contain the same number of coordinates. - moved the small amount of code in `fmin_fcn.f90` to `mod_root1dim.f90` and deleted it. - removed some unused variables - moved checks on AirfoilInfo init input data from AeroDyn to AirfoilInfo (so other drivers can perform the same checks) - moved checks on AirfoilInfo Unsteady Aero data to the UnsteadyAero module (so other drivers can perform the same checks) - moved checks on UnsteadyAero input data to the UnsteadyAero module (so other drivers can perform the same checks) - added `AFTabMod` to the AeroDyn input files - fixed spelling of "Gonzalez" in a few places - replaced `GetSteadyOutputs` with `AFI_ComputeAirfoilCoefs`, which basically does the same thing. - replaced `ComputeSteadyAirfoilCoefs` with `AFI_ComputeAirfoilCoefs`, which basically does the same thing. - modified arguments to `BEMTU_Wind`, and moved call to it inside `BEMTU_InductionWithResidual` (This routine computes `Re` with inductions set to zero. this assumption is now contained in one place, so we may be able to include that in the solve with Re-interpolated airfoil tables) - Made inductions an optional output of the `BEMTU_InductionWithResidual` routine, then replaced calls to `UncoupledErrFn` with it. - replaced `AFI_GetAirfoilParams` with `AFI_ComputeAirfoilCoefs` - removed condition that all airfoil tables must have the same number of alphas - airfoilInfo interpolates on log of Reynolds number if 2D Reynolds number interpolation is requested - changed some of the interpolation in AirfoilInfo, including required subroutine arguements. AFI takes care of calling appropriate subroutine for desired interpolation method. - removed compiler warnings of unused variables in auto-generated types files using vs-build debug mode - removed unused variables
default interpolation order is now 1
@rafmudaf: I think there is a build issue here similar to the PR I submitted yesterday. |
Are there any plans to add simulink build capability to this version? |
Hopefully both #204 and #213 will be merged into the OpenFAST dev branch in the near future, which will give you both 2D airfoil interpolation and Simulink build capability. You could alternatively merge the branch from #204 into your own copy of this one to have both capabilities while waiting for the NREL merge. |
- intent on extrap/interp routines is IN instead of INOUT where there are no meshes in the data type (from Registry change) - changes to aerodyn data structures
I made a minor update in the comment for |
Yep, you'll need to commit the change to the r-test commit within OpenFAST. From
|
Updated pointer for r-test
I checked the results using the I also checked the results with the new default interpolation. The results mostly show a timeshift relative to the baseline for most cases with very minor changes in loads. I would expect this to happen. So, I propose we rebaseline the results, and remove the |
that sounds good to me |
Also removed precompilier directive for SPLINE_INTERP now that we are satisfied with r-test baseline results using linear interp of airfoils in AD15
Airfoil-interp PR: Update r-test for new baseline
Bug fixes in Dockerfiles
Accepted all of OpenFAST#213 for the non cmake-related code.
Summary
This pull request adds 2D interpolation capability to AeroDyn airfoils, based on code @ghaymanNREL sent me earlier this year.
Previous versions interpolated airfoils within a table based on angle of attack. This version also interpolates between airfoil tables based on Reynolds number or a user-control parameter.
The AeroDyn input file has changed. New input files for the regression test cases can be found here: https://github.com/bjonkman/r-test/tree/pullrequest/bjonkman-airfoil. None of the regression tests currently use 2D airfoil interpolation, but the SWRT airfoil files do contain data for multiple Reynolds numbers, so they could be modified to use the additional tables.
Regression tests pass if built with
-DSPLINE_INTERP
, which overrides the default airfoil interpolation method, which has changed.Details
AeroDyn changes:
AFTabMod
input parameter in the AeroDyn input file.This will change regression-test results if the interpolation order is not specified in the airfoil files. (This includes all of the regression tests that use AeroDyn.)
UncoupledErrFn()
was replaced withBEMTU_InductionWithResidual(
), which already existed and performed the same basic tasks.GetSteadyOutputs(
) in UA andComputeSteadyAirfoilCoefs(
) in BEMT were removed and replaced withAFI_ComputeAirfoilCoefs()
.AFI_GetAirfoilParams(
) was replaced withAFI_ComputeUACoefs()
.C_nalpha_circ
was removed fromAFI_ComputeUACoefs()
and placed in UA'sComputeKelvinChain()
instead.OpenFAST Registry changes:
but using it will result in smaller files if types exist but ExtrapInterp isn't necessary for the module)
Visual Studio build changes:
General changes:
The following documentation has been updated:
The following source file are not used but are still in the repo, in case they are useful elsewhere:
The following source file are unnecessary and were deleted from the repo:
One more thing...
The BEMT solution computes the Reynolds number using axial and tangential induction factors set to 0. Then, it gets cl and cd from the airfoil tables (potentially based on Reynolds number), which allow it to compute the axial and tangential induction factors. The BEMT solve would have to be modified to solve these items simultaneously. Apparently there was discussion at NREL that using induction factors or zero was an okay approximation for Reynolds number (for now).