Skip to content

awegroup/Vortex-Step-Method

Repository files navigation

Vortex Step Method

The Vortex Step Method (VSM) is an enhanced lifting line method that improves upon the classic approach by solving the circulation system at the three-quarter chord position. This adjustment allows for more accurate calculations of lift and drag forces, particularly addressing the shortcomings in induced drag prediction. VSM is further refined by coupling it with 2D viscous airfoil polars, making it well-suited for complex geometries, including low aspect ratio wings, as well as configurations with sweep, dihedral, and anhedral angles, typical for leading-edge inflatable (LEI) kites, that are used in airborne wind energy production, boat-towing and kite-surfing.

A Julia version of this project is available at VortexStepMethod.jl

Reference Frame

The VSM uses a body-fixed reference frame with the following conventions:

Coordinate Axes:

  • x-axis: Rearward (leading edge → trailing edge)
  • y-axis: Right wing (when looking from behind the kite)
  • z-axis: Upward (from wing tip to mid-span)

Aerodynamic Angles:

  • Angle of Attack (α): Positive for nose up
  • Sideslip (β): Positive for wind from the left/port side (positive Vy)

Body Rotation Rates (right-hand rule):

  • Roll rate (p): Positive for left wing down (counter-clockwise looking forward)
  • Pitch rate (q): Positive for nose up (clockwise looking from right wing)
  • Yaw rate (r): Positive for nose left (counter-clockwise looking down)

The reference frame is illustrated below for the open-source example kite, the TU Delft V3 Kite.

Aircraft Frame Transformation: For stability derivatives in standard aircraft coordinates (x-forward, y-right, z-down), use map_derivatives_to_aircraft_frame() from the VSM.stability_derivatives module. See examples/TUDELFT_V3_KITE/evaluate_stability_derivatives.py for usage.

Key Features

  • Accurate low-aspect-ratio wing modeling with enhanced lifting line theory
  • Viscous-inviscid coupling using 2D airfoil polars (inviscid, CFD, ML-based)
  • Complex geometry support: sweep, dihedral, anhedral, leading-edge inflatable (LEI) kites
  • Rigid-body stability derivatives: automatic computation of dCx/dα, dCMy/dq, etc.
  • Trim angle solver: automatic determination of trimmed angle of attack
  • Non-dimensional rate derivatives: controls-friendly output (hat_p, hat_q, hat_r)
  • Reference point flexibility: correctly handles moment reference point for rotational velocities
  • Interactive visualization: Plotly and Matplotlib geometry and results plotting

Documentation

For detailed documentation, please refer to the following resources.

Explanatory Notes

Code Core

Other

Installation Instructions

  1. Clone the repository:

    git clone https://github.com/awegroup/Vortex-Step-Method
  2. Navigate to the repository folder:

    cd Vortex-Step-Method
  3. Create a virtual environment:

    Linux or Mac:

    python3 -m venv venv

    Windows:

    python -m venv venv
  4. Activate the virtual environment:

    Linux or Mac:

    source venv/bin/activate

    Windows

    .\venv\Scripts\activate
  5. Install the required dependencies:

    For users:

    pip install .

    For developers:

    pip install -e .[dev]

    For ubuntu add:

    pip install pyqt5
    sudo apt install cm-super
    sudo apt install dvipng
    
  6. To deactivate the virtual environment:

    deactivate

Dependencies

  • numpy - Numerical computing
  • matplotlib - 2D plotting
  • scipy - Scientific computing and optimization
  • plotly - Interactive 3D visualization
  • pandas - Data manipulation
  • neuralfoil - Neural network airfoil predictions
  • PyYAML - Configuration file parsing
  • scikit-learn - Machine learning utilities
  • numba - Just-in-time compilation for performance-critical loops
  • screeninfo - Display information for plotting

See also pyproject.toml for complete dependency list and version requirements

Machine Learning

The code base is adapted to work with a machine learning model trained on more than a hundred thousands Reynolds-average Navier Stokes (RANS) Computational Fluid Dynamics (CFD) simulations made for leading-edge inflatable airfoils, documented in the MSc. thesis of K.R.G. Masure, the code base is also open-source accessible.

As the three trained models, for Reynolds number = 1e6, 5e6 and 1e7 are too large (~2.3GB) for GitHub, they have to be downloaded separately, and added to the data/ml_models folder. They are accessible through Zenodo, and so is the CFD data on which the models are trained. More description on its usage is found in Airfoil Aerodynamics.

Usage Examples

The examples/ folder contains comprehensive tutorials:

Rectangular Wing

  • rectangular_wing/tutorial.py - Basic wing analysis workflow

TU Delft V3 Kite

  • tutorial.py - Complete kite aerodynamic analysis
  • evaluate_stability_derivatives.py - Stability and control derivatives computation
  • tow_angle_geometry.py - Geometric tow angle and center of pressure analysis
  • tow_point_location_parametric_study.py - Design space exploration for tow point
  • kite_stability_dynamics.py - Natural frequency and oscillation period calculation
  • convergence.py - Panel count convergence study
  • benchmark.py - Performance benchmarking

Machine Learning for LEI Airfoils

  • machine_learning_for_lei_airfoils/tutorial.py - Using ML models for airfoil aerodynamics

See individual files for detailed documentation and usage instructions.

Performance Optimization

For large-scale parametric studies:

  1. Use fewer panels during exploration (n_panels=20-30), then increase for final results
  2. Cache geometries: Instantiate BodyAerodynamics once, reuse with different flow conditions

Example:

# Fast exploration
body_aero = BodyAerodynamics.instantiate(n_panels=20, ...)  # ~0.1s per solve

# High accuracy
body_aero = BodyAerodynamics.instantiate(n_panels=100, ...) # ~2s per solve

Troubleshooting

Common Issues

Import errors with numba:

pip install --upgrade numba

Matplotlib backend issues on Linux:

export MPLBACKEND=TkAgg  # Or 'Qt5Agg' if PyQt5 installed

Missing ML models: Download from Zenodo and place in data/ml_models/

Plotly not showing in Jupyter:

pip install jupyterlab "ipywidgets>=7.5"

For more issues, check the GitHub Issues page.

Contributing Guide

Please report issues and create pull requests using the URL:

https://github.com/awegroup/Vortex-Step-Method

We welcome contributions to this project! Whether you're reporting a bug, suggesting a feature, or writing code, here’s how you can contribute:

  1. Create an issue on GitHub
  2. Create a branch from this issue
    git checkout -b issue_number-new-feature
  3. Implement your new feature
  4. Verify nothing broke using pytest
  pytest
  1. Commit your changes with a descriptive message
  git commit -m "#<number> <message>"
  1. Push your changes to the github repo: git push origin branch-name

  2. Create a pull-request, with base:develop, to merge this feature branch

  3. Once the pull request has been accepted, close the issue

Citation

If you use this project in your research, please consider citing it. Citation details can be found in the CITATION.cff file included in this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

WAIVER

Technische Universiteit Delft hereby disclaims all copyright interest in the package written by the Author(s). Prof.dr. H.G.C. (Henri) Werij, Dean of Aerospace Engineering

Copyright

Copyright (c) 2022 Oriol Cayon

Copyright (c) 2024 Oriol Cayon, Jelle Poland, TU Delft