-
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
AeroDyn: Using interpolated inputs causes inaccurate results #349
Comments
I think this idea is addressed in PR #164, which hasn't been merged in yet. |
@andrew-platt It looks like the issue was addressed within FAST_Solver.f90 by overwriting predicted/extrapolated AeroDyn states with calculated ones in the subroutine By fixing I mean having AD_InputExtrapInterp only interpolate/extrapolate the HubMotion orientation, and using it to calculate what BladeRootMotion and BladeMotion's matrices should be, along with calculating where the blade node positions are given all of those previous things. Except for recalculating BladeRootMotion, this is what the subroutine |
@dustinjamescondon: I'm not sure these changes are necessary after PR #164 is merged. With AeroDyn, the extrap/interp routines are just a way of getting us inputs at The AeroDyn driver should also be taking steps of |
@bjonkman But whether or not it's used in the FAST glue-code or AeroDyn driver, wouldn't it be good to have
The code I posted is just to show the recalculation that seems to bring the interpolated/extrapolated inputs back to being usable again. I'm not sure exactly where this calculation should take place, but wherever that is, there could just be an additional check to see if any of the input times are close enough to the interpolation/extrapolation time to warrant just returning that input. It does seem like a finicky thing to solve though because of the fact that the interpolation code is registry generated. I haven't seen the other modules in any detail, but I'm guessing the reason the boiler-plate interpolation code doesn't quite work very well in AeroDyn is because of how the different orientation matrices in AeroDyn depend on one another: BladeMotion depends on BladeRootMotion depends on HubMotion. What may also be a cause of the problem is that linearly interpolating/extrapolating the blade node positions puts the nodes farther out (extrapolation) or closer in (interpolation) relative to the hub center. In any case having the issue posted will let people know a problem exists before using the results of AD_Input_ExtrapInterp. |
Dear @dustinjamescondon, The AD_Input_ExtrapInterp routine is registry generated and a similar routine is registry-generated for all OpenFAST modules. I'm not sure I fully understand why you say that the routine does not produce a "useable result". The routine does exactly what it is intended to do...interpolate or extrapolate the inputs using a linear fit (if inputs at two times are provided) or using a quadratic fit (if inputs at three times are provided). If the resulting interpolation or extrapolation is "not useable", this likely means that the time step is too large such that the linear or quadratic fit to the curve is not a good fit; in this case, I would lower the time step. Regardless, as Bonnie and Andy said, PR #164 avoids the issue all together because the input to AeroDyn at t+dt is not extrapolated; instead, it is computed directly by calling the other modules calculating inputs for AeroDyn beforehand. When running AeroDyn from the standalone driver, it is also possible to prescribe the exact inputs at t+dt. If AeroDyn was coupled to another structural solver, then I would suggest coupling AeroDyn using a similar scheme to what is proposed in PR #164. Otherwise, a correction step or a smaller time step is likely necessary. Also, please note that the time-integration scheme used by AeroDyn assumes a fixed time step of dt, so, while inputs are used by AeroDyn at t and t+dt, inputs are not used at t+dt/2. Best regards, |
Closing this issue now that PR #164 has been merged and there hasn't been any further discussion. @dustinjamescondon, please reopen the issue if you find the latest release (https://github.com/OpenFAST/openfast/tree/v2.2.0) does not adequately address your concerns. |
AD_UpdateStates(...) calls AD_Input_ExtrapInterp(...), which interpolates/extrapolates the inputs held in AD%u at 't' and 't + dt'. However, in AeroDyn_Driver, the inputs are always given at 't' and 't +dt', so no actual interpolation takes place. We can make AD_UpdateStates actually use interpolated inputs by offsetting the time of the simulation by dt/2:
[From AeroDyn_Driver.f90 (Only change is addition of
time = AD%InputTime(2) + 0.5 * dT_Dvr
to force AD_UpdateStates to actually interpolate the inputs)]And when AD_UpdateStates(...) actually uses interpolated inputs,
the non-axial forces and moments are thrown off: particularly RtAeroFzh, RtAeroFyh , RtAeroMyh, and RtAeroMzh.
I found what seems to be causing it and how to fix it. AD_Input_ExtrapInterp(...) linearly interpolates all the orientation matrices (held in HubMotion, BladeRootMotion, and BladeMotion), and the blade node positions. If the BladeMotion orientation matrices are instead recalculated using the interpolated HubMotion and BladeRootMotion matrices, and then the blade node positions recalculated using that BladeMotion orientation matrix, the non-axial forces are accurate once again.
[From AeroDyn.f90's subroutine AD_UpdateStates (Only change is
call RecalcBladeMotion(uInterp%HubMotion, uInterp%BladeRootMotion, uInterp%BladeMotion)
after each interpolation call)]Although this additional code of recalculating BladeMotion after each interpolation appears to correct the forces when actually interpolating inputs, it isn't a perfect fix, because AD_Input_ExtrapInterp(...) is still doing calculations which are just being overwritten by the additional code. But AD_Input_ExtrapInterp(...) is generated by the registry system. So I'm hoping someone can think of a better way addressing the issue.
In the attached folder:
InterpolationIssue.zip
The text was updated successfully, but these errors were encountered: