From 7a841744be1a2dd2007af8d8635c6d6714495ff2 Mon Sep 17 00:00:00 2001 From: Christopher Hoover Date: Mon, 10 Aug 2026 20:19:41 -0700 Subject: [PATCH] test: add a Sommerfeld deck close to the ground The sommerfeld decks in data/ all sit at 3.8 wavelengths or higher, so none of them reach the regime where NEC-2 stops meeting limits that have closed-form answers. This one is a horizontal half-wave dipole 0.02 wavelengths up over a ground with sigma 1e10. At that conductivity the half-space is a perfect conductor, so the deck should reproduce what the same geometry gives with GN 1 -- swap the GN card to get it. With GN 1 every engine gives R = 0.9168 ohms and an average power gain of 1.9953. Two quantities, each against an exact value: feedpoint R, against the GN 1 value nec2++ 1.7594 (about 92 percent high) nec2c 1.7591 aegnec2 1.75954 average power gain, exactly 2 over a perfect conductor; GN 1 reads 1.9953 in every engine, so 0.23 percent is the angular grid's own error nec2++ 1.0430 (-47.85%) nec2c 1.0431 aegnec2 1.04296 aegnec2 links the original Fortran SOMNEC and lands on the same numbers, so this is what NEC-2 does here rather than something a translation introduced. (nec2c is 1.3; aegnec2 is built from source.) Before e3f81e6 fixed the c_ggrid interpolation cache, nec2++ gave R = 0.924 and gain 1.980 here, close to the exact values, but only because of the stale-coefficient bug that commit removed. The deck matches data/sommer*.nec so it joins SOM_TESTS, and is not in the default DO_TESTS, so it does not change what make runs by default. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uri4eguGitqE1abazuTstd --- testharness/data/sommerfeld_near_ground.nec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 testharness/data/sommerfeld_near_ground.nec diff --git a/testharness/data/sommerfeld_near_ground.nec b/testharness/data/sommerfeld_near_ground.nec new file mode 100644 index 00000000..5d962f06 --- /dev/null +++ b/testharness/data/sommerfeld_near_ground.nec @@ -0,0 +1,14 @@ +CM Sommerfeld ground 0.02 wavelengths up, where NEC-2 misses exact limits. +CM Sigma is 1e10, so the half-space is a perfect conductor and this must +CM match the same deck with GN 1: R = 0.9168 ohms, average power gain 1.9953. +CM nec2++, nec2c and aegnec2 all give R = 1.759 ohms and gain 1.043 instead. +CM Average power gain is exactly 2 for a lossless antenna over a perfect +CM conductor, so 1.043 is radiating about half the power supplied. +CE +GW 1 11 -0.500000 0.000000 0.041091 0.500000 0.000000 0.041091 0.001000 +GE -1 +GN 2 0 0 0 13.000000 10000000000.000000 +EX 0 1 6 0 1.000000 0.000000 +FR 0 1 0 0 145.900000 0 +RP 0 19 37 1001 0.000 0.000 5.000 10.000 +EN