Table of Contents
The intended purpose of this package is to serve as a tool to find the best airfoil shape for your engineering application. Use PyFoil to create multi-element airfoils and mesh & analyse them in other awesome packages like: - AeroSandbox - OpenFOAM - PyAero
Hope you make some efficient wind (or water!) turbines for some renewable energy, and/or energy-efficient vehicles
Use the GUI to create complicated airfoil layouts at lightning speed, like adding slats, flaps, or cascading airfoils:
Amongst other things the GUI and the code supports:
-
Generating one or more analytical Airfoils: Currently the foil families that can be generated analytically are:
- NACA 4-Digit
- NACA 4-Digit Modified
- NACA 5-Digit
- NACA 16-Series
- Joukowski
- Biconvex
-
Fetch database airfoils: The code contains a database of airfoils that you can import. These have byen obtained from:
- Webscraping the UIUC database
- Splining images from research articles
-
Create multi-element airfoils.
Foils are generated according to the definition from the UIUC Airfoil Coordinates Database , in which is stated:
"The coordinates order starts from upper surface trailing edge, then wraps around the leading edge to the lower surface trailing edge"
- Load a datasheet with a timeseries of wind speeds and angles of attacks, and find the best performing airfoil in terms of lift-to-drag ratio.
- Python 3.8+
- Numpy
Install from PyPI:
pip install pyfoil
or via conda:
conda install -c conda-forge pyfoil
or from source on GitHub:
git clone https://github.com/agroengard/pyfoil
cd pyfoil
pip install .
To create 4 and 5 digit NACA airfoil points by code, and also plot and save them, you could write (See also the example.py file):
from naca import NACA
# NACA 4-Digit airfoil:
airfoil = NACA("2310")
# Retrieve the individual points:
pts = airfoil.pts
# Plot the airfoil:
airfoil.plot()
# Save the points to a .txt file
airfoil.save()
Likewise for a 5-digit NACA airfoil:
# NACA 5-Digit airfoil:
airfoil = NACA("23116")
airfoil.plot()
airfoil.save()
If you want to generate and plot multiple airfoils from a list you could go:
from foils import NACAs
my_foils = ['1512','3512', '5512', '7512', '9512']
foils = NACAs(my_foils)
foils.plot()
If you have used PyFoil in your research, and you want to cite it, you could for example use the following BibLatex entry:
@misc{pyfoil2023,
title = {PyFoil - Airfoil editing with Python},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/agroengaard/pyfoil}},
}
This project is licensed under a GNU GENERAL PUBLIC LICENSE - see the LICENSE.md file for details