Skip to content

feat: Reynolds type modes (1/2/3) across solver, UI, and Python API#12

Merged
aeronauty-flexcompute merged 8 commits intomainfrom
dev
Mar 23, 2026
Merged

feat: Reynolds type modes (1/2/3) across solver, UI, and Python API#12
aeronauty-flexcompute merged 8 commits intomainfrom
dev

Conversation

@aeronauty-flexcompute
Copy link
Copy Markdown
Collaborator

Summary

  • ReType enum in the Rust XFOIL crate with effective-Re formulas for Type 1 (constant Re), Type 2 (fixed Re·√CL), and Type 3 (fixed Re·CL)
  • Python API: re_type parameter on solve(), polar(), and bl_distribution(); reynolds_eff field on SolveResult
  • WASM bindings: re_type threaded through analyze_airfoil_faithful to the UI solver
  • UI: Mode 1/2/3 toggle buttons in the Solve panel (viscous only), wired through single-point, polar, and multi-parameter sweeps
  • What's New: v1.1.3 changelog entry with tour slide and ShowMe micro-tutorial
  • Docs: Variable-Reynolds modes section in python-api.mdx with usage examples and API reference updates
  • Versions: UI 1.1.2 → 1.1.3, Python 1.1.4 → 1.1.5

Test plan

  • Rust unit tests for ReType effective_reynolds formulas (cargo test -p rustfoil-xfoil)
  • Python binding tests for re_type=1/2/3 at single-point and batch levels (test_solver.py::TestReType)
  • Python API-level tests for solve/polar/bl_distribution with re_type (test_api.py)
  • TypeScript compiles cleanly (tsc --noEmit)
  • CI green (Rust + Python)
  • Beta deploy successful and live
  • Verify ShowMe tour launches from What's New dialog
  • Verify Mode 2/3 produce different drag predictions than Mode 1

🤖 Generated with Claude Code

aeronauty and others added 8 commits March 20, 2026 13:58
- Remove unused useCallback import in DistributionPanel
- Suppress unused NumericTextInput in SolvePanel (kept for future use)
- Remove unused AUTO_GROUP_INVARIANT_FIELDS import in polarDetection
- Add missing is_outlier field in test fixture
- Fix CellStyle return type in DataExplorerPanel
- Fix Datum cast in DataExplorerPanel correlogram hover

Made-with: Cursor
Implements XFOIL polar Type 2 (fixed Re*sqrt(CL)) and Type 3
(fixed Re*CL) in the Rust solver. The effective Reynolds number is
recomputed each viscous iteration based on the current CL, matching
the original Fortran behaviour. Type 1 (constant Re) remains the default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Threads the re_type parameter (1/2/3) through analyze_faithful,
analyze_faithful_batch, and get_bl_distribution. Returns reynolds_eff
in all result dicts so callers can see the effective Re used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds re_type parameter (default 1) to solve(), polar(), and
bl_distribution(). Adds reynolds_eff field to SolveResult. All
existing behaviour is unchanged (Type 1 default).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 new tests covering:
- Re_eff formula verification for Type 2 and Type 3
- Type 2 produces different CL/CD than Type 1
- Default re_type=1 matches omitted parameter
- Batch and parallel consistency
- Inviscid solve returns reynolds_eff=None
- BL distribution with Type 2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: expose XFOIL Type 2/3 polar modes (variable Re)
Expose XFOIL's ReType (constant Re, fixed Re√CL, fixed Re·CL) in the
UI as a three-button toggle under the Reynolds Number input. Mode 1 is
the default. Threads re_type through WASM bindings, sweep engine, and
airfoil store.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e modes

- UI version 1.1.2 → 1.1.3, Python version 1.1.4 → 1.1.5
- Add changelog entry for Mode 1/2/3 Reynolds type selector with tour slide
- Add ShowMe micro-tour (reTypeModes) for guided walkthrough of the feature
- Document re_type and reynolds_eff in Python API docs (python-api.mdx)
- Add data-tour attribute for ShowMe targeting

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aeronauty-flexcompute aeronauty-flexcompute merged commit 44ba888 into main Mar 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants