Skip to content

feat(planning): Von Kármán surface + numeric geodesic integrator (Stage 3b PR1) - #347

Merged
CameronBrooks11 merged 1 commit into
mainfrom
feat/vk-surface-integrator
Aug 8, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
feat/vk-surface-integrator

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Summary

PR1 of #326 (Stage 3b Phase 1). Adds the first non-developable winding surface — the Von Kármán (LD-Haack) nose — and the numeric Clairaut geodesic quadrature that replaces the cone's closed-form theta(z). Software-only: no dispatch and no .wind wiring yet (PR2 adds the developed builder + validator + equivalence harness; PR3 adds the schema field + example + conformance + docs + GUI guard).

What's here

  • surface.VonKarman(base_radius, length) — radius_at, radius_slope_at (analytic cancelled closed form so r'(0)=0 cleanly; the naive chain rule is 0/0 at the base), is_developable() -> False (first such), domain clamps. Roots use **0.5 / math.hypot so the math.sqrt call stays reserved to metrics.py (Motion IR single-source guard).
  • calculations.compute_profile_helical_kinematics — builds a fine cumulative-theta table (0.05 mm, <1e-3° budget) over the reachable band [0, z_cap]; z_cap snap-floored to the 1 mm station lattice for a cross-platform-stable move count; reports the bare-cap diameter (~2C). profile_geodesic_theta_deg interpolates the table; profile_local_alpha_deg = asin(C/r); ProfileReachabilityError guards a vanishing band.

Validation

  • Cone-limit differential oracle: the general integrator on a linear profile reproduces the cone closed-form theta to <1e-3° with 2nd-order convergence.
  • Independent Simpson oracle for VK theta with varying r' (recomputed integrand, independent of the production table).
  • Analytic slope vs central differences; table-vs-direct-quadrature; near-cap-stressed; reachability/degenerate guards; literature-pinned surface reference values (r(0)=R, r(L)=0, r(L/2)=R/√2).

Local gate: ruff clean, mypy clean on the new modules, full pytest (284) green, single-source guard green. Verified by an adversarial subagent review (no blocker/major); its findings — z_cap boundary snap, a dead assert removed, a positivity-guard note deferred to PR3, and the added Simpson oracle — are folded in.

Part of #326.

First non-developable surface (Stage 3b Phase 1, #326). Adds the VonKarman
LD-Haack nose profile (is_developable() -> False) and the generic numeric
Clairaut quadrature a curved profile needs in place of the cone's closed-form
theta(z):

- surface.VonKarman: radius_at, radius_slope_at (cancelled closed form so
  r'(0)=0 cleanly; the naive chain rule is 0/0 there), and domain clamps.
  Roots use ** 0.5 / math.hypot so the math.sqrt call stays reserved to
  metrics.py (Motion IR single-source guard).
- calculations: compute_profile_helical_kinematics builds a fine cumulative
  theta table (0.05 mm, <1e-3 deg budget) over the reachable band [0, z_cap];
  z_cap is floored to the 1 mm station lattice with a boundary-clearance
  assertion so the move count is stable across the 3-OS libm matrix; the
  bare-cap diameter (~2C) is reported. profile_geodesic_theta_deg interpolates
  the table; profile_local_alpha_deg is asin(C/r). ProfileReachabilityError
  guards a vanishing wound band.

Validated by the cone-limit differential oracle (the general integrator on a
linear profile reproduces the cone closed-form theta to <1e-3 deg with
2nd-order convergence), plus derivative-vs-finite-difference,
table-vs-direct-quadrature, and near-cap-stressed tests. No dispatch or .wind
wiring yet (PR2/PR3).

Part of #326.
@CameronBrooks11
CameronBrooks11 merged commit 6df3135 into main Aug 8, 2026
21 checks passed
@CameronBrooks11
CameronBrooks11 deleted the feat/vk-surface-integrator branch August 8, 2026 05:56
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.

1 participant