This project contains a tiny airfoil panel solver demo and a simple Tkinter GUI.
Requirements
- Python 3.8+ (3.13 used in testing here)
numpy,matplotlib(install withpip install -r requirements.txt)tkinterfor the GUI (usually bundled with the official Windows Python installer)
Quick run (PowerShell)
- Create a venv (optional but recommended):
python -m venv .venv
.
# Activate (PowerShell):
.venv\Scripts\Activate.ps1- Install dependencies:
pip install --upgrade pip
pip install -r .\requirements.txt- Run the demo (generates
examples/naca2412_n*.datand prints Cl):
python .\demo.py- Run the GUI:
python -m gui.gui_tkNotes
- If
Activate.ps1is blocked by PowerShell execution policy, either run the venv Python directly:. .venv\Scripts\python.exe .\demo.py, or set policy:Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force. test_run.pyuses a bundled fake XFoil runner so it can run without thexfoilbinary.
Generated assets
- Example sweep plots and CSVs are produced by
scripts/generate_examples.pyand saved intooutputs/plotsandoutputs.
Development & CI
- A lightweight GitHub Actions workflow is included at
.github/workflows/ci.ymlto run the test suite automatically on push.
To produce real screenshots (locally):
.
.venv\Scripts\python.exe .\scripts\generate_examples.pyThis repository contains a small educational airfoil toolkit (NACA generator, simple panel solver, and a Tk GUI).
Quick requirements
- Python 3.10+ (tested with 3.13)
numpy,matplotlib(listed inrequirements.txt)tkinterfor the GUI (usually included with Windows Python)
- Create a virtual environment (recommended):
python -m venv .venv
# Activate (PowerShell)
.venv\Scripts\Activate.ps1If you cannot run Activate.ps1 due to execution policy, either run the venv python directly or allow per-user scripts:
# Run venv python directly (no activation required):
.\.venv\Scripts\python.exe .\demo.py
# Or change current-user policy (run PowerShell as Administrator if needed):
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force
.venv\Scripts\Activate.ps1- Install dependencies (inside the activated venv):
pip install --upgrade pip
pip install -r .\requirements.txt- There's a
demo.pyscript that generates a NACA2412.datand runs the panel solver. Run it from the project root:
python .\demo.py- Start the Tk GUI from the project root using the module form so imports resolve correctly:
python -m gui.gui_tk- If
python -m gui.gui_tkraises aFileExistsErroraboutoutputs/plots, it's because that path exists as a file. The GUI will attempt to rename it tooutputs/plots.bakand create a directory; if that fails, delete or rename the file manually. test_run.pyin the repo referencescore.xfoil_runnerandcore.airfoil_loader, which are not included here — that test will fail until those modules are added or the test is adapted.- The panel solver is intentionally simple and uses small regularization for numerical robustness. For production results, replace with a validated panel method implementation or couple with a viscous solver.