Take the billow axis from the section pair, not a global projection - #264
Merged
Conversation
Billowing rotates each section's trailing edge about the leading-edge span vector, and the sign of that vector decided whether the panel billows up or down. It came from projecting on `spanwise_direction`, which is near-degenerate where the span vector is not spanwise: on a C-shaped kite's tip panels the alignment is 0.033, 11 mm of span between the outermost sections, so a deforming tip could flip one panel's billow while its neighbours kept theirs. Sections run +y to -y, so the pair itself fixes the sign with no projection and no degeneracy. On a wing whose tips are not near-vertical the two agree, so the refined mesh is unchanged there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Problem
Billowing rotates each refined section's trailing edge about the leading-edge
span vector of the surrounding rib pair. The sign of that vector decides
whether the panel billows up or down, and it was chosen by projecting on
wing.spanwise_direction:That test is well-conditioned only where the span vector is actually spanwise.
On a C-shaped kite the tip panels are nearly vertical, so their leading-edge
span vector is mostly x and z. Measured on the V3 kite's 37-section aero
geometry (
spanwise_direction = [0, 1, 0], LE y running +4.167 → −4.167):The outermost pair is separated by 11 mm of span. Since
refine!re-runs onthe deformed sections each aero update, a flexing tip only has to move two
adjacent leading-edge nodes 11 mm relative to each other in y for that one
panel's billow to invert while its neighbours keep theirs.
Fix
Sections are guaranteed to run
+yto-y(normalize_span_order!/refine!'ssort_sections), so the pair itself fixes the axis sign with noprojection and no degeneracy:
spanwise_directionstill sets the wing's overall handedness once, where it iswell-conditioned; it no longer decides each panel individually.
Effect
On a geometry whose tips are not near-vertical the two rules agree, so the
refined mesh is unchanged. On the V3 geometry above the old test also happened
to agree on all 36 pairs in the undeformed mesh — the change is a no-op there
— but it removes the 3 % margin the tip panels were relying on.
🤖 Generated with Claude Code