Update README.md
Browse files
README.md
CHANGED
|
@@ -9,5 +9,100 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# ✈️ Transport Wing Selector — AI-Assisted Wing Design
|
| 13 |
+
|
| 14 |
+
An **AI-driven design tool** that automates 3D wing generation from a 2D airfoil and optional polar data.
|
| 15 |
+
The system evaluates 160 candidate wings using a trained **multilayer perceptron (MLP)** selector model and returns the best geometry based on your chosen aerodynamic objective:
|
| 16 |
+
- **min_cd** – minimize drag
|
| 17 |
+
- **max_cl** – maximize lift
|
| 18 |
+
- **max_ld** – maximize lift-to-drag ratio
|
| 19 |
+
|
| 20 |
+
It converts a traditionally slow, intuition-based process into a transparent, interpretable, and reproducible workflow—delivering optimal wing geometries in seconds.
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## 🚀 What This App Does
|
| 25 |
+
- **Generates** candidate 3D wing geometries from a user-provided 2D airfoil (.dat/.txt)
|
| 26 |
+
- **Scores and ranks** each design across lift, drag, and efficiency objectives
|
| 27 |
+
- **Selects the top candidate**, visualizing it as:
|
| 28 |
+
- A **static PNG** rendering
|
| 29 |
+
- An **interactive 3D model** (Plotly viewer)
|
| 30 |
+
- A downloadable **CAD-ready STL file**
|
| 31 |
+
- A structured **JSON summary** of aerodynamic and geometric parameters
|
| 32 |
+
- **Validates** the best wing using strip-theory sweep plots (lift, drag, efficiency)
|
| 33 |
+
- **Explains** results through a grounded **LLM summary** comparing the top design with close alternatives
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## 🧠 How It Works
|
| 38 |
+
1. **Input:** Upload your airfoil geometry (and optional polar data).
|
| 39 |
+
2. **Objective:** Choose your design target (min_cd, max_cl, or max_ld).
|
| 40 |
+
3. **Candidate Generation:**
|
| 41 |
+
The MLP model evaluates 160 deterministic wing geometries parameterized by span, taper, twist, and chord vectors.
|
| 42 |
+
4. **Selection & Visualization:**
|
| 43 |
+
The top-scoring wing is rendered as an interactive 3D mesh and validated with strip-theory sweeps.
|
| 44 |
+
5. **Explanation:**
|
| 45 |
+
A lightweight language model summarizes why this candidate performs best, grounding the response in numerical features like span, taper, aspect ratio, and score.
|
| 46 |
+
Example:
|
| 47 |
+
> “The chosen wing achieves high efficiency by combining a long span, moderate taper, and strong negative washout, lowering induced drag while maintaining lift.”
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## 💡 Why It Matters
|
| 52 |
+
Traditional wing design can take **hours per concept**, requiring manual setup, XFOIL/QBlade runs, and iterative CFD.
|
| 53 |
+
This app reduces that to **under one minute**, enabling:
|
| 54 |
+
- Faster concept iteration
|
| 55 |
+
- Reproducible, data-driven decisions
|
| 56 |
+
- Transparent model reasoning through structured explanations
|
| 57 |
+
- Easy export for further CFD or CAD analysis
|
| 58 |
+
|
| 59 |
+
The workflow empowers engineers, students, and researchers to rapidly explore the early design space while maintaining aerodynamic interpretability.
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## 🧩 Features
|
| 64 |
+
| Feature | Description |
|
| 65 |
+
|----------|-------------|
|
| 66 |
+
| **Objective Selection** | min_cd / max_cl / max_ld |
|
| 67 |
+
| **Deterministic Mode** | Reproducible results with identical geometry and scoring |
|
| 68 |
+
| **Top-k Comparison** | View multiple top candidates ranked by score |
|
| 69 |
+
| **Validation Sweep** | Strip-theory verification for lift/drag trends |
|
| 70 |
+
| **Exports** | `.png`, `.stl`, `.json` artifacts |
|
| 71 |
+
| **Grounded LLM Explanation** | Physics-based summary of the chosen design |
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## 🧭 How to Use
|
| 76 |
+
1. Upload your **airfoil** file (`.dat` or `.txt`) and optionally a **polar** file.
|
| 77 |
+
2. Choose an optimization **objective**.
|
| 78 |
+
3. Adjust parameters (Top-k slider, deterministic mode, AoA sweep).
|
| 79 |
+
4. Click **“Find Best Wing.”**
|
| 80 |
+
5. View results, export files, and read the **AI-generated design explanation.**
|
| 81 |
+
|
| 82 |
+
---
|
| 83 |
+
|
| 84 |
+
## ⚙️ System Overview
|
| 85 |
+
- **Selector Model:** MLP trained on 500+ generated wings, each labeled with aerodynamic metrics (CL, CD, L/D)
|
| 86 |
+
- **Validation:** Deterministic scoring and strip-theory consistency checks
|
| 87 |
+
- **LLM Wrapper:** Qwen2.5-1.5B-Instruct, constrained via structured JSON prompt to prevent hallucination
|
| 88 |
+
- **Deployment:** Gradio app on Hugging Face Spaces with STL/JSON export pipeline
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## 📚 References & Credits
|
| 93 |
+
Developed by **Emily Copus** and **Kevin Kyi**
|
| 94 |
+
*Carnegie Mellon University — 24-679 Designing and Deploying AI/ML Systems*
|
| 95 |
+
Instructor: **Dr. Chris McComb**
|
| 96 |
+
|
| 97 |
+
- [Transport Wing Selector Space](https://huggingface.co/spaces/kevinkyi/Project1_Airfoil_Interface)
|
| 98 |
+
- [ViewSTL](https://www.viewstl.com/) – for external STL visualization
|
| 99 |
+
- [3D Viewer.net](https://3dviewer.net/) – quick in-browser CAD preview
|
| 100 |
+
- [Introduction to Aerospace Flight Vehicles — ERAU](https://eaglepubs.erau.edu/introductiontoaerospaceflightvehicles/chapter/wing-shapes-and-nomenclature/)
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## 🧾 License & Notes
|
| 105 |
+
Educational demonstration.
|
| 106 |
+
Not validated for production or certification use.
|
| 107 |
+
Outputs and explanations are deterministic, data-grounded, and intended to accelerate conceptual design only.
|
| 108 |
+
|