Skip to content
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

Tutorials questions #13

Open
LostSunset opened this issue Oct 14, 2024 · 7 comments
Open

Tutorials questions #13

LostSunset opened this issue Oct 14, 2024 · 7 comments

Comments

@LostSunset
Copy link

Hello,
Thank you for creating this project. I have the following questions:
Question 1:
I use python 3.10 and pip install pyturbo-aero. As a result, the installed pyturbo-aero is version 1.0.16. But the tutorials that can be downloaded from github are version 1.0.14. I found that most tutorials have errors in version 1.0.16. Which version should I use in the future?

Question 2:
You mentioned in tutorials, "Note: The 1D design of a Turbine or compressor is absolutely critical and must not be overlooked. 3D design optimization without changing the inlet and exit flow angles (Velocity triangles) can result in 1-2% efficiency improvement. Greater improvements can be achieved by optimizing the 1D."
Is there any recommended project that can calculate 1D parameters and input them directly into pyturbo-aero?

@pjuangph
Copy link
Collaborator

Just saw this. I have made some changes and I think it should be working now. Can you let me know if any of the Jupyter notebook tutorials are still broken?

I released this code turbo design https://github.com/nasa/turbo-design which may help with the 1D design. It will give you velocity triangles and you can use legacy loss models. I am working on releasing some ML models in the future.

Just for a reference, there are teams at NASA that have funding but I don't have that kind of funding. I'm happy to fix bugs and work on new stuff but I develop and maintain about 7 code releases and Im bad at multitasking.

@LostSunset
Copy link
Author

LostSunset commented Nov 21, 2024

Thank you for your quick response and for fixing the issues. I'll check the Jupyter notebook tutorials again with the latest version.
I really appreciate you sharing the turbo-design repository link. This is exactly what I was looking for regarding the 1D design calculations. I understand the challenges of maintaining multiple code bases as a solo developer, and I'm grateful for your work on these open-source tools for the turbomachinery community.
Thanks again for your dedication to these projects despite the limited resources.

@LostSunset
Copy link
Author

LostSunset commented Nov 21, 2024

I'm testing the tutorials with v1.0.17 and encountered a TypeError in the 3D_StageTutorial.ipynb. Specifically, there's an error in the passage2D creation:
passage = passage2D([stator_adjusted,rotor_adjusted],[stator_rotor_gap])
The error message shows: "TypeError: 'module' object is not callable". This suggests there might be an issue with how passage2D is being imported or called in the newer version. Could you please check if the syntax for creating a passage2D object has changed in v1.0.17?
For reference, this error appears when trying to create a 2D passage after rotating the geometry at line 2 of the shown code block.
image

@LostSunset
Copy link
Author

I'm also encountering another error in 3D_design_test.py with v1.0.17. When trying to create an airfoil2D object, I get the following TypeError:

Traceback (most recent call last):
  File "d:\SynologyDrive\Learning\pyturbo-aero-main\tutorials\3D_design_test.py", line 7, in <module>
    stator_hub = airfoil2D(alpha1=0,alpha2=72,axial_chord=0.038,stagger=58) # This creates the camberline
TypeError: 'module' object is not callable

This appears to be a similar issue to the passage2D error - the airfoil2D object also cannot be called directly. These errors suggest there might be breaking changes in how the objects are instantiated in v1.0.17. Could you please advise on the correct syntax for creating airfoil2D objects in the latest version?

@pjuangph
Copy link
Collaborator

pjuangph commented Nov 21, 2024

I see, it should be Passage2D. I made the change to the tutorial yesterday. Try refreshing your cache.

https://github.com/nasa/pyturbo-aero/blob/main/tutorials/3D_StageTutorial.ipynb

@LostSunset
Copy link
Author

LostSunset commented Nov 22, 2024

Thank you for sharing these updates! I've fixed the errors by making the following changes:

  1. Class name capitalization:
    airfoil2D → Airfoil2D
    airfoil3D → Airfoil3D
    passage2D → Passage2D

  2. Updated the create_blade method call syntax in 3D_design_test.py:
    Old
    stator3D.create_blade(nProfiles=20,profile_points=160,trailing_edge_points=20)
    New
    stator3D.create_blade(20, 160, 20)

With these modifications, all tutorials are now running.
However, I notice some unusual geometry output (green lines) in 3D_DesignTutorial.ipynb. I'm seeing unexpected geometric patterns. Could you help clarify if this is the expected behavior or if there might be additional parameters I should adjust?
image

@pjuangph
Copy link
Collaborator

pjuangph commented Nov 22, 2024

The blue and red curves are the ones that are important as they are exported. Those come from this line

shft_xss: np.ndarray # Suction side Final points with lean and sweep

The points shft_xss etc are those that have the blue and red curves defined.

The green curves represent your 3 control profiles or however many you choose to define. In this example, lean is imposed and I believed the blade is flipped. The control profiles are untouched as they should be.

I will need to investigate the cause of weird plotting of the leading edge though. It's a minor bug but I can see why one would be worried.

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

No branches or pull requests

2 participants