feat(rustfoil-cli): add --flap option to polar and faithful-polar#18
Open
aeronauty-flexcompute wants to merge 2 commits into
Open
feat(rustfoil-cli): add --flap option to polar and faithful-polar#18aeronauty-flexcompute wants to merge 2 commits into
aeronauty-flexcompute wants to merge 2 commits into
Conversation
Add an XFOIL-style --flap "hinge_x:hinge_y:deflection_deg" option to both the inviscid `polar` and viscous `faithful-polar` commands. The deflection is applied via the existing rustfoil_core::flap::xfoil_flap before the body is built (faithful-polar writes the flapped section to a temp .dat and feeds it to XFOIL). Enables flapped-airfoil priors directly from the CLI without a separate pre-deflected coordinate file. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix prepared fixes for all 3 issues found in the latest run.
- ✅ Fixed: Invalid flap silently ignored
- faithful-polar now uses shared flap validation and emits the same bad --flap warning before ignoring malformed input.
- ✅ Fixed: Flap fields shift after empty segments
- Both polar paths now require exactly three colon-separated flap fields and reject any unparseable or empty segment.
- ✅ Fixed: Shared temp file race
- faithful-polar now builds the flapped body directly from in-memory points instead of writing a shared temporary geometry file.
You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 9694a76. Configure here.
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
--flap "hinge_x:hinge_y:deflection_deg"option to both the inviscidpolarand viscousfaithful-polarcommands.rustfoil_core::flap::xfoil_flapbefore the body is built.faithful-polarwrites the flapped section to a temp.datand feeds it to XFOIL.Motivation
Came out of the blown-lift / Tailor multifidelity work (FXC-9009): we needed a cheap flapped-airfoil lift prior for an LS(1)-0417 with a deployed flap. A plain-XFOIL flap on the main element turns out to be a strong prior — the viscous+flap panel curve carries ~98.5% of the RANS C_L variance, leaving Tailor to model only the small residual.
Test Plan
Verified locally: flap increases C_L monotonically with deflection; a bad
--flapstring warns and is ignored (clean polar still runs).🤖 Generated with Claude Code
Note
Low Risk
CLI-only wiring around existing flap geometry; invalid specs are ignored with a warning and default behavior is unchanged.
Overview
Adds
--flap "hinge_x:hinge_y:deflection_deg"to the inviscidpolarand viscousfaithful-polarsubcommands so flapped polars can be run without a pre-deflected coordinate file.When
--flapis set, coordinates are transformed withrustfoil_core::flap::xfoil_flapbeforeBodyconstruction (inviscid) or before XFOIL-style repaneling via a newbuild_body_for_faithful_pointshelper (faithful path). A sharedparse_flap_specparses the colon-separated triple; malformed values log a warning and the command falls back to the unflapped geometry.Status messages about the applied hinge/deflection go to stderr so tabular polar output stays clean.
Reviewed by Cursor Bugbot for commit 62b263e. Bugbot is set up for automated code reviews on this repo. Configure here.