feat: expose XFOIL Type 2/3 polar modes (variable Re)#11
Merged
aeronauty-flexcompute merged 4 commits intodevfrom Mar 23, 2026
Merged
feat: expose XFOIL Type 2/3 polar modes (variable Re)#11aeronauty-flexcompute merged 4 commits intodevfrom
aeronauty-flexcompute merged 4 commits intodevfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ReTypeenum (Type 1/2/3) to the Rust solver witheffective_reynolds()that rescales Re each viscous iteration based on CL — matching original XFOIL Fortran behaviourre_typeparameter through Python bindings (analyze_faithful,analyze_faithful_batch,get_bl_distribution) and theflexfoilAPI (solve(),polar(),bl_distribution())reynolds_effin all viscous results so callers can see the effective Re usedRequested by Ferdinand Elsner (KIT Karlsruhe) for GA-based airfoil optimisation where the operating Re depends on CL.
Usage
Test plan
effective_reynolds()(Type 1/2/3, negative CL, near-zero CL guard)test_solver.py::TestReType)test_api.py::TestReType)🤖 Generated with Claude Code