Skip to content

feat(corpus): nec2c NEC-2 reference solver (GAP-011/GAP-006) - #133

Merged
dc0sk merged 1 commit into
mainfrom
feat/nec2c-reference-corpus
Jul 8, 2026
Merged

feat(corpus): nec2c NEC-2 reference solver (GAP-011/GAP-006)#133
dc0sk merged 1 commit into
mainfrom
feat/nec2c-reference-corpus

Conversation

@dc0sk

@dc0sk dc0sk commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Backlog T7 — advances the deferred NEC validation (SRS GAP-011/GAP-006).

Adds nec2c (NEC-2, double precision) as a second reference solver. Unlike the fnec-rust Hallén solver it supports finite ground and multi-wire non-collinear geometry, so it can validate the inverted-V (and, going forward, ground/loop/trap) cases the Hallén solver could not.

  • scripts/nec-reference.sh — reproducible pipeline (deck solve + resonance bisection). CI does not run nec2c; it tests rusty-wire against committed data, mirroring the fnec workflow.
  • corpus/nec2c-reference.json + two valid nec2c decks (dipole, inverted-V).
  • Two CI-gated tests: corpus_nec2c_dipole_resonant_length_within_tolerance, corpus_nec2c_inverted_v_geometry_and_feedpoint (unblocking the fnec-limited inverted-V; its old #[ignore]d test is marked superseded).
  • SRS updated: GAP-011 baseline extended, GAP-006 unblocked.

Finding: a bare thin wire resonates ~2% longer in idealised NEC free space than the practical 468/f rule (nec2c 20.54 m vs 20.09 m at 7.1 MHz). 468/f is the accepted real-installation length, so NEC length gates use a realistic ±3% tolerance rather than ±1% — documented in the reference JSON and SRS.

cargo test all pass (2 new corpus tests), clippy + fmt clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jf8uBU8AYxkrG8fa8yo6tC

Adds nec2c (NEC-2, double precision) as a second reference solver. Unlike the
fnec-rust Hallén solver it handles finite ground and multi-wire non-collinear
geometry, so it validates the inverted-V (and, going forward, ground/loop/trap)
cases the Hallén solver could not.

- scripts/nec-reference.sh regenerates reference values (deck solve + resonance
  bisection); CI does NOT run nec2c — it tests against committed data.
- corpus/nec2c-reference.json + two valid nec2c decks (dipole, inverted-V).
- CI-gated tests: corpus_nec2c_dipole_resonant_length_within_tolerance and
  corpus_nec2c_inverted_v_geometry_and_feedpoint (unblocking the fnec-limited
  inverted-V, whose old #[ignore]d test is now marked superseded).
- requirements.md GAP-011 (baseline extended) and GAP-006 (unblocked) updated.

FINDING: a bare thin wire resonates ~2% LONGER in idealised NEC free space than
the practical 468/f rule (nec2c 20.54 m vs 20.09 m at 7.1 MHz). 468/f is the
accepted real-installation length, so NEC length gates use a realistic ±3%
tolerance rather than ±1%.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dc0sk
dc0sk merged commit a729533 into main Jul 8, 2026
10 checks passed
@dc0sk
dc0sk deleted the feat/nec2c-reference-corpus branch July 8, 2026 20:39
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