• Stars
    star
    745
  • Rank 60,881 (Top 2 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Aircraft design optimization made fast through computational graph transformations (e.g., automatic differentiation). Composable analysis tools for aerodynamics, propulsion, structures, trajectory design, and much more.

AeroSandbox ✈️

by Peter Sharpe (<pds [at] mit [dot] edu>)

Downloads Monthly Downloads Build Status PyPI Documentation Status License: MIT

AeroSandbox is a Python package that helps you design and optimize aircraft and other engineered systems.

At its heart, AeroSandbox is an optimization suite that combines the ease-of-use of familiar NumPy syntax with the power of modern automatic differentiation.

This automatic differentiation dramatically improves optimization performance on large problems: design problems with tens of thousands of decision variables solve in seconds on a laptop. AeroSandbox also comes with dozens of end-to-end-differentiable aerospace physics models, allowing you to simultaneously optimize an aircraft's aerodynamics, structures, propulsion, mission trajectory, stability, and more.

Keeping AeroSandbox easy to learn and use is a top priority. Complexity is optional - you can use AeroSandbox's built-in physics models where helpful, or you can drop in arbitrary custom physics models of your own.

pip install aerosandbox[full]

What can I do with AeroSandbox?

Use AeroSandbox to design and optimize entire aircraft:

Feather (an ultra-lightweight 1-meter-class RC motor glider)

Feather first page

SEAWAY-Mini (a solar-electric, 13' wingspan seaplane)

Seaway-Mini first page

Use AeroSandbox to support real-world aircraft development programs, all the way from your very first sketch to your first-flight and beyond:

Initial concept sketches + sizing of Dawn (a solar-electric airplane for climate science research) in AeroSandbox, Spring 2020

Dawn initial design

Dawn (later renamed SACOS) in first flight, Fall 2022

(A massive build effort with excellent engineering and coordination by Electra.aero!)

SACOS first flight

Use AeroSandbox to explore counterintuitive, complicated design tradeoffs, all at the earliest stages of conceptual design where these insights make the most difference:

Exploring how big a solar airplane needs to be to fly, as a function of seasonality and latitude

Dawn seasonality latitude tradespace

Exploring how the mission range of Firefly, a Mach 0.8 rocket drone, changes if we add an altitude limit, simultaneously optimizing aircraft design and trajectories

Firefly range ceiling trade

Exploring how many LH2 aircraft classes an airline fleet needs to cover the market, considering off-design performance

LH2 Market Coverage

Use AeroSandbox as a pure aerodynamics toolkit:

VLM simulation of a glider, aileron deflections of +-30°

VLM simulation

Aerodynamic shape optimization of a wing planform, using an arbitrary objective and constraints

Wing optimization

Among many other discplines:

Structural optimization of a composite tube spar

Beam optimization

Electric motor analysis for propeller matching

Motor performance

Tools to analyze unconventional propulsion (e.g., LH2)

LH2 airplane three-view

Detailed weights estimation for aircraft ranging from micro-UAVs to airliners

Mass Budget

Easily interface AeroSandbox with all your favorite tools:

Other conceptual design tools (AVL, XFLR5, XFoil, ASWING, MSES, etc.)

XFoil

CAD tools via STEP export (SolidWorks, Fusion 360, etc.)

(STL, OBJ, etc. supported too)

CAD

User-provided models + code (for custom aerodynamics, structures, propulsion, or anything else - e.g., for optimizing flight through a probabilistic wind field, shown below)

Wind speed

Or, throw all the airplane-design-specific code out entirely, and use AeroSandbox purely as an optimization solver or as a solver for nonlinear systems of equations (or ODEs, or PDEs):

Optimize the 2D Rosenbrock function

Optimization

Specify the Falkner Skan ODE (nonlinear, 3rd-order BVP) and let AeroSandbox automatically take care of the discretization, solution, and even inverse solving.

FS ODE

And much, much more. Best of all, combine these tools arbitrarily without any loss in optimization speed and without any tedious derivative math, all thanks to AeroSandbox's end-to-end automatic-differentiability.

Getting Started

Installation

In short:

  • pip install aerosandbox[full] for a complete install.

  • pip install aerosandbox for a lightweight (headless) installation with minimal dependencies. All optimization, numerics, and physics models are included, but optional visualization dependencies are skipped.

For more installation details (e.g., if you're new to Python), see here.

Tutorials, Examples, and Documentation

To get started, check out the tutorials folder here! All tutorials are viewable in-browser, or you can open them as Jupyter notebooks by cloning this repository.

For a more detailed and theory-heavy introduction to AeroSandbox, please see this thesis.

For a yet-more-detailed developer-level description of AeroSandbox modules, please see the developer README.

For fully-detailed API documentation, see the documentation website.

You can print documentation and examples for any AeroSandbox object by using the built-in help() function (e.g., help(asb.Airplane)). AeroSandbox code is also documented extensively in the source and contains hundreds of unit test examples, so examining the source code can also be useful.

Usage Details

One final point to note: as we're all sensible and civilized here, all inputs and outputs to AeroSandbox are expressed in base SI units, or derived units thereof (e.g, m, N, kg, m/s, J, Pa).

The only exception to this rule is when units are explicitly noted via variable name suffix. For example:

  • battery_capacity -> Joules
  • battery_capacity_watt_hours -> Watt-hours.

All angles are in radians, except for α and β which are in degrees due to long-standing aerospace convention. (In any case, units are marked on all function docstrings.)

If you wish to use other units, consider using aerosandbox.tools.units to convert easily.

Project Details

Contributing

Please feel free to join the development of AeroSandbox - contributions are always so welcome! If you have a change you'd like to make, the easiest way to do that is by submitting a pull request.

The text file CONTRIBUTING.md has more details for developers and power users.

If you've already made several additions and would like to be involved in a more long-term capacity, please message me! Contact information can be found next to my name near the top of this README.

Donating

If you like this software, please consider donating to support development via PayPal or GitHub Sponsors! Proceeds will go towards more coffee for the grad students.

Bugs

Please, please report all bugs by creating a new issue!

Versioning

AeroSandbox loosely uses semantic versioning, which should give you an idea of whether or not you can probably expect backward-compatibility and/or new features from any given update.

For more details, see the changelog.

Citation & Commercial Use

If you find AeroSandbox useful in a research publication, please cite it using the following BibTeX snippet:

@mastersthesis{aerosandbox,
    title = {AeroSandbox: A Differentiable Framework for Aircraft Design Optimization},
    author = {Sharpe, Peter D.},
    school = {Massachusetts Institute of Technology},
    year = {2021}
}

As the MIT License applies, use AeroSandbox for anything you want (attribution appreciated, but not required).

Commercial users: I'm more than happy to discuss consulting work for active AeroSandbox support if this package proves helpful - use the email address in the header of this README to get in touch.

License

MIT License, terms here. Basically: use AeroSandbox for anything you want; no warranty express or implied.

Stargazers over time

Stargazers over time

More Repositories

1

NeuralFoil

NeuralFoil is an airfoil aerodynamics analysis tool using physics-informed machine learning, in pure Python/NumPy.
Python
100
star
2

AeroSandbox-Interactive-Demo

An interactive demo of AeroSandbox, powered by Dash
Python
22
star
3

Automotive-Airfoil-Design

Automotive airfoil design app, powered by AeroSandbox and Dash
Python
20
star
4

PotentialFlowVisualizer

A fun, lightweight tool to visualize potential flows quickly!
Python
15
star
5

air-racing-optimization

Trajectory Optimization for Low-Altitude Air Racing
Python
14
star
6

prettymaps

Pretty maps of areas of interest
Python
12
star
7

transport-aircraft

AeroSandbox models for commercial transport aircraft
Python
12
star
8

DawnDesignTool

Dawn Design Tool
Python
10
star
9

covid-hotspots

An interactive web-based map of current U.S. COVID-19 hotspots
HTML
9
star
10

solar-seaplane-preliminary-sizing

Preliminary sizing of a 13' solar-powered seaplane for MIT 16.821 teaching
Python
7
star
11

Feather-RC-Glider

Design & optimization of Feather, an ultra-lightweight 1-meter hand-launched RC glider
Python
5
star
12

Wind_Analysis

Statistical models of wind and other atmospheric dynamics
Python
5
star
13

StockMarketAnalysis

Futility can be fun sometimes
Jupyter Notebook
3
star
14

CylinderDragFits

A proper curve fit for both sub- and supercritical cylinder flows
MATLAB
3
star
15

better-biobot-boston

Better visualization of Biobot's COVID-19 data
Python
2
star
16

Falkner-Skan

A few short, well-commented functions for solving the Falkner-Skan boundary layer equations in Python.
Python
2
star
17

mirror-array

Math used to create a mirror array that reflects light into a coherent image.
G-code
2
star
18

mit-free-food-timing

Data on Free Food at MIT
Python
2
star
19

optimization-methods

Toy implementations and illustrations of various optimization algorithms. Written as a pedagogical exercise; shared in hopes they can serve the same purpose for others.
Python
2
star
20

masters-thesis

Jupyter Notebook
1
star
21

Neural-PDEs

Approximating PDE solutions with Neural Networks
Python
1
star
22

AutoDiffUncertaintyOptimization

Testing out some ideas to optimize under uncertainty using automatic differentiation.
Python
1
star
23

peter-ipython-terminal

A simple scratch terminal, powered by IPython and integrated with WolframAlpha and SymPy, that I use for quick calculations.
Python
1
star
24

peterdsharpe.github.io

https://peterdsharpe.github.io
HTML
1
star
25

E-Bike

Code for designing an optimized electric bike + CAD of the bike
Python
1
star
26

KSP-Homing-Missile

Java
1
star
27

aircraft-polar-reconstruction-from-flight-test

Rigorous procedures for reconstruction of aerodynamic and propulsive performance from a minimal set of flight-test data
Jupyter Notebook
1
star