-
Notifications
You must be signed in to change notification settings - Fork 16
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
Generalized propulsion functions #113
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #113 +/- ##
==========================================
+ Coverage 73.42% 73.53% +0.10%
==========================================
Files 78 81 +3
Lines 13671 13733 +62
==========================================
+ Hits 10038 10098 +60
- Misses 3633 3635 +2 ☔ View full report in Codecov by Sentry. |
removed HXs array from wsize
9b71179
to
7b2196d
Compare
src/mission/mission.jl
Outdated
#Unpack aircraft | ||
pari, parg, parm, para, pare, fuse, fuse_tank, wing, htail, vtail = unpack_ac(ac, imission) | ||
#Engine model | ||
enginecalc!, _ = extract_engine_model(ac.engine) |
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.
we could access all of this directly with engine.enginecalc!
with the suggested changes
I made the changes suggested by @askprash. The code is still somewhat slower and with more allocations than |
This PR introduces new engine functions:
enginecalc!
andengineweight!
that replace the engine function calls. These functions act as handles for any propulsion function that can use the same syntax, e.g., do design or off-design cases.The
enginecalc!
andengineweight!
functions are stored and then extracted from a newEngine
object produced when the input file is read. The user is free to then replace those functions with others if a more custom propulsion option is desired.The old turbofan functions are now stored in a dedicated
turbofan
folder insidesrc/engine
. New functions calledtfwrap!
andtfweightwrap!
have been created as wrappers for the old functions and related pieces of code, such that these can be called by the generalized functions.