-
Notifications
You must be signed in to change notification settings - Fork 184
Radiation damping load extrapolation #1476
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
Conversation
|
Thanks @TianyuanWangi I will review first thing next week. |
|
Hi @akeeste |
akeeste
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TianyuanWangi
I pushed a couple minor formatting changes in extrapFrad and updated the name of ``convolutionIntegralInterp` in a couple other places.
My main request before merging:
extrapFrad could largely be simplified to call MATLAB's interp1, instead of manually defining the interpolation. That will remove the if statements, making the function cleaner and faster, and enable different interpolation schemes in the future.
Can you update the function to do this? If timeHistory in convolutionIntegralInterp and convolutionIntegralSurface is initialized to [-2*simu.cicDT -1*simu.cicDt 0] instead of zeros(3,1), interp1 can be called as is
|
Hi @akeeste I think you propose a better solution. Now the codes in extrapFrad.m is simplified to I used 'pchip' instead of 'spline', as the latter is is very unstable during the first few time steps when only limited data is available. Since simulink doesn't have an interpolation function, I have to implement it via matlab function. The timeHistory is initialized as , following the principle that the updated data is the first element. At the initial time step, it turns to |
akeeste
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TianyuanWangi for your contribution! My apologies for the long timeline on getting this into WEC-Sim.
I pushed one last commit to add the extrapFrad function to the flex body and save the library to R2020b
|
I pushed two last commits to fix the cicTest format and correct the sizing of Tests are failing but due to runner issues, not this PR. I tested locally and everything passed so I am merging to prevent library conflicts with other PRs. |
Add a feature to extrapolate the radiation damping loads. Since convolutionIntegralInterp and convolutionIntegralSurface use persistent variables to track velocityHistory over time, radiation damping loads cannot be updated at each sub-time step.
See #1450