Open Aircraft Performance Model (OpenAP) in Python
Project description
OpenAP: Open Aircraft Performance Model and Toolkit
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+
🕮 User Guide
The OpenAP handbook is available at openap.dev.
Installation
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
Content
Model Data
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 the acropole model by @JarryGabriel.
- Kinematic data: The kinematic model describes speed, altitude, and vertical rate (reference).
- Navigation data: Airport and waypoints obtained from X-Plane.
Python Packages
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:
import openap
# Get aircraft properties
aircraft = openap.prop.aircraft("A320")
print(aircraft["mtow"]) # max takeoff weight: 78000 (kg)
# Calculate fuel flow during cruise
fuelflow = 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).
Add-ons
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:
from openap.addon import bada4
fuelflow = bada4.FuelFlow()
The methods and attributes of openap.addon.bada4.FuelFlow() are the same as those of openap.FuelFlow().
Alternative Backends: CasADi and JAX
OpenAP supports multiple computational backends beyond NumPy:
- CasADi: For symbolic computations and optimization
- JAX: For automatic differentiation and GPU acceleration
Installation
Install with optional backend support:
pip install openap[casadi] # CasADi backend
pip install openap[jax] # JAX backend
pip install openap[all] # Both backends
Usage
# CasADi backend
import openap.casadi as oc
fuelflow = oc.FuelFlow("A320")
fuelflow.enroute(mass, tas, alt) # works with CasADi DM, SX, or MX types
# JAX backend
import openap.jax as oj
fuelflow = oj.FuelFlow("A320")
fuelflow.enroute(mass, tas, alt) # works with JAX arrays
The API is identical to the standard openap module. The backends are implemented using a protocol-based architecture in openap/backends/.
Citing OpenAP
@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}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openap-2.5.0.tar.gz.
File metadata
- Download URL: openap-2.5.0.tar.gz
- Upload date:
- Size: 9.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10a7c6c528b494dd275fcc52c509e71a19e63dd9baa7d455c6c4e64688ea4b1f
|
|
| MD5 |
3ae0a2b288aa9af11c75b7a03a39f8eb
|
|
| BLAKE2b-256 |
01965ce6ef19c843bcc637ef0f6de4fa9ead65ed081982d880364e31c18833ae
|
File details
Details for the file openap-2.5.0-py3-none-any.whl.
File metadata
- Download URL: openap-2.5.0-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ca114b06a175ffc45ebdeffd10fcd076a6877eb3e5f4b116c732feb4bcbdfca
|
|
| MD5 |
cbdf09470c6163bfa65fc893c738baf6
|
|
| BLAKE2b-256 |
ef1e038e5131590b16a8b02f35199d94a5338d5779553e5940a72a106ec8323b
|