Skip to content

Add 3D stall delay correction, fix tangential induction model, add CachedLUT#18

Closed
iupfal wants to merge 29 commits intomasterfrom
imlu/3D_stall_delay_correction
Closed

Add 3D stall delay correction, fix tangential induction model, add CachedLUT#18
iupfal wants to merge 29 commits intomasterfrom
imlu/3D_stall_delay_correction

Conversation

@iupfal
Copy link
Copy Markdown
Contributor

@iupfal iupfal commented Feb 6, 2026

This pull request includes:

  1. Adds a 3D stall delay correction which can be set in the aerodynamic model.
  2. Fixes an issue with the tangential induction model.
  3. Improves robustness by preventing divide by zeros and taking square roots of negative values.
  4. Cleans up BEM output properties
  5. Adds CachedLUT method for Unified Momentum Model for accelerated BEM computations.

You're making a pull request to a branch (probably main) of MITWindFarm. Please ensure you have done the following.

  • Request a review from other Howland Lab members who use MITWindFarm.
  • Add at least a sentence on your change to the documentation (probably the quickstart guide).
  • Add tests for your new functionality.
  • Make sure the tests pass and the documentation notebook still runs.
  • [] Get approval from the folks you requested a review from.

If you want more details on best practices, please see the following guide on the Howland Lab Google Drive.

Happy merging!

@iupfal iupfal changed the title Add 3D stall delay correction, fix tangential induction model Add 3D stall delay correction, fix tangential induction model, add CachedLUT Feb 6, 2026
@iupfal iupfal requested a review from skygering February 6, 2026 21:00
Comment thread MITRotor/Momentum.py

geom.annulus_average(
np.clip(aero_props.C_x_corr, 0, 1.69)
np.clip(aero_props.C_x_corr, -10, 10)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Comment thread MITRotor/Momentum.py
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here as above!

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here! What is 10 and -10?

Comment thread MITRotor/Momentum.py
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))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this! Yay for no more negative in square root warnings!

Copy link
Copy Markdown
Contributor

@skygering skygering left a comment

Choose a reason for hiding this comment

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

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!!

@iupfal iupfal closed this Mar 2, 2026
@iupfal iupfal deleted the imlu/3D_stall_delay_correction branch March 2, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants