- Notifications
You must be signed in to change notification settings - Fork37
Open aircraft performance model and Python toolkit
License
junzis/openap
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Open-source aircraft performance model and toolkit for Python. Calculate aircraft performance, fuel consumption, and emissions for air transportation studies and simulations.
Requirements: Python 3.11+
The OpenAP handbook is available atopenap.dev.
Install the latest stable release from PyPI:
pip install --upgrade openap
Install the development branch from GitHub (may not be stable):
pip install --upgrade git+https://github.com/junzis/openap
Data in this repository includes:
- Aircraft data: Collected from open literature.
- Engine data: Primarily from the ICAO emission data-bank, including fuel flow and emissions.
- Drag polar model data: Exclusively derived from open data (reference).
- Fuel model data: Polynomial models derived from theacropole model by@JarryGabriel.
- Kinematic data: The kinematic model describes speed, altitude, and vertical rate (reference).
- Navigation data: Airport and waypoints obtained fromX-Plane.
The OpenAP Python library includes the following packages:
prop: Module for accessing aircraft and engine properties.aero: Module for common aeronautical conversions.nav: Module for accessing navigation information.thrust: Module providesThrust()class for computing aircraft thrust.drag: Module providesDrag()class for computing aircraft drag.fuel: Module providesFuelFlow()class for computing fuel consumption.emission: Module providesEmission()class for computing aircraft emissions.kinematic: Module providesWRAP()class for accessing kinematic performance data.phase: Module providesFlightPhase()class for determining flight phases.gen: Module providesFlightGenerator()class for trajectory generation.
Example:
importopenap# Get aircraft propertiesaircraft=openap.prop.aircraft("A320")print(aircraft["mtow"])# max takeoff weight: 78000 (kg)# Calculate fuel flow during cruisefuelflow=openap.FuelFlow("A320")ff=fuelflow.enroute(mass=60000,tas=250,alt=30000)print(ff)# fuel flow: 0.92 (kg/s)
Units: Input parameters can be scalar, list, or ndarray. Speeds are in knots, altitudes in feet, vertical rates in feet/min. Mass is in kilograms (SI).
The OpenAP library can also be used to interact with BADA performance models if you have access to the BADA data from EUROCONTROL. You can use the following code:
fromopenap.addonimportbada4fuelflow=bada4.FuelFlow()
The methods and attributes ofopenap.addon.bada4.FuelFlow() are the same as those ofopenap.FuelFlow().
OpenAP supports multiple computational backends beyond NumPy:
- CasADi: For symbolic computations and optimization
- JAX: For automatic differentiation and GPU acceleration
Install with optional backend support:
pip install openap[casadi]# CasADi backendpip install openap[jax]# JAX backendpip install openap[all]# Both backends
# CasADi backendimportopenap.casadiasocfuelflow=oc.FuelFlow("A320")fuelflow.enroute(mass,tas,alt)# works with CasADi DM, SX, or MX types# JAX backendimportopenap.jaxasojfuelflow=oj.FuelFlow("A320")fuelflow.enroute(mass,tas,alt)# works with JAX arrays
The API is identical to the standardopenap module. The backends are implemented using a protocol-based architecture inopenap/backends/.
@article{sun2020openap, title={OpenAP: An open-source aircraft performance model for air transportation studies and simulations}, author={Sun, Junzi and Hoekstra, Jacco M and Ellerbroek, Joost}, journal={Aerospace}, volume={7}, number={8}, pages={104}, year={2020}, publisher={Multidisciplinary Digital Publishing Institute}}About
Open aircraft performance model and Python toolkit
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.