Add the thin-plate force case that measures issue 1849 - #1868
Add the thin-plate force case that measures issue 1849#1868sbryngelson wants to merge 2 commits into
Conversation
A 2D plate pitching about its leading edge against Jantzen et al. (2014) Fig. 10 curve C1, with the number of cells across the 2.5 percent thickness set by NCELL so the physical problem is fixed and only the resolution moves. This measures the defect rather than fixing it. The reading that matters is that the disagreement with the reference does not shrink with refinement: 20.9, 33.5, 27.9 and 26.9 percent rms at 2, 4, 8 and 16 cells across. That rules out under-resolution and points at the force computation. A second reading falls out of the same sweep: the peak converges from four cells up (4.682, 4.458, 4.833 across a fourfold refinement), while two cells is 35 percent out. A thin body does not need ten or more cells for the immersed boundary to resolve it, which matters for cost estimates.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Adds a new validation example to measure (not fix) the thin-plate immersed-boundary force defect reported in #1849, including a resolution sweep via NCELL and documentation of observed non-convergence vs a published reference.
Changes:
- Added a new 2D IBM thin-plate pitching case generator (
case.py) parameterized byNCELL. - Added a README documenting the setup, how to run the sweep, and the measured discrepancy vs reference data.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| examples/2D_ibm_thin_plate_force/case.py | New case generator that emits an MFC input JSON for the pitching thin-plate IBM force measurement. |
| examples/2D_ibm_thin_plate_force/README.md | Documents the purpose, sweep procedure, and measured outcomes supporting #1849 investigation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| tau = f"(t - {t0})" | ||
| th = f"(0.5*{th_max}*(1.0 + (log(cosh({a_smooth}*{tau})) - log(cosh({a_smooth}*({tau} - {t_p}))))/{a_smooth * t_p}))" | ||
| thd = f"(0.5*{Omega}*(tanh({a_smooth}*{tau}) - tanh({a_smooth}*({tau} - {t_p}))))" | ||
| case["patch_ib(1)%angular_vel(3)"] = thd | ||
| case["patch_ib(1)%vel(1)"] = f"-0.5*{thd}*sin({th})" | ||
| case["patch_ib(1)%vel(2)"] = f"0.5*{thd}*cos({th})" |
| # L4 added after the first three failed to converge: refining 2 -> 4 -> 8 cells across the thickness moved | ||
| # the peak lift 6.41 -> 4.68 -> 4.46 against a reference of 7.00, i.e. away from it and then stalling. | ||
| # Two under-resolved answers landing near each other is not convergence. If a few cells across a thin | ||
| # body is simply too few for the immersed boundary, 16 should move back toward the reference; if the | ||
| # finite thickness is genuinely the difference, it should stay near 4.5. | ||
| LEVELS = {"L1": 0.0125, "L2": 0.00625, "L3": 0.003125, "L4": 0.0015625} |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1868 +/- ##
==========================================
- Coverage 61.26% 61.25% -0.02%
==========================================
Files 84 84
Lines 22330 22336 +6
Branches 3265 3266 +1
==========================================
+ Hits 13680 13681 +1
- Misses 6207 6211 +4
- Partials 2443 2444 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Written with Claude Code. Relates to #1849. This measures the defect; it does not fix it.
A 2D flat plate pitching about its leading edge, 0 → 45° on an Eldredge smoothed ramp (a = 21), K = π/8 (case C1), Re_c = 300, Ma 0.2, thickness 2.5 % of chord — matching a published measurement:
NCELLsets how many cells lie across the plate thickness. The physical problem is identical at every level — same chord, thickness, domain and times — so the sweep isolates the immersed-boundary resolution requirement from any change of geometry, which a thickness sweep would confound.How the validation is obtained
The disagreement does not shrink with refinement. The last column sits at 27–34 % across a factor of eight in resolution with no trend. That is the reading that matters for #1849: it rules out under-resolution as the explanation and leaves the force computation itself.
A second, independent reading falls out of the same sweep. The peak converges from four cells up — 4.682, 4.458, 4.833, a spread of 8 % across a fourfold refinement — while two cells is 35 % out. So a thin body does not need ten or more cells before the immersed boundary resolves it. That is worth having on the record separately, because it is the difference between an affordable cost model and an impossible one: at ten cells across a 3 % section, the flapping-wing ensemble this came from would cost 62 M GPU-hours against an allocation of 200 k.
Why not a zero-reference test
The cheap, exact style of check — a symmetric body whose true force is zero — does not apply to a pitching plate, whose lift is large and unknown. That style is covered by
examples/2D_ibm_force_decomposition(#1859) andexamples/3D_ibm_neighborhood_radius(#1866). This case trades the exact reference for a published one, which is what makes it usable as a target for a fix.Scope
Example case and README only; no source changes and no golden files.
./mfc.sh validatepasses and precheck is clean.