Skip to content

Python package for creating regular air- and hydrofoils, but also experimental and multi-element airfoils

License

Notifications You must be signed in to change notification settings

agroengaard/pyfoil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Generic badge Generic badge License: GPL v3 Size

GitHub top language PyPI - Python Version GitHub last commit CodeFactor Grade


Python package for creating experimental and multi-element airfoils

📖 Table of Contents

Table of Contents
  1. ➤ About
  2. ➤ Features
  3. ➤ Planned Features
  4. ➤ Limitations
  5. ➤ How to use
  6. ➤ Authors
  7. ➤ License

📋 About

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 ✈️ so we can save the planet 🌍


🎯 FEATURES

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"


🥅 PLANNED FEATURES

  • 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.


Requirements

  • Python 3.8+
  • Numpy

👨‍💻 HOW TO INSTALL 👩‍💻

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 .

👨‍💻 HOW TO USE 👩‍💻

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()


🥅 How to cite

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}},
  }

📖 License

This project is licensed under a GNU GENERAL PUBLIC LICENSE - see the LICENSE.md file for details


About

Python package for creating regular air- and hydrofoils, but also experimental and multi-element airfoils

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages