Add 3D stall delay correction, fix tangential induction model, add CachedLUT#18
Add 3D stall delay correction, fix tangential induction model, add CachedLUT#18
Conversation
|
|
||
| geom.annulus_average( | ||
| np.clip(aero_props.C_x_corr, 0, 1.69) | ||
| np.clip(aero_props.C_x_corr, -10, 10) |
There was a problem hiding this comment.
I think it would be good if this wasn't a magic number. Can we make a variable that is appropriately named so we know what the -10 and 10 mean?
| tilt: float = 0.0, | ||
| ) -> ArrayLike: | ||
| axial_force = np.clip(aero_props.C_x_corr, 0, 1.69) | ||
| axial_force = np.clip(aero_props.C_x_corr, -10, 10) |
| aprime = ( | ||
| np.clip(aero_props.C_tau_corr, -2, 2) | ||
| / (4 * np.maximum(geom.mu_mesh, 0.1) ** 2 * tsr * (1 - aero_props.an) * np.cos(eff_yaw)) | ||
| np.clip(aero_props.C_tau_corr, -10, 10) |
There was a problem hiding this comment.
Same here! What is 10 and -10?
| a = (2 * Cx - 4 + np.sqrt(-(Cx**2) * np.sin(yaw) ** 2 - 16 * Cx + 16)) / ( | ||
| -4 + np.sqrt(-(Cx**2) * np.sin(yaw) ** 2 - 16 * Cx + 16) | ||
| ) | ||
| sqrt_term = np.sqrt(np.maximum(-(Cx**2) * np.sin(yaw) ** 2 - 16 * Cx + 16, 0)) |
There was a problem hiding this comment.
Thanks for fixing this! Yay for no more negative in square root warnings!
skygering
left a comment
There was a problem hiding this comment.
Okay this looks good to me overall! My only question would be, did you test the lookup table? If so, can you drop those in a test? If not, I can do it. I envision that as just comparing the lookup table solution to the non-lookup table solution and making sure they are equal to machine precision (or near that) for a range of setpoints.
We should also add a sentence on the changes to the docs!!
This pull request includes:
You're making a pull request to a branch (probably main) of MITWindFarm. Please ensure you have done the following.
If you want more details on best practices, please see the following guide on the Howland Lab Google Drive.
Happy merging!