-
Notifications
You must be signed in to change notification settings - Fork 3
Add 3D stall delay correction, fix tangential induction model, add CachedLUT #18
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
Closed
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
05a58d5
implement and test 3D stall delay model
iupfal d293da5
update for robustness
iupfal c00e60d
fixing momentum
iupfal 7ce84a6
switch to trapezoid
iupfal 56dc500
update numpy
iupfal 617c103
trapEzoid
iupfal fc5d1cd
update
iupfal 98e8e17
update
iupfal 4abac0f
clean up stall delay model
iupfal 94ad604
clean up test
iupfal 7496851
clean up test
iupfal ed4d2ba
update python version
iupfal 23727c0
avoid divide by zero in tangential induction
iupfal 2d8396e
clarify example 2
iupfal fb57aee
prevent negative in sqrt and divide by zero in Heck momentum model
iupfal a01d02e
update rotor distribution example
iupfal 3d51268
update example 3
iupfal 4aec6e3
add cachedlut functionality
iupfal 3fa41f7
default tilt to zero for look up table
iupfal ab23dbc
clean up BEM properties
iupfal ff9cb61
clean up 3D stall delay correction
iupfal d4434a2
avoid negative in sqrt in madsen
iupfal b428af2
rename test to example
iupfal 86d6156
drop 3.9, add 3.14 to testing
iupfal 65d78a7
fix geometry scale
iupfal da8d281
fix _func issue with constant induction
iupfal cc96ce9
fix _func in constant induction
iupfal adef65e
Remove changes moved to CachedLUT PR
skygering b7dcb77
Merge branch 'master' into imlu/3D_stall_delay_correction
skygering File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| import numpy as np | ||
| import matplotlib.pyplot as plt | ||
| from pathlib import Path | ||
| from MITRotor import ( | ||
| BEM, | ||
| IEA10MW, | ||
| DefaultAerodynamics | ||
| ) | ||
|
|
||
| figdir = Path("fig") | ||
| figdir.mkdir(exist_ok=True, parents=True) | ||
|
|
||
| def test(): | ||
| model = BEM( | ||
| aerodynamic_model=DefaultAerodynamics(apply_3D_stall_correction=False), | ||
| rotor=IEA10MW(), | ||
| ) | ||
|
|
||
| aoa = np.radians(np.linspace(-5, 30, 100)) | ||
| mu = 0.4 * np.ones_like(aoa) | ||
| tsr = 2.0 | ||
| Cl_uncorr, Cd_uncorr = model.rotor.clcd( | ||
| mu, aoa, tsr=tsr, apply_3D_stall_correction=False | ||
| ) | ||
| Cl_corr, Cd_corr = model.rotor.clcd( | ||
| mu, aoa, tsr=tsr, apply_3D_stall_correction=True | ||
| ) | ||
|
|
||
|
|
||
| fig, ax = plt.subplots(1, 2, figsize=(10, 5)) | ||
| ax[0].plot(np.degrees(aoa), Cl_uncorr, label="2D Airfoil") | ||
| ax[0].plot(np.degrees(aoa), Cl_corr, label="3D Stall Corrected") | ||
| ax[0].set_xlabel("Angle of Attack (degrees)") | ||
| ax[0].set_ylabel("Cl") | ||
| ax[0].set_title("Lift Coefficient with 3D Stall Correction") | ||
| ax[0].legend() | ||
|
|
||
| ax[1].plot(np.degrees(aoa), Cd_uncorr, label="2D Airfoil") | ||
| ax[1].plot(np.degrees(aoa), Cd_corr, label="3D Stall Corrected", color='orange') | ||
| ax[1].set_xlabel("Angle of Attack (degrees)") | ||
| ax[1].set_ylabel("Cd") | ||
| ax[1].set_title("Drag Coefficient with 3D Stall Correction") | ||
| ax[1].legend() | ||
|
|
||
| plt.savefig(figdir / "3D_stall_correction_test.png") | ||
|
|
||
| if __name__ == "__main__": | ||
| test() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Same here! What is 10 and -10?