{"id":48257145,"url":"https://github.com/flexcompute/flexfoil","last_synced_at":"2026-04-04T21:17:06.995Z","repository":{"id":345475409,"uuid":"1135322177","full_name":"flexcompute/flexfoil","owner":"flexcompute","description":"A 2D panel code with integral boundary layer based on Mark Drela's tools","archived":false,"fork":false,"pushed_at":"2026-03-26T12:51:43.000Z","size":17441,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T04:52:31.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexcompute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-16T00:01:42.000Z","updated_at":"2026-03-25T18:44:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/flexcompute/flexfoil","commit_stats":null,"previous_names":["flexcompute/flexfoil"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/flexcompute/flexfoil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexcompute%2Fflexfoil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexcompute%2Fflexfoil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexcompute%2Fflexfoil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexcompute%2Fflexfoil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexcompute","download_url":"https://codeload.github.com/flexcompute/flexfoil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexcompute%2Fflexfoil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31414591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T21:17:06.374Z","updated_at":"2026-04-04T21:17:06.978Z","avatar_url":"https://github.com/flexcompute.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlexFoil\n\nA 2D panel code with integral boundary layer based on Mark Drela's tools - modern, high-performance airfoil analysis engine written in Rust, compiling to WebAssembly for real-time (60 Hz) web-based interaction.\n\n## Overview\n\nFlexFoil (RustFoil core) is a ground-up rewrite of Mark Drela's XFOIL, architected from the start to support:\n\n- **Multi-body configurations** (slats, main wing, flaps)\n- **Real-time feedback** during geometry manipulation\n- **WebAssembly output** for browser-based UIs\n- **Modern Rust idioms** with strong type safety\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                         Applications                             │\n├─────────────────────┬─────────────────────┬─────────────────────┤\n│   rustfoil-wasm     │   rustfoil-cli      │   flexfoil-ui       │\n│   WASM/JS bindings  │   Dev/testing CLI   │   React frontend    │\n├─────────────────────┴─────────────────────┴─────────────────────┤\n│                       rustfoil-solver                            │\n│   • Inviscid panel method (Phase 2)                             │\n│   • Boundary layer equations (Phase 3)                          │\n│   • Viscous-inviscid interaction (Phase 4)                      │\n├─────────────────────────────────────────────────────────────────┤\n│                        rustfoil-core                             │\n│   • Geometry types (Point, Panel, Body)                         │\n│   • Cubic spline interpolation                                  │\n│   • Coordinate I/O                                              │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## Project Structure\n\n```\nflexfoil/\n├── Cargo.toml              # Workspace root\n├── crates/\n│   ├── rustfoil-core/      # Geometry, splines, core types\n│   ├── rustfoil-solver/    # Panel method, BL, VII\n│   ├── rustfoil-wasm/      # WebAssembly bindings\n│   └── rustfoil-cli/       # Command-line tool\n├── flexfoil-ui/            # React + TypeScript frontend\n└── testdata/               # Sample airfoil files\n```\n\n## Quick Start\n\n### Build\n\n```bash\n# Build all crates\ncargo build --release\n\n# Run tests\ncargo test\n\n# Build WASM (requires wasm-pack)\ncd crates/rustfoil-wasm\nwasm-pack build --target web\n```\n\n### Frontend\n\n```bash\ncd flexfoil-ui\nnpm install\nnpm run dev\n```\n\n### CLI Usage\n\n```bash\n# Analyze an airfoil at 5° angle of attack\ncargo run --bin rustfoil -- analyze testdata/naca0012.dat --alpha 5.0\n\n# Generate a polar\ncargo run --bin rustfoil -- polar testdata/naca0012.dat --alpha-start -5 --alpha-end 15\n\n# Repanel with cosine spacing\ncargo run --bin rustfoil -- repanel testdata/naca0012.dat --panels 100\n```\n\n### WASM Usage (JavaScript)\n\n```javascript\nimport init, { RustFoil, analyze_airfoil } from 'rustfoil-wasm';\n\nawait init();\n\n// Quick one-shot analysis\nconst coords = [1.0, 0.0, 0.5, 0.1, 0.0, 0.0, 0.5, -0.1, 1.0, 0.0];\nconst result = analyze_airfoil(coords, 5.0);\nconsole.log(`Cl = ${result.cl}`);\n\n// Interactive usage\nconst foil = new RustFoil();\nfoil.set_coordinates(coords);\nfoil.set_alpha(5.0);\nconst solution = foil.solve();\n```\n\n## Development Phases\n\n### Phase 1: Foundation\n- [x] Geometry types (`Point`, `Panel`, `Body`)\n- [x] Cubic spline interpolation\n- [x] XFOIL-exact NACA generator\n- [x] XFOIL-exact paneling (PANGEN)\n- [x] WASM bridge\n- [ ] Coordinate file I/O (Selig, Lednicer formats)\n\n### Phase 2: Inviscid Solver (Current)\n- [x] Linear vorticity panel method (PSILIN)\n- [x] Kutta condition\n- [x] Blunt TE handling\n- [x] XFOIL-exact Cl/Cm\n- [ ] Wake modeling\n- [ ] Multi-body interactions\n- [ ] Real-time Cp display\n\n### Phase 3: Boundary Layer\n- [ ] Thwaites method (laminar)\n- [ ] Head/Green method (turbulent)\n- [ ] Transition prediction (eN)\n- [ ] Separation detection\n\n### Phase 4: Viscous-Inviscid Interaction\n- [ ] Global Newton-Raphson\n- [ ] Transpiration velocity\n- [ ] Convergence acceleration\n\n### Phase 5: Advanced Features\n- [ ] Multi-body viscous\n- [ ] Wake interaction\n- [ ] Inverse design\n\n## Technical Details\n\n### Coordinate Convention\n- **X-axis:** Downstream (freestream direction). LE at x≈0, TE at x≈1.\n- **Y-axis:** Upward. Upper surface has positive y.\n- **Panel ordering:** Counter-clockwise from TE lower to TE upper.\n\n### Dependencies\n- `nalgebra` - Linear algebra (SIMD-optimized)\n- `wasm-bindgen` - JavaScript interop\n- `serde` - Serialization for WASM\n\n### Performance Targets\n- Inviscid solve: \u003c 16ms for 200 panels (60 Hz capable)\n- WASM bundle: \u003c 500 KB gzipped\n\n## References\n\n1. Drela, M. \"XFOIL: An Analysis and Design System for Low Reynolds Number Airfoils\" (1989)\n2. Katz, J. \u0026 Plotkin, A. \"Low-Speed Aerodynamics\" (2001)\n3. Cebeci, T. \u0026 Bradshaw, P. \"Momentum Transfer in Boundary Layers\" (1977)\n4. Fidkowski, K. J. \"A Coupled Inviscid-Viscous Airfoil Analysis Solver, Revisited,\" *AIAA Journal*, Vol. 60, No. 5, 2022, pp. 2961–2971. [doi:10.2514/1.J061341](https://doi.org/10.2514/1.J061341)\n\n## License\n\nFlexFoil is licensed under the [MIT License](LICENSE).\n\nCopyright (c) 2026 Flexcompute, Inc. and Harry Smith.\n\nThis repository includes third-party components and references commercial\ndependencies. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for details\non AG Grid Enterprise, the TWK Everett typeface, and other attributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexcompute%2Fflexfoil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexcompute%2Fflexfoil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexcompute%2Fflexfoil/lists"}