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

Optimization of turboprop model #217

Merged
merged 13 commits into from Apr 2, 2024
Merged

Optimization of turboprop model #217

merged 13 commits into from Apr 2, 2024

Conversation

florentLutz
Copy link
Member

The turboprop model was reworked as an OpenMDAO problem rather than relying on scioy to compute fuel consumption and max thrust. Consequently we now have nested problem that are stored as class attributes of the BasicTurbopropEngine. A significant work was done to ensure that these problem are only setup when needed and only once. Also to do subsequent computation we don't "reset" the problem so it is already "warm started". Implemented a pseudo cache for the max thrust function

Rewrote the formula necessary to compute the turboprop geometry, fuel consumption and maximum thrsut under the form of an OpenMDAO problem. The rationale behind it is that it seems to be quicker to solve it like this which would reduce the computation time of what is right the longest module in FAST-OAD_CS23. Now, what's left to do is implement the use of these components (whose validity were checked in another project) and optimize the implementation, using results caching or a smarter breakdown of the maps
The turboprop sizing has been tested and implemented as a nested problem whose setup is done only once and only when needed
As for the problem, the geometry parameter are computed only when needed
The 4 different problems that will help computing the max thrust at all altitudes have now been implement as was done for the sizing of the turboprop. Note that a problem for the case where propeller thrust is limiting has been added. Their use in the max_thrust function has not yet been implemented !
Reworked the max thrust function so that it uses the nested problem. The main assumption is that, if limits are reached, they are reached in this order : power, opr, itt, propeller thrust.
Also added a small cache to the max thrust function for cases like cruise where altitude and speed don't vary
The 2 different problems that will help computing the fuel consumed have now been implement as was done for the sizing of the turboprop. There is a problem with a linesearch algorithm that can be used but will not be favored if possible. There implementation in the sfc function have not yet been implemented
There some differences with the previous version of the code although it is in the order of magnitude of 1-2% for a significant gain in time
Max power is basically computed using the same problem as max thrust is. Except intead of extracting the thrust required we extract shaft power
Remove methods that were previously used and not necessary anymore
Implemented a test to check the stauration of the cache
Reworked the cnstruction of the sfc map for the turboprop and checked tested, only minor difference on predicted sfc with new map generation for a considerable speedup (7m to 30s). Now we will test and rework the reading of those maps. Btw `scipy.interpolate.interp2d` is gonna be deprecated so it was changed
Tested the turboprop map construction and read on the TBM900 sizing process. Minimal change on the fuel consumed. Also implemented more widely the use of LinearNDInterpolator to replace interp2d
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 91.23932% with 205 lines in your changes are missing coverage. Please review.

Project coverage is 85.61%. Comparing base (80a0328) to head (04c50cd).
Report is 120 commits behind head on main.

Files Patch % Lines
.../fuel_propulsion/basicTurbo_prop/basicTP_engine.py 68.83% 125 Missing and 9 partials ⚠️
...prop_components/turboshaft_off_design_max_power.py 66.01% 35 Missing ⚠️
.../basicTurbo_prop_map/basicTP_engine_constructor.py 5.55% 17 Missing ⚠️
...cTurbo_prop_map/unitary_tests/test_daher_tbm900.py 0.00% 12 Missing ⚠️
...lsion/basicTurbo_prop_map/basicTP_engine_mapped.py 93.33% 3 Missing ⚠️
...prop_components/turboshaft_geometry_computation.py 97.40% 0 Missing and 2 partials ⚠️
...turboprop_components/turboshaft_off_design_fuel.py 97.72% 0 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
+ Coverage   85.09%   85.61%   +0.52%     
==========================================
  Files         368      396      +28     
  Lines       26603    28471    +1868     
  Branches     1447     1464      +17     
==========================================
+ Hits        22637    24375    +1738     
- Misses       3658     3786     +128     
- Partials      308      310       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@florentLutz florentLutz merged commit 5876470 into main Apr 2, 2024
6 of 7 checks passed
@florentLutz florentLutz deleted the dev_turboprop_optim branch April 2, 2024 13:55
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.

None yet

2 participants