Skip to content

PyAero is an open-source airfoil contour analysis and CFD meshing tool.

License

Notifications You must be signed in to change notification settings

chiefenne/PyAero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyAero

PyAero generated mesh (Solver: SU2, Visualization: ParaView)

readthedocs GitHub

PyAero is an open-source airfoil contour analysis and CFD meshing tool written in Python. The graphical user interface is based on Qt for Python (Pyside6).

Features

  • Load and display airfoil contour files
  • Airfoil splining and refining
    • Get a smooth contour and sufficient contour points
    • Refine leading edge and trailing edge
    • Prepare contour for meshing
    • Automatic calculation of leading edge radius
    • Point distribution on spline used as mesh distribution around airfoil
  • Automatic generation of block-strcuctured mesh
    • Single element C-type mesh
    • Strictly orthogonal mesh in the vicinity of the airfoil
    • Mesh resolution control for airfoil, leading edge, trailing edge and windtunnel
  • Sharp or blunt trailing edges
  • Mesh smoothing (to be improved)
  • Mesh export
    • AVL FIRE (.flma)

    • Some other file formats are exported as well (only listed formats)

      • SU2 (.su2)
        • Including boundary markers
      • GMSH (.msh)
      • VTK (.vtk)
    • Automatic definition of boundary elements (edges, faces)

      • Airfoil, inlet, outlet, symmetry
  • Run in batch mode (i.e. run PyAero from the command line)
    • Mesh multiple airfoils and export the meshes in multiple formats in one run without user interaction
    • Using the -no-gui option and a control file in json format
    • Example command: python src/PyAero.py -no-gui data/Batch/batch_control.json
  • Simple aerodynamic analysis using AeroPython
  • Airfoil contour analysis (gradient, curvature and curvature circle)
  • NOT YET IMPLEMENTED:
    • Decent smoothing algorithm for the mesh regions outside the orthogonal blocks
    • Advanced aerodynamic analysis (i.e. linking to open source CFD software, e.g. SU2)

Header image

  • Airfoil SD7003
  • Meshing with PyAero
  • Calculation with the CFD code SU2
  • Post-processing done in ParaView

Sample screenshots

PyAero GUI at a glance

Example mesh around RAE2822 airfoil

Example mesh around RAE2822 airfoil - Leading Edge

Example mesh around RAE2822 airfoil with a blunt Trailing Edge (with finite thickness)

Example mesh with a sharp Trailing Edge

Example mesh around MAKAROV KPS airfoil as used in the CFD code AVL-FIRE

Velocity field (RE=50000) around MAKAROV KPS airfoil using the CFD code AVL-FIRE

Turbulence kinetic energy field (RE=50000) around MAKAROV KPS airfoil using the CFD code AVL-FIRE

Unsteady 3D calculation of the RG14 airfoil using the CFD code AVL-FIRE
RE=330000, AOA=2°, 20 million cells.
Laminar calculation: CD=0.0079, CL=0.371
LES calculation (subgrid scale model: Kobayashi CSM): CD=0.0078, CL=0.362

Steady 2D calculation of the SD7003 airfoil using the CFD code SU2 (RE=200000, AOA=3), post-processing with ParaView

Documentation

The PyAero documentation can be found at the following link:

http://pyaero.readthedocs.io

The documentation is automatically generated using the markdown files in the docs folder via Sphinx.

Dependencies

At the moment no binary is available for Windows.

Download

The $ symbol at the beginning the following command examples represents the prompt at command shell. It is not part of the command.

Option 1: Download source version using Git:

$ cd anywhere_on_your_computer
$ git clone https://github.com/chiefenne/PyAero.git

or if you want a specific branch (e.g. develop):

$ git clone https://github.com/chiefenne/PyAero.git -b develop

Option 2: Download source version as a ZIP file:

From the PyAero GitHub repository. There is on the upper right side a green pull down menu Clone or download. Click on it and then click Download ZIP. You get a file PyAero-master.zip which you store anywhere on your computer.

$ cd anywhere_on_your_computer
$ unzip PyAero-master.zip

Installation

After cloning from Git, or downloading and unzipping, set the environment variable for the PyAero installation path.

Linux

If your shell is bash:

$ export PYAEROPATH=path_to_your_installation

And if you want to set it permanently across sessions (one of the following):

$ echo 'export PYAEROPATH=path_to_your_installation' >> ~/.bashrc
$ echo 'export PYAEROPATH=path_to_your_installation' >> ~/.bash_profile

For csh or tcsh use:

$ setenv PYAEROPATH path_to_your_installation

And if you want to set it permanently across sessions:

$ echo 'setenv PYAEROPATH path_to_your_installation' >> ~/.cshrc

Run PyAero using:

$ python $PYAEROPATH/src/PyAero.py

To simplify the command, set an alias (the upper beeing for bash and the lower for csh/tcsh).

$ alias pyaero="python $PYAEROPATH/src/PyAero.py"
$ alias pyaero "python $PYAEROPATH/src/PyAero.py"

To keep this across sessions, again append the alias command to the respective .bashrc, .cshrc, etc.

Then start PyAero using:

$ pyaero

Qt for Python version

PyAero version based on the Qt for Python API (alias PySide2 for QT5 or PySide6 for QT6).

PyAero started based on the PyQt4 framework which for me was the API to go at the time when I started development.

After a small creative break I decided to upgrade to PyQt5 and continue development. I soon realized that the PyQt5 documentation lacks information, i.e. there were only links to the Qt C++ documentation and no Python related docs, I had the feeling that the PyQt5 development probably stagnates.

Short online research revealed to me that meanwhile Qt themselves are developing now Qt for Python which is based on the legacy Pyside API. This made me think that it is possibly best to go with Qt for Python as it is tightly coupled to Qt.

License

Distributed under the MIT license. See LICENSE for more information.

2024 Andreas Ennemoser – [email protected]

Stargazers over time

Stargazers over time