AeroSandbox

repository·master·Indexed 22 days ago

https://github.com/peterdsharpe/aerosandbox

A differentiable Python framework for aircraft design and optimization of engineered systems. Version 4.2.10 provides tools for aerodynamics (VLM, airfoil optimization), geometry manipulation, and multidisciplinary optimization of structures, propulsion, and mission trajectories. It includes dynamics engines for point mass, 3 DoF, and 6 DoF systems, as well as turbine engine datasets and a mathematical solver for nonlinear systems, ODEs, and PDEs.

Tokens
11.7K
Snippets
21
Records
63
Agent score
77%

What's inside AeroSandbox

  1. Overview of AeroSandbox capabilities

    master

    AeroSandbox is an optimization suite for designing and optimizing aircraft and engineered systems. It combines NumPy-like syntax with modern automatic differentiation, allowing for high-performance optimization of large-scale problems (e.g., tens of thousands of decision variables).

    Key Capabilities:

    • End-to-End Aircraft Design: Simultaneously optimize aerodynamics, structures, propulsion, mission trajectory, and stability.
    • Aerodynamics Toolkit: Includes 3D tools like the Vortex Lattice Method (VLM) and 2D tools for airfoil optimization.
    • Multidisciplinary Optimization: Supports structural optimization (e.g., composite spars), electric motor analysis, and detailed weight estimation.
    • Mathematical Solver: Can be used as a general-purpose solver for nonlinear systems of equations, Ordinary Differential Equations (ODEs), or Partial Differential Equations (PDEs).
    • Interoperability: Interfaces with conceptual design tools (AVL, XFLR5, XFoil, etc.), supports CAD export (STEP, STL, OBJ), and allows for arbitrary custom physics models.
  2. Overview of MachFitting

    master
    MachFitting is a tool designed to allow for sensible extrapolation of transonic aerodynamic models. It addresses the mathematical problem where the Prandtl-Glauert factor $\beta = \sqrt{1 - M^2}$, commonly used in transonic aerodynamic analysis, fails to extrapolate sensibly to Mach numbers $M < 0$, $M > 1$, or even $M$ values near $1$.
  3. Overview of AeroSandbox Dynamics engines

    master

    The dynamics module provides engines for computing the equations of motion for various free-flying dynamical systems. These engines are implemented within Python classes and are categorized by their degrees of freedom (DoF) and fidelity:

    • Point mass: The simplest model, treating the object as a single mass point.
    • 3 DoF (2D): Models motion in a two-dimensional plane.
    • 6 DoF (3D): Full three-dimensional models. These models support two different parameterization methods for the underlying state variables:
      • Euler angle parameterization
      • Quaternion parameterization
  4. Overview of AeroSandbox

    master

    AeroSandbox is a Python package designed for the design optimization of engineered systems, specifically aircraft. It functions as an optimization suite that leverages NumPy-style syntax combined with modern automatic differentiation. This allows for high-performance optimization of large-scale design problems (e.g., problems with tens of thousands of decision variables) on standard hardware.

    AeroSandbox provides end-to-end-differentiable aerospace physics models, enabling simultaneous optimization across multiple disciplines including:

    • Aerodynamics
    • Structures
    • Propulsion
    • Mission trajectory
    • Stability
  5. Understanding the unsweep effect on highly-swept wing aerodynamic centers

    master

    In workbook-style aerodynamic analyses (like AeroBuildup), a common error occurs when calculating the sectional aerodynamic center for highly-swept wings.

    The Problem: A naïve approach places the sectional aerodynamic center at the location found in 2D aerodynamics analysis (e.g., the quarter-chord $x/c=0.25$ for thin airfoils). While accurate for low-sweep wings, this fails for moderately- or highly-swept wings because the locus of aerodynamic centers actually 'unsweeps' near the centerline due to symmetry boundary conditions (or fuselage-wing intersections).

    The Impact: If this unsweep effect is ignored, the aerodynamic center of swept wings is estimated to be too far forward. This makes vehicle configurations appear less statically stable than they actually are, leading designers to unnecessarily oversize stabilizer surfaces, which increases drag and limits performance.

  6. Understand AeroSandbox units and conventions

    master

    AeroSandbox uses a coherent SI unit system for almost all inputs and outputs (e.g., m, kg, sec, N, m/s, J, Pa).

    Exceptions to the SI rule:

    1. Variable Suffixes: If a variable uses non-SI units, it is explicitly noted in the name. For example:
      • battery_capacity_watt_hours uses Watt-hours instead of Joules.
      • aircraft_endurance_hours uses hours instead of seconds.
    2. Aerospace Angles: Angle of attack (alpha, α) and sideslip angle (beta, β) are provided in degrees. All other angles and angular rates use radians.

    If you need to convert between units, use aerosandbox.tools.units. You can also check function docstrings for specific unit requirements.

  7. Understand Jorgensen Eta Fitting

    master
    Jorgensen Eta Fitting is a method used to fit the $\eta$ (eta) parameter based on Leland Howard Jorgensen's 1977 NASA technical report. The $\eta$ parameter represents the crossflow lift multiplier as a function of the fineness ratio. This is typically used in the context of predicting static aerodynamic characteristics for slender bodies, both alone and in conjunction with lifting surfaces, at high angles of attack.
  8. Use the Cylinder Drag Coefficient curve fit

    master
    The CylinderDragFits model provides a single, universally-applicable curve fit for the drag coefficient ($C_D$) of a cylinder in crossflow. It is valid for Reynolds numbers ($Re$) ranging from $10^{-1}$ to $10^7$ and extrapolates sensibly beyond this range. The model is based on data from Wiley, "Incompressible Flow" (4th Ed.).
  9. Use the Branch and Bound method for parsimonious regression

    master
    The Branch and Bound method is used for regression to create parsimonious models by minimizing the number of additive terms in the optimization equation. It works by creating branches based on whether a specific variable should be included or excluded. The algorithm decides whether to explore or discard a branch by calculating a lower bound.
  10. Important considerations for Airfoil Optimization

    master

    Airfoil optimization is a complex process that involves more nuance than simple point-design drag minimization. Before using the Airfoil Optimizer, it is strongly recommended to understand the theoretical pitfalls and best practices regarding optimization goals and geometry parameterization.

    Key resources for understanding these concepts include:

    • Optimization Pitfalls: Understanding the pros and cons of airfoil optimization (e.g., Mark Drela's work).
    • Geometry Parameterization: Comparing different techniques for representing airfoil shapes (e.g., Masters, 2017).
    • CST (Kulfan) Parameterization: The seminal method for universal parametric geometry representation (e.g., Brenda Kulfan).