Antennas · Volume 28

Antenna Modeling Software

NEC-2 / NEC-4 / NEC-5 history, 4nec2 (Windows, free), EZNEC Pro, MMANA-GAL, openEMS (FDTD), CST / HFSS (commercial) — the predict-before-build workflow

Contents

SectionTopic
1About this volume
2Why model? — the predict-before-build philosophy
3The NEC family — NEC-2, NEC-4, NEC-5
44nec2 — the free Windows frontend
5EZNEC Pro+ — the de-facto amateur standard
6MMANA-GAL — free NEC-derived modeler
7openEMS — FDTD time-domain modeling
8CST Studio Suite, HFSS, FEKO — commercial CAE
9The NEC card stack — input file syntax
10Modeling workflow — sketch → segment → run → interpret
11Common modeling errors
12Optimizing a Yagi with 4nec2 — worked example
13Modeling a small magnetic loop
14Bench-validation — comparing model to NanoVNA sweep
15Common gotchas and myths
16Resources

1. About this volume

Final volume of the measurement cluster (Phase 6), sitting one step before Vol 29 (use-case matrix) opens the synthesis cluster. The other four measurement volumes are bench-side: Vol 24 (NanoVNA) and Vol 25 (Other VNAs) measure what you built, Vol 26 (Power, SWR, field-strength) measures what you radiate, Vol 27 (Spectrum analyzers) measures what spectrum you’re using. This volume runs entirely on a laptop, never touches an SMA cable, and tells you what your antenna will do before you cut wire.

The four families covered here — NEC-2 derivatives (4nec2, EZNEC, MMANA-GAL), the FDTD outlier (openEMS), the commercial industrial tier (CST / HFSS / FEKO), and the hand-edited NEC card stack underneath — cover ~95% of the amateur and small-commercial design space. The workflow taught is the closed loop: sketch → segment → run → interpret → adjust → build → measure with NanoVNA → compare → iterate the model with the deltas. Two worked examples (a 2 m Yagi in §12, a 14 MHz magnetic loop in §13) show the loop end-to-end.

Voice is peer-to-peer EE. Method-of-moments and FDTD are named, not explained from scratch; Maxwell is assumed; the card stack section is a working syntax reference. Per-antenna chapters (Vols 6-15) link here for the model-source pointer; Vol 16 (BALUNs) for LD-card modeling; Vol 32 (Antenna farms) for stacked-array inter-antenna coupling.


2. Why model? — the predict-before-build philosophy

The 30-second NEC run on a modern laptop is the most cost-effective hour of antenna work you will ever do. A 5-element Yagi at one frequency runs in under a second; a full pattern sweep across the 2 m band finishes in five seconds; the GA optimizer searching a 6-dimensional parameter space for highest gain subject to an SWR constraint runs in five minutes. The bench equivalent — adjusting element lengths in 5 mm increments, sweeping with NanoVNA after each, turntable-mounting for pattern measurement — is a full weekend per design iteration. Roughly 4 orders of magnitude in time-to-knowledge.

The deeper reason to model isn’t time-saving — it’s that the output is information about the design space, not an answer about one geometry. Sweep dipole length from 0.95 m to 1.05 m and you see resonance position, resonance sharpness (bandwidth), and build tolerance simultaneously. Sweep Yagi boom length from 1.0 m to 2.0 m and you get the entire gain-vs-boom-length tradeoff curve. A bench resonance measurement is one point sample; a swept model is the surface.

Modeling gives you things hand calculation can’t:

  • True feedpoint impedance with all coupling effects. The textbook 73 Ω of a free-space half-wave dipole is a starting point; a real dipole over realistic ground has R+jX that depends on height, soil ε_r/σ, and nearby metal. The model gives you all of that at the actual geometry.
  • The real radiation pattern. A half-wave dipole 0.5 λ above realistic ground has a distinct elevation null at the horizon, a peak around 30°, and ground-reflection lobing that determines DX behavior. 2D azimuth cuts in vendor datasheets hide what happens in elevation.
  • Ground-proximity de-rating. A vertical over 4 buried radials in average soil sits 2-4 dB below the perfect-ground figure. The model quantifies this when you tell it the right ground.

Modeling tells you badly or not at all:

  • Construction tolerance. Real dipoles sag, Yagi element-clamps are imperfect, feedpoints have 1-2 cm physical extent the point-source EX card pretends doesn’t exist. Real-world resonance shifts 1-3% from modeled — the “trim wire” delta — and is why every model needs bench validation.
  • Environmental couplings. Buildings, gutters, fences, trees, parked cars, mast hardware, antenna-farm neighbors — none appear unless modeled. They shift impedance 10-30 Ω, shift resonance 2-5%, add pattern distortion.
  • Feedline radiation. Coax with common-mode current radiates and detunes the feedpoint. NEC’s TL card can model it; most modelers don’t bother and the model silently assumes perfect non-radiating feed.
  • Common-mode behavior. Invisible unless feedline is explicitly modeled. A 1:1 current BALUN (Vol 16) at the feedpoint is what makes the model’s ideal-balanced feed match real-world coax reality.

The model is a sketch, not a portrait. It captures broad strokes (resonance, rough impedance, dominant pattern lobes, free-space gain) with high accuracy; it misses second-order effects (1-3% frequency shift, ±10-20 Ω impedance perturbation, 0.5-1 dB gain reduction, environmental pattern distortion). Enough to make the right design choices — not enough to skip §14’s bench validation.


3. The NEC family — NEC-2, NEC-4, NEC-5

The Numerical Electromagnetics Code is a method-of-moments (MoM) solver for the electric-field integral equation on a structure made of thin wires and surface patches. The output is the current distribution on every wire segment as a complex phasor, from which the modeler derives feedpoint impedance, near-field, and far-field radiation pattern. The code has been developed in three major generations at Lawrence Livermore National Laboratory, with successive improvements to the ground model, junction handling, and numerical conditioning.

VersionYearLead authorsLicenseUsed by
NEC-21981Gerald Burke + Andrew Poggio (LLNL)Public domain (US gov’t work)4nec2, EZNEC+, MMANA-GAL, xnec2c, every free modeler
NEC-3mid-1980sBurke (LLNL)RestrictedEffectively skipped commercially
NEC-41992, refined through 2000sBurke (LLNL)Licensed runtime (not source) — fee from LLNLEZNEC Pro+, 4nec2 (4nec2X engine) if user licensed
NEC-4D2000sBurke (LLNL)Licensed runtime, double-precision4nec2X (alternative engine)
NEC-5~2014Burke (LLNL)Highly restricted — US institutions onlyEffectively inaccessible to amateurs

NEC-2 is the bedrock. Burke and Poggio at LLNL released it in 1981 as Fortran source, fully unrestricted as US government work. Every free amateur modeler today is fundamentally a GUI wrapped around a NEC-2 engine, often with minor numerical patches for cases NEC-2 historically got wrong (notably stepped-radius wires). The algorithm is method of moments on a thin-wire approximation: divide wire into segments, assign each an unknown complex current, enforce the tangential E-field boundary condition at segment centers, LU-decompose the resulting matrix for the segment currents. The free-space Green’s function gives wire-to-wire mutual impedance directly; ground is added via method of images (perfect ground) or Sommerfeld integration (real lossy ground), the latter being the expensive part.

NEC-3 was an intermediate mid-1980s step that primarily added underground-wire support; eclipsed quickly by NEC-4.

NEC-4 (1992, refined through the 2000s) is the version that matters commercially for amateurs. Improvements over NEC-2: better stepped-radius junctions (NEC-2 quietly produces wrong impedances when a junction connects different-radius wires without a buffer segment), better insulated wires, better buried wires, more accurate Sommerfeld ground for radials at or near the soil. LLNL licenses only the runtime (≈$300 originally for single-user amateur, via LLNL’s Industrial Partnerships Office), not source. Most amateurs don’t pay for NEC-4 because NEC-2 is good enough for wires in air; NEC-4 matters when buried radials, insulated wires (a vinyl-insulated EFHW), or stepped-radius geometries (Yagi boom-to-element clamp) dominate.

NEC-5 (~2014) adds numerical improvements and arbitrary-orientation gain reporting. Distribution restricted to US institutions; effectively inaccessible to amateurs. Matters for vendor-datasheet interpretation — a “NEC-5 modeled gain” claim tells you the manufacturer had restricted-code access.

The pragmatic path: learn NEC-2-class tools first and step up to NEC-4 only when your geometry actually triggers one of its specific advantages.


4. 4nec2 — the free Windows frontend

Arie Voors developed 4nec2 from ~2002 through the early 2020s. Windows-native, free for amateur use, runs cleanly under Wine on Linux and macOS. The current version wraps three engines selectable per project: NEC-2 (built in, free), NEC-4 (LLNL-licensed runtime), and NEC-4D (double-precision NEC-4). The 4nec2 program is the GUI; engines are external binaries.

The interface is unusual. Main window is a card-stack editor — the literal NEC text input — with syntax highlighting and a parallel graphical view that re-renders as you edit. Separate windows for Geometry (3D with rotation/zoom/segment numbering), Pattern (2D azimuth + elevation cuts + 3D far-field surface), SWR (impedance + SWR vs frequency), Currents (color-coded segment current overlay), Smith Chart (impedance trajectory across sweep), and Near Field (field magnitude at user points). Power-user EDA feel — dense, multi-window, deeply functional.

Capabilities for amateur work:

  • 2D azimuth/elevation patterns with customizable cut planes and frequency-variant overlay.
  • 3D pattern surface as a colored mesh with adjustable transparency.
  • SWR sweep with sub-Hz frequency granularity, R/X on secondary axis.
  • Per-segment currents color-coded by magnitude and phase — useful for finding high-current points (where a common-mode choke (Vol 16) matters most) and verifying expected behavior (5/8 wave vertical current maximum at expected height).
  • Near-field probes for E/H magnitude at user-specified points — feeds RF-exposure compliance (Vol 31).
  • Far-field with selectable theta/phi grids.
  • Ground modeling — free space, perfect ground (sanity check only), Sommerfeld real (the option to use). Soil parameters: ε_r typically 13 medium, 5-7 desert, 20-30 wet farmland; σ typically 0.005 medium, 0.001 desert, 0.030 wet farmland.
  • GA optimizer in the Optimize tab. Designate variables (element lengths, boom positions, radii), set bounds, define objective (typically weighted sum of “maximize gain at f₀” + “constrain SWR<2 across band”). 4-6 parameter problems converge in 100-500 generations = 2-10 minutes on a 2026 laptop.
  • Frequency sweep runs in seconds for HF wire antennas, minutes for segment-rich geometries with Sommerfeld ground at every step.

Workflow: type GW cards or draw in the graphical builder, add EX/GN/FR/RP cards, run with F7. To sweep a parameter, use the substitution syntax — write GW 1 21 0 -%L%/2 10 0 %L%/2 10 0.001 with %L% declared elsewhere; the sweep tool iterates across a defined range. Exports: CSV per plot, .NEC text for the card stack, touchstone .s1p/.s2p from the Smith chart — load-bearing for bench comparison with NanoVNA captures (Vol 24) in §14.

Gripes: Windows-only (Wine and CrossOver fix this), and a 1990s-EDA UI aesthetic. Past those, the most capable free NEC frontend available and the default 2026 recommendation.


5. EZNEC Pro+ — the de-facto amateur standard

Roy Lewallen (W7EL) developed EZNEC from the early 1990s through 2024, when he retired and discontinued new sales. The program most amateurs cut their modeling teeth on, and the source of most radiation-pattern plots in the ARRL Antenna Book through the 2010s.

TierEngineApprox. price (2023)Segment limit
EZNECNEC-2$100500
EZNEC+NEC-2$1601500
EZNEC Pro+NEC-4 (user supplies LLNL license)$52520000

The interface is cleaner than 4nec2 — single main window with wire-list spreadsheet, sources/loads lists, ground specification, tabbed pattern/SWR/Smith views. Pattern plots are publication-ready out of the box (why ARRL editors preferred them). Roy’s tutorial PDFs and video walkthroughs are vastly more accessible than 4nec2’s terse help.

Capability differences vs 4nec2 are mostly UI polish — same NEC-2 underneath for non-Pro tiers, NEC-4 at Pro+. Wire list is a click-to-edit spreadsheet rather than a card-stack text editor; sources and loads attached to wires via UI rather than tag/segment references. Pattern plots are publication-quality with multi-trace overlay and SVG/PNG export. The single notable gap: no built-in optimizer in EZNEC Pro+ as shipped — you sweep parameters manually or via script. This is the strongest argument for 4nec2 when GA optimization matters.

Discontinuation in 2024. Roy retired mid-2024 and ceased new sales. The eznec.com site has a retirement notice. Installed copies work indefinitely — no online activation, no cloud-tether. The user community on the EZNEC Groups.io list has continued past retirement.

Used market. Licenses occasionally surface on QRZ swap, eHam classifieds, and ham-radio Facebook groups: $50-150 for regular tiers, $200-400 for Pro+. Licenses are nominally transferable (Roy permitted this). Two cautions: verify the seller will provide original documentation and has stopped using their copy; for Pro+ specifically, the embedded LLNL NEC-4 sub-license is not transferable via private sale — the new owner would need to obtain their own NEC-4 license from LLNL.

2026 recommendation for new modelers: 4nec2 first. EZNEC remains excellent if you find a used copy at a price you like — and being able to read EZNEC models from the ARRL Antenna Book is useful regardless of your day-to-day tool, because the NEC card stacks underneath are identical.


6. MMANA-GAL — free NEC-derived modeler

Unusual lineage. Original MMANA was authored by Makoto Mori (JE3HHT) in Japan late 1990s as a MININEC-3-based modeler with Japanese UI. Igor Goncharenko (DL2KQ, Belarus) and Alexander Schewelew (DL1PBD, Germany) ported and extended it; the “GAL” branch added GA optimization, English UI, better ground-effect handling, and engine improvements bringing it close to NEC-2 capabilities. Current maintainer is Schewelew at http://gal-ana.de/basicmm/en/. Free Basic + paid Pro (≈€60, larger geometry limits and advanced optimizer modes).

The engine is MININEC-derived, not strictly NEC-2. MININEC was a simpler MoM code from Logan, Rockway, and Li at Naval Ocean Systems Center in the early 1980s, originally BASIC for desktop computers. Uses pulse current basis functions vs NEC-2’s sinusoidal — different convergence behavior, but for typical amateur wire antennas results are within fractions of a dB for gain and a few percent for resonance. Engine has been improved over the years to handle stock MININEC weaknesses (stepped-radius junctions, tightly-bent geometries). The amateur community treats it as NEC-equivalent.

FeatureMMANA-GAL Basic4nec2
OSWindows + WineWindows + Wine
CostFree / €60 ProFree
EngineMININEC-derivedNEC-2 (+ NEC-4 if licensed)
2D / 3D patternYes / ProYes / Yes
Currents + SmithYesYes
Near-field probeNoYes
GA optimizerYes (Pro)Yes
DXF importYes (Pro)Limited
Sommerfeld groundYesYes
Speed (HF sweep)≈1-2× fasterBaseline

Interface is more conventional than 4nec2 — single tabbed window with Geometry, Sources, Loads, Materials, View, Far Field, Calculate, Optimize, Compare tabs. Geometry is a wire-list spreadsheet like EZNEC. The Compare tab overlays two patterns or sweeps — useful for visualizing parameter changes.

Speed advantage is real: MININEC’s pulse-basis matrix solve is lighter than NEC-2’s sinusoidal-basis matrix. Polish is lower (smaller user base, rough English docs, fewer YouTube tutorials) but the program is fully functional and well-maintained.

Role in 2026: practical free alternative for non-Windows users who don’t want Wine, and the dominant free modeler in the European/Russian amateur communities. Yagi-Uda optimization is a strength — the optimizer is well-tuned for Yagi parameter spaces, and many published European Yagi designs are MMANA-GAL models.


7. openEMS — FDTD time-domain modeling

openEMS is an open-source FDTD electromagnetic simulator developed by Thorsten Liebig at University of Duisburg-Essen, actively developed through the 2010s and 2020s. GPL-licensed, cross-platform (Linux/macOS/Windows), driven from MATLAB/Octave or Python frontends — no native GUI by design.

Fundamental algorithm difference from NEC. NEC solves a frequency-domain integral equation on a 1D wire network (optionally with 2D surface patches) for current distribution. openEMS solves Maxwell’s equations in 3D space discretized into a Yee grid of voxels, time-stepping E and H fields forward. To get frequency-domain results (impedance, S-parameters, pattern), launch a Gaussian-modulated pulse into a port, time-step until the pulse propagates, reflects, and rings down, then FFT the port voltage/current waveforms for the full broadband response.

What openEMS can do that NEC can’t:

  • Dielectric materials. Real PCB substrates (FR4, Rogers, alumina) with real ε_r and tan δ. Radomes. Housings. NEC has no dielectric concept — only conductors in free space or above ground.
  • Arbitrary 3D structures. Finite ground planes (NEC’s “perfect ground” and Sommerfeld are both infinite). HT chassis with embedded PCB antenna. Vehicle frame with mag-mount on roof. Aircraft fuselage interior.
  • Broadband response in one run. The Gaussian pulse excites all frequencies in its passband; one simulation + FFT gives the full S-parameter sweep. NEC needs a separate run at each frequency point.
  • Near-field-to-far-field transformation with the full structure included. A phone housing scattering or absorbing antenna radiation is captured automatically.
  • Buried antennas in finite-conductivity soil with complex geometry — sloped wire entering ground at an angle, vertical copper pipe in soil with varying conductivity layers. NEC-4’s Sommerfeld assumes flat infinite half-space.

What NEC does better:

  • Speed on simple wire antennas. NEC-2 finishes a single HF dipole at one frequency in milliseconds; openEMS takes seconds to minutes because it must voxelize and time-step the entire simulation volume. Factor of 100-1000× in NEC’s favor for typical wire antennas.
  • Convergence sanity. NEC’s matrix solve either converges or it doesn’t. FDTD requires user decisions about cell size, time step, simulation duration, and absorbing boundaries — bad choices silently produce wrong results.
  • Established literature. Almost every published amateur design uses NEC; comparing to published work requires NEC compatibility.

Where openEMS pays off for the amateur/hobbyist:

  • PCB antennas. A 2.4 GHz chip antenna on an ESP32 module, an inverted-F on a custom board, a meandered loop on an RFID tag — substrate matters and NEC can’t see it.
  • Microstrip patches. Single, arrays, stacked — substrate dielectric is fundamental.
  • Very-near-ground or buried antennas with complex soil profiles.
  • Handheld chassis effects. Predicting pattern distortion on a UV-K5-class HT from the chassis, battery, and the user’s hand requires FDTD.

Learning curve is significantly steeper than 4nec2. No native GUI means writing MATLAB/Octave/Python scripts for geometry, materials, ports, grid. Output processed with more scripting. The payoff is that no other free tool comes close for the problems where it shines. For everything else in this volume (wire antennas in air over ground), use NEC.


8. CST Studio Suite, HFSS, FEKO — commercial CAE

Three industrial-grade EM simulator product lines dominate the commercial antenna-design market. Understanding their capabilities matters for vendor-datasheet interpretation — a manufacturer’s published gain/pattern is almost always from one of these.

CST Studio Suite (originally CST Microwave Studio, acquired by Dassault Systèmes 2016, in the Simulia family). Primary algorithm is Finite Integration Technique (FIT — generalization of FDTD with non-cubic cells), plus FEM, MoM, multilayer planar solvers, and asymptotic SBR for electrically very large objects. Heavily used in 5G base-station arrays, automotive radar, satcom, defense radar.

ANSYS HFSS (High-Frequency Structure Simulator, originally Ansoft, ANSYS 2008). Primary algorithm is frequency-domain FEM with adaptive meshing — iteratively refines mesh where the solution changes fastest, producing very accurate results for resonant structures. Also includes Integral Equation (MoM-like) and SBR+ asymptotic solvers. Heavily used in mm-wave packaging, waveguides, filters, large arrays.

Altair FEKO (originally South African, Altair 2014). Primary algorithm is MoM with Multi-Level Fast Multipole Method (MLFMM) for electrically large MoM problems, plus FEM and asymptotic solvers (PO, UTD, RL-GO). Heavily used in radar cross-section, platform-mounted antennas (ships, aircraft, vehicles), and EMC.

ToolPrimary algorithmCost tierTypical use
CST Studio SuiteFIT + FEM + MoM$30-200k+/yrBase stations, radar, satcom
ANSYS HFSSFEM (adaptive mesh)$30-200k+/yrmm-wave, waveguides, large arrays
Altair FEKOMoM-MLFMM + asymptotic$30-200k+/yrPlatform antennas, RCS, EMC

None are amateur-accessible at commercial pricing. Academic licenses (several thousand per year per research group) exist through university IT — requires institutional affiliation. Free Student Editions (CST Student / ANSYS Student / FEKO Student) have substantial geometry and feature limits — useful for learning the GUI, not for serious work.

Why this matters for the amateur reader. A vendor “modeled gain: 12.5 dBi” claim is only as trustworthy as the simulation context. A datasheet saying “Modeled in CST Studio Suite with full mechanical structure including radome, mounting bracket, and 1 m of mast” carries strong credibility. A datasheet that just says “Gain 9 dBi” is marketing. Recognizing the analysis tier behind a published number is part of the antenna-purchaser’s literacy.

The amateur and small-commercial world doesn’t need this tier. NEC-2/NEC-4 plus bench validation with NanoVNA (Vol 24) covers everything in this deep dive’s per-antenna chapters. CST/HFSS/FEKO are the tier you’d reach for designing a commercial product line, graduate research, or defense work.


9. The NEC card stack — input file syntax

A NEC input deck is a plain ASCII file. Each line is a “card” — punched-card-era nomenclature. Each card starts with a two-letter keyword followed by integer and float parameters in fixed-format columns (legacy, 80-col) or comma/space-separated free-format (modern; what 4nec2 and EZNEC write). All modern modelers accept free-format.

This section is a working reference for the cards covering 95% of amateur modeling. The full NEC-2 docs (Burke and Poggio 1981) have 30+ more card types for surface patches, transmission lines, networks, and special excitations; the cards below cover wire antennas in air over ground, the dominant case.

CM — Comment

CM This is a comment, ignored by the engine but kept in the output file.
CM 20m dipole at 10m height, single-frequency at 14.2 MHz.

Multiple CM cards stack at the top of the file. The engine prints them at the head of the output for traceability.

CE — End of Comments

CE

Mandatory before the first geometry card. No parameters.

GW — Wire Geometry

GW <tag> <segments> <x1> <y1> <z1> <x2> <y2> <z2> <radius>

The most-used card. Defines a straight wire from point (x1, y1, z1) to point (x2, y2, z2) with given radius, divided into the specified number of segments. The tag is an integer identifier used to reference this wire from other cards (excitations, loads, pattern selection). All coordinates and the radius are in meters.

Example — a 20 m band half-wave dipole, 10.14 m long total, oriented along the y-axis, centered at the origin in x and z, mounted 10 m above ground, with 1 mm radius (≈ #14 AWG):

GW 1 21 0 -5.07 10 0 5.07 10 0.001

Tag 1, 21 segments (an odd number puts a segment center at the geometric center, useful for placing the feedpoint there), endpoints at (0, -5.07, 10) and (0, 5.07, 10), wire radius 0.001 m.

Segment-count rule of thumb: at the highest frequency you’ll simulate, segments should be no longer than λ/10, and odd segment counts let you put a source or load on the center segment. For a 10.14 m dipole at 14 MHz, λ = 21.4 m, λ/10 = 2.14 m, minimum 5 segments; 21 segments at ≈ 48 cm each is comfortable and standard.

GE — End of Geometry

GE <ground_flag>

Mandatory after all GW cards, before all “program control” cards. The ground_flag parameter is the historical way to set the ground model:

ValueMeaning
0No ground (free space)
1Perfect ground (infinite perfectly-conducting half-space)
-1No ground (modern equivalent of 0, prefer this)

Practical: use GE -1 for free space (no ground), and use GE 0 plus a GN card for any non-free-space ground model. Some modelers automatically emit the right combination.

GN — Ground Specification

GN <type> <num_radials> <eps_r> <sigma> ...

Type selects the ground model:

TypeMeaning
0Perfect ground (no losses)
1Reflection-coefficient method (fast, approximate, OK for far-field pattern)
2Sommerfeld-Norton real ground (slower, accurate, use for impedance)

For real-ground modeling, use type 2 with realistic soil parameters. Common soil values:

Soil typeε_r (relative dielectric)σ (conductivity, S/m)
Salt water815.0
Wet farmland20-300.030
Medium / “average”130.005
Dry / sandy7-100.002
Desert / rocky50.001
Mountain / volcanic4-60.0005

Example for medium soil:

GN 2 0 0 0 13 0.005

(Type 2, zero radials, the next two zeros are reserved, then ε_r = 13 and σ = 0.005 S/m.)

The num_radials parameter activates an alternative ground model for vertical antennas with a buried radial system; this is one of the cases where NEC-4 outperforms NEC-2 because the radial-coupling math is more accurate.

EX — Excitation

EX <type> <tag> <segment> <0> <voltage_real> <voltage_imag>

Type 0 is a voltage source (the common case). Tag and segment specify which wire segment carries the source — for the 21-segment dipole above with the source at the geometric center, that’s tag 1, segment 11. The fourth field is reserved (set to 0 for type 0). The next two fields are the complex voltage amplitude — typically (1.0, 0.0) for 1 V applied with no phase offset.

Example for the 20m dipole:

EX 0 1 11 0 1 0

Other excitation types exist (current source, plane-wave incident field for receive-only studies, etc.) but the voltage source is by far the most-used.

FR — Frequency

FR 0 <num_steps> 0 0 <start_mhz> <step_mhz>

Single frequency at 14.2 MHz:

FR 0 1 0 0 14.2 0

Sweep from 14.0 to 14.4 MHz in 21 steps of 20 kHz:

FR 0 21 0 0 14.0 0.02

The “0” type uses linear stepping; logarithmic stepping (type 1) exists but is rarely used for antenna work.

LD — Lumped Load

LD <type> <tag> <seg1> <seg2> <param1> <param2> <param3>

Adds a series or parallel RLC load on one or more segments. Type selects the topology:

TypeMeaningParameters
0Series RLCR (Ω), L (H), C (F)
1Parallel RLCR (Ω), L (H), C (F)
4Distributed loss (Ω per meter)conductivity, permeability factor
5Wire conductivityσ (S/m)

Example: a 32 pF parallel capacitor loading wire tag 7, segment 1, simulating the tuning cap of a magnetic loop:

LD 1 7 1 1 0 0 32e-12

Example: a 22 µH loading coil at the center segment of wire tag 3 (a loaded mobile whip):

LD 0 3 5 5 0 22e-6 0

LD is what makes a trap dipole, a loaded vertical, or a tuned magnetic loop modelable. Without LD cards, NEC would just see a passive wire and report the wrong resonance.

RP — Radiation Pattern

RP 0 <num_theta> <num_phi> <flag> <theta_start> <phi_start> <theta_step> <phi_step> [other params]

The most common pattern computation — a full azimuth circle at one elevation angle:

RP 0 1 360 1000 90 0 0 1

One theta step at 90° (the horizontal plane, elevation = 0° for the typical antenna-modeler convention where theta is from zenith), 360 phi steps from 0° in 1° increments, flag 1000 turns on a few useful normalization options.

A full hemisphere (for 3D pattern surface) at 5° granularity:

RP 0 19 73 1000 0 0 5 5

19 theta steps × 73 phi steps gives the full hemisphere with 5° resolution.

EN — End of Run

EN

Mandatory final card. No parameters. The engine stops reading when it hits EN.

Worked example — complete deck for a 20 m dipole

A full NEC-2 deck for a 10.14 m half-wave dipole, oriented east-west, 10 m above medium soil, fed at the center, computed at 14.2 MHz with a 360° azimuth pattern at 30° elevation:

CM 20 meter dipole, half wave, 10.14 m total length
CM Oriented east-west, fed at center, 10 m above ground
CM Wire diameter 2 mm (radius 0.001 m), medium soil
CE
GW 1 21 0 -5.07 10 0 5.07 10 0.001
GE 0
GN 2 0 0 0 13 0.005
EX 0 1 11 0 1 0
FR 0 1 0 0 14.2 0
RP 0 1 360 1000 60 0 0 1
EN

Eleven lines including comments. This deck runs in under a second on any modern laptop. The output gives feedpoint impedance (typically around 70 + j30 Ω for a dipole at this height, vs the free-space 73 + j0 Ω), SWR against 50 Ω (≈ 1.7:1), and the azimuth radiation pattern at 30° elevation. Sweep the dipole length (vary the y-coordinates of the GW endpoints) to find resonance; sweep the height (vary the z) to see ground-effect on impedance and pattern shape.

This deck is also what 4nec2’s text editor, EZNEC’s wire-list-to-text export, and MMANA-GAL’s “save as NEC” command produce. The GUI tools are conveniences on top of cards that look exactly like this.


10. Modeling workflow — sketch → segment → run → interpret

Ten iterative steps. First time through is hours because every decision is new; tenth time through is minutes because the pattern is muscle memory.

1. Sketch with dimensions on paper. Front/side/top views, every wire endpoint coordinated to a chosen origin (the feedpoint is convenient), wire diameter marked, intended ground height marked. The slowest-feeling step and the one that prevents the most errors — every later model mistake traces back to an ambiguity in the sketch.

2. Decide segmentation. Segments ≤ λ/10 at the highest frequency of interest. A multi-band antenna sweepable from 80 m through 10 m means λ/10 at 28 MHz (≈1.07 m), not 3.5 MHz. Wires meeting at a junction must have segment lengths within a 2:1 ratio on both sides — beyond that, MoM accuracy degrades because basis-function matching across the junction becomes singular. Subdivide longer-wire segments to match.

3. Define wires (GW) with consistent radius. The wire radius matters for impedance — thicker wire has lower impedance, broader bandwidth. Use actual diameter, not “0.001 m default”:

AWGDiameter (mm)Radius (m)
#181.0240.000512
#141.6280.000814
#122.0530.001026
#102.5880.001294
#83.2640.001632
1/2” copper tubing12.70.00635
1” aluminum tubing25.40.0127

4. Specify excitation (EX) at the center of the driven element. Multi-driven arrays (stacked Yagi pair, phased verticals) need multiple EX cards with chosen voltage phases.

5. Specify ground (GN). Free space (GE -1, no GN) only for free-space-gain reference or antennas >2 λ up. Practical installations use Sommerfeld real ground (GN 2 0 0 0 13 0.005 for medium soil). Never use perfect ground for impedance work — 2-4 dB optimistic gain and unrealistic impedance.

6. Specify frequency (FR). Start at center; once roughly tuned, sweep ±5-10% to find true resonance and SWR-bandwidth. A 14.2 MHz dipole: sweep 13.5 to 14.9 in 50 kHz steps.

7. Run. F7 in 4nec2, F12 in EZNEC, Calculate-tab in MMANA-GAL.

8. Read. SWR sweep (resonance location, SWR<2 width = usable bandwidth); radiation pattern (2D azimuth at the useful elevation — 30° for HF DX, 90° for NVIS, 5° for VHF/UHF terrestrial; check main lobe, null depths, side-lobe structure); per-segment currents (high-current points where theory predicts — center for half-wave dipole, ends for EFHW, 5/8 height for 5/8 vertical; anomalous patterns indicate model errors); impedance R+jX at feedpoint at every frequency (compare to what your matching network expects — Vol 16 BALUNs, Vol 17 tuners).

9. Iterate. Dipole: total length sets resonance. Yagi: parasitic-element lengths set pattern, spacings set impedance + pattern. Loop: tuning cap sets resonance, coupling loop sets impedance.

10. Optimize. Once manual iteration has the design in the rough neighborhood, run the built-in GA optimizer. Define variables, bounds, and objective function. Common objectives: “Max gain at f_center subject to SWR<2 across band,” “Min average SWR,” “Max F/B at f_center subject to gain > G_min,” “Weighted combination of gain and F/B subject to SWR constraint.” 4-6 parameter problems converge in 100-500 generations = 2-10 minutes. Capture the optimized card stack as your build BOM.


11. Common modeling errors

Six failure modes account for most bad modeling results. All silent — the engine reports a number, the number is wrong, the modeler doesn’t notice until bench measurement diverges.

1. Bad segmentation. Too few segments gives wrong impedance and missed resonances; too many slows runs without accuracy gain. The Cebik (W4RNL) rule: “20-50 segments per half-wavelength for typical antennas, with more near feedpoints and bends.” A 20 m dipole at 14 MHz with 5 segments gives gain within 1 dB but impedance off by 10-20 Ω and resonance off by 2-3%. At 21 segments, impedance is within 1 Ω and resonance within 0.5%. 101 segments adds nothing measurable and slows the run 30×. Sweet spot for HF wire antennas: 15-30 segments per half-wave.

2. Misplaced excitation. Feeding a dipole at one end instead of center reports the impedance and gain of an end-fed wire — looks numerically plausible but is the wrong antenna. Same error if you put EX on the wrong tag in a Yagi (driven element is conventionally tag 1; renumber and forget to update EX, you’ve just fed a parasitic). Always visually verify the excitation marker.

Subtler: a center-fed dipole modeled with a single voltage source represents a perfect balanced feed. Real coax-fed dipoles without a current balun have common-mode current that detunes the feedpoint by 5-15 Ω impedance and 1-3% resonance. Either add a TL card modeling the feedline (NEC-2 supports it, not covered in this volume’s syntax reference) or accept the model as the ideal upper bound and budget for the BALUN/choke delta (Vol 16).

3. Wrong ground model. Three traps. (a) Perfect ground (GN 0) gives 2-4 dB optimistic gain and ignores radial losses on verticals entirely — never use for impedance work. (b) Free space (no ground) gives kilometers-up pattern, dramatically different from installed elevation behavior. (c) Sommerfeld real (GN 2) with realistic soil is correct — but leaving the default ε_r=1, σ=0 in the card silently produces free space dressed as “real ground.” Always set both parameters explicitly.

4. Lumped loads omitted. A loaded mobile whip = shortened wire + loading coil reactance bringing the system to resonance. Without an LD card for the coil, the model sees a short wire wildly off-resonance. Trap dipoles have parallel-resonant traps decoupling outer segments at the trap’s design frequency; magnetic loops have tuning caps at the gap. Every real-world load needs a corresponding LD card. Loading-coil Q matters — Q=100-300 typical, appears as series R = X_L / Q in LD type 0.

5. Feedline ignored. Coax with common-mode current radiates and detunes the feedpoint. If the run is >5% of antenna length or you’re predicting feedline-radiation pattern distortion, model the coax as a thin TL card. For amateur work with a proper current balun at the feedpoint (Vol 16), the coax is electrically invisible and ignoring it is fine. In stealth installations where coax runs along a fence or mast and is suspected of acting as part of the antenna, explicit modeling confirms or refutes.

6. Wire-junction segmentation mismatch. Junctions where segment lengths differ by more than 2:1 give numerical errors — anomalous current peaks/troughs at the junction, or impedance bouncing wildly with small geometry changes. Subdivide the longer wire’s segments to match. NEC-2 is particularly sensitive; NEC-4 better but still benefits from clean junctions. Stepped-radius junctions (different-radius wires meeting) are mishandled by NEC-2 in a known way (impedance wrong by a few ohms); NEC-4 handles them correctly.


12. Optimizing a Yagi with 4nec2 — worked example

The K1FO Yagi design family by Steve Powlishen (K1FO, formerly K9LBL) was published in the 1980s in Ham Radio Magazine and later in the ARRL Antenna Book. Multiple element-count variants are documented; we’ll use the 5-element 2 m Yagi for 144-148 MHz as the worked example. The original published design is approximately: boom length 1.5 m, with elements at positions and lengths roughly as below. Spec confidence note: the exact published K1FO element dimensions vary slightly across references (the ARRL Antenna Book editions and the original Ham Radio article have minor edits over the years); the numbers below are the right ballpark for the optimization exercise but should be cross-checked against your specific edition of the ARRL Antenna Book before treating them as build-ready. The optimization process — not the seed numbers — is what this section teaches.

Seed geometry (boom positions and element lengths, approximate K1FO 5-element 2 m):

ElementBoom position (m)Length (m)
Reflector-0.201.005
Driven00.985
Director 1+0.250.952
Director 2+0.500.935
Director 3+0.850.918

Boom is 1.5 m total. All elements oriented along the y-axis (perpendicular to the boom). Element radius 0.003 m (6 mm diameter aluminum tubing, typical for 2 m Yagi construction). Boom is treated as a non-conductor for modeling purposes (the elements are insulated from the boom by plastic isolators in the canonical K1FO mechanical design).

NEC card stack for the seed geometry:

CM 5-element K1FO 2m Yagi, seed geometry
CM Boom positions: refl -0.20, driven 0, dir1 +0.25, dir2 +0.50, dir3 +0.85
CM Element radius 0.003 m (6 mm Al tubing), 11 segments per element
CE
GW 1 11 -0.20 -0.5025 0 -0.20 0.5025 0 0.003
GW 2 11 0 -0.4925 0 0 0.4925 0 0.003
GW 3 11 0.25 -0.476 0 0.25 0.476 0 0.003
GW 4 11 0.50 -0.4675 0 0.50 0.4675 0 0.003
GW 5 11 0.85 -0.459 0 0.85 0.459 0 0.003
GE -1
EX 0 2 6 0 1 0
FR 0 9 0 0 144 0.5
RP 0 1 360 1000 90 0 0 1
EN

Five GW cards (one per element), 11 segments each (odd, so segment 6 is center). GE -1 for free space (we’ll evaluate free-space gain; ground modeling for a 2 m Yagi means the antenna is mounted on a mast at known height, which is a second-step refinement). EX feeds tag 2 (the driven element) at segment 6 (center). FR sweeps 144 to 148 MHz in 9 steps of 0.5 MHz. RP computes the full azimuth pattern at the equator.

Initial run result (typical for seed geometry, exact values depend on the segmentation and on the precise published dimensions used):

  • Free-space gain at 144.1 MHz: ≈ 10.2 dBi
  • Free-space gain at 146.5 MHz: ≈ 10.1 dBi
  • Free-space gain at 148.0 MHz: ≈ 9.7 dBi
  • Front-to-back ratio: 18-22 dB across the band
  • SWR at 144.1 MHz: ≈ 1.4:1
  • SWR at 146.5 MHz: ≈ 1.8:1
  • SWR at 148.0 MHz: ≈ 2.6:1

The seed antenna is reasonably good across the lower portion of the band but degrades at the upper edge. SWR exceeds 2:1 above 147 MHz, which is problematic for the SSB/FM portion of the band (147-148 MHz). This is exactly the case where optimization pays off.

Setting up the optimizer in 4nec2. Open the Optimize tab. Designate as variables:

  • L_driven (length of element 2), bounded 0.96 to 1.01 m
  • L_dir1 (length of element 3), bounded 0.93 to 0.97 m
  • S_dir1 (spacing of element 3), bounded 0.20 to 0.30 m
  • S_dir2 (spacing of element 4), bounded 0.45 to 0.55 m

(Hold reflector dimensions fixed — they’re less sensitive — and hold dir3 dimensions fixed to reduce parameter space.)

Objective function:

Maximize gain at 146.5 MHz
Subject to SWR < 1.8 over [144.0, 148.0] MHz
Weight gain 0.7, weight SWR penalty 0.3

Run. Genetic algorithm with population 30, generations 200, mutation rate 0.1, crossover rate 0.8 (4nec2 defaults are reasonable starting values). On a 2026-era laptop, this finishes in 3-5 minutes — the engine runs ~6000 simulations total (200 generations × 30 individuals), each at 9 frequency points.

Optimized result (representative — the exact final geometry depends on the GA’s random seed):

  • L_driven settles around 0.978 m (slightly shorter than seed)
  • L_dir1 settles around 0.948 m (slightly shorter than seed)
  • S_dir1 settles around 0.27 m (slightly farther than seed)
  • S_dir2 settles around 0.52 m (slightly farther than seed)
  • Free-space gain at 146.5 MHz: ≈ 10.4 dBi (up from 10.1)
  • Free-space gain at 148.0 MHz: ≈ 10.2 dBi (up from 9.7)
  • SWR at 148.0 MHz: ≈ 1.7:1 (down from 2.6)
  • F/B ratio: 20-23 dB across the band (similar to seed)

The gain didn’t change dramatically — Yagis tuned to within a few percent of optimum already get most of the available gain — but the SWR bandwidth widened significantly. The antenna is now usable across the full 144-148 MHz band without an external tuner. This is what optimization buys: a flat-response design across the operating band rather than a peaked design tuned to one frequency.

Capture the optimized card stack — copy the resulting GW geometry from 4nec2’s editor and save it as your build BOM. The element lengths and boom positions in that file are the dimensions to cut.

Predicted vs measured. The real-world antenna built from these dimensions should come within 0.5 dB of the modeled gain (gain measurement on the bench is hard, so the comparison is usually inferred from a pattern measurement on a turntable). Resonance frequency should be within 1-2% of the modeled resonance (build with the design lengths, measure SWR sweep with a NanoVNA (Vol 24), trim element lengths if needed). The dominant sources of model-vs-measured error in a Yagi build are (1) element-clamp imperfections (the model assumes elements are continuous through the boom; the real elements are interrupted by the clamp), (2) boom material (if you used aluminum boom with the elements not properly insulated, the boom is electrically part of the antenna), and (3) the mast and surrounding environment (the model is free space; reality is the antenna on a mast with other antennas in the antenna farm — see Vol 32 for the multi-antenna interaction discussion).


13. Modeling a small magnetic loop

A small magnetic transmitting loop (the Alexloop, MFJ-1786, Ciro Mazzoni family — see Vol 14 (transmitting loops)) is one of the more interesting antennas to model because the geometry is simple but the LD-card modeling of the tuning capacitor and conductor loss is where most of the design content lives. A 1 m diameter copper-pipe loop for 14 MHz operation is the canonical worked example.

Geometry. A circular loop of 1 m diameter (3.14 m circumference) made of 12 mm diameter copper pipe (radius 6 mm). The loop is open at the top, with a tuning capacitor across the gap; the feedpoint is a small coupling loop (1/5 the diameter of the main loop) at the bottom, magnetically coupled to the main loop and grounded to it at one point.

NEC can’t model curved wires directly — every GW card is a straight wire. The standard approach is to approximate the loop as a regular polygon of 12-16 short straight wires joined head-to-tail. Sixteen segments around a 1 m diameter circle gives chord lengths of 0.196 m each (chord ≈ 2 × r × sin(π/N) = 2 × 0.5 × sin(π/16) = 0.195 m). The approximation error in resonance frequency for a 16-sided polygon is less than 1%; for an 8-sided polygon it’s about 4%. Sixteen sides is the typical compromise.

For each chord wire, the radius is 0.006 m (the actual pipe radius). The chord endpoints lie on the unit circle in the x-y plane (or any chosen plane).

The tuning capacitor. At the top of the loop (opposite the feedpoint), place a 1-cm gap. The tuning cap goes across that gap as a parallel-resonant element. Inductance of a circular loop of diameter D = 1 m, conductor radius a = 0.006 m, calculated from the textbook formula:

L = μ₀ × (D/2) × [ln(8 × (D/2) / a) - 2] L = 4π × 10⁻⁷ × 0.5 × [ln(8 × 0.5 / 0.006) - 2] L = 6.28 × 10⁻⁷ × [ln(667) - 2] L = 6.28 × 10⁻⁷ × [6.50 - 2] L = 6.28 × 10⁻⁷ × 4.50 L ≈ 2.83 × 10⁻⁶ H ≈ 2.83 µH

(Approximation; the actual loop inductance varies with the precise geometry and the polygon approximation. NEC will compute the impedance directly without needing this number, but the textbook L helps as a sanity check.)

Resonating capacitance at 14 MHz:

X_L = 2πfL = 2π × 14 × 10⁶ × 2.83 × 10⁻⁶ ≈ 249 Ω

C_res = 1 / (2πf × X_L) = 1 / (2π × 14 × 10⁶ × 249) ≈ 45.7 pF

So the tuning cap value at 14 MHz is approximately 46 pF. (For reference, the published value for the canonical 1 m loop at 14 MHz is in the 30-50 pF range depending on construction details and stray inductance; 46 pF lands cleanly in that range.)

Conductor loss. Skin-depth resistance for copper at 14 MHz:

R_s = √(πfμ₀/σ_Cu) = √(π × 14 × 10⁶ × 4π × 10⁻⁷ / 5.8 × 10⁷) R_s ≈ √(3.05 × 10⁻⁶) R_s ≈ 1.75 × 10⁻³ Ω/sq = 1.75 mΩ per square

For a 12 mm OD pipe, the inner circumference is 2π × 0.006 = 0.0377 m. The total perimeter resistance per meter of pipe length is R_s / inner_circumference. The total loop resistance for the 3.14 m perimeter is approximately:

R_loss = R_s × (loop_perimeter) / (pipe_inner_circumference) R_loss = 1.75 × 10⁻³ × 3.14 / 0.0377 R_loss ≈ 0.146 Ω

(This is approximate — skin-effect resistance for a curved conductor with current density varying around the circumference is more complex, but the order of magnitude is right.)

Card stack (abbreviated — 16 GW cards for the polygon plus the LD card for the capacitor and the EX card on the coupling loop):

CM 1m diameter copper-pipe magnetic loop, 14 MHz
CM 16-sided polygon approximation, 6mm wire radius
CM Tuning cap 46 pF at top gap, coupling loop at bottom
CE
GW 1 3 0.50 0 0 0.46 0.19 0 0.006
GW 2 3 0.46 0.19 0 0.35 0.35 0 0.006
GW 3 3 0.35 0.35 0 0.19 0.46 0 0.006
GW 4 3 0.19 0.46 0 0 0.50 0 0.006
[... 12 more GW cards completing the polygon ...]
GW 17 5 -0.10 -0.55 0 0.10 -0.55 0 0.0015
GE -1
LD 1 1 1 1 0.146 0 46e-12
EX 0 17 3 0 1 0
FR 0 21 0 0 13.5 0.05
RP 0 1 360 1000 90 0 0 1
EN

(Sixteen GW cards for the loop polygon, one GW card for the coupling loop, LD card for the parallel-resonant capacitor + resistor at the gap, EX card on the center segment of the coupling loop, FR sweeps 13.5 to 14.5 MHz in 50 kHz steps.)

Expected results:

  • Very high impedance at resonance (the loop is parallel-resonant, so |Z| can be in the kilohm range at the loop’s terminals before the coupling loop steps it down to roughly 50 Ω at the feedpoint).
  • Very narrow bandwidth — Q in the 200-500 range, so the -3 dB SWR bandwidth is roughly f₀/Q = 14 × 10⁶ / 300 ≈ 47 kHz at Q=300. The “tunable across the band” property of a magnetic loop relies on remotely re-tuning the cap, not on inherent SWR bandwidth.
  • Radiation pattern: a near-perfect figure-8 in the plane of the loop, with the maxima broadside (perpendicular to the loop’s plane) and the nulls along the loop’s axis. For a 1 m loop at 14 MHz, the pattern is essentially independent of mounting height (the loop is small compared to λ, so ground-image effects are weaker than for a half-wave dipole).
  • Efficiency: 30-70% depending on conductor quality and tuning-cap loss. A 12 mm copper pipe with a high-Q vacuum variable capacitor (Q > 1000) achieves the high end; a thinner conductor (RG-213 outer shield as the radiator, a not-uncommon DIY choice) with a butterfly air-variable capacitor (Q ~300-500) is at the low end.

Compare to bench measurement. Build the loop, hook up a NanoVNA (Vol 24) at the coupling-loop feedpoint, sweep across resonance. Expect:

  • Model Q ≈ 10-20% optimistic compared to measured Q (NEC doesn’t model dielectric losses from the capacitor insulation, supporting structure, or nearby objects — all of which spoil real-world Q somewhat).
  • Resonance frequency within 1-2% of model (cap value is the dominant variable; small adjustments to the cap re-tune to exact resonance).
  • Pattern measurement requires a turntable and a comparison antenna at distance — not usually done at the amateur level, but if done, the figure-8 shape and depth of the nulls will be slightly degraded by nearby metal objects compared to the model’s clean prediction.

14. Bench-validation — comparing model to NanoVNA sweep

The model is a prediction. The bench measurement is the truth. The closed-loop workflow is to compare them at every build and to feed the deltas back into the model so the next prediction is better. Vol 24 (NanoVNA Deep Dive) covers the measurement side in full; this section is about the comparison.

The comparison workflow. After building the antenna, sweep it with the NanoVNA in S11 mode at 401 points across ±10% of the design frequency. Export the .s1p touchstone file. In 4nec2 or EZNEC, run the model at the same frequency points and export the modeled impedance as a comparable .s1p file (4nec2’s CSV export converts directly; EZNEC has a touchstone export option). Plot both on the same axes — magnitude and phase of S11, or R and X of impedance, or SWR. The overlay tells the story immediately.

Typical discrepancies and their root causes:

Observed deltaProbable cause
Measured resonance 1-3% LOWER than modeledConstruction effects (capacitive end-loading from insulator hardware, finite feedpoint extent vs point source, environmental coupling pulling resonance down). The “trim wire” delta — cut slightly short, lengthen if needed.
Measured resonance 1-3% HIGHER than modeledWire shrinkage (less common but happens with copper-clad steel), or modeling with a too-low velocity factor. Less common; often indicates a modeling error.
Measured R is 10-30 Ω HIGHER than modeledGround losses higher than modeled (try a worse soil in the model: ε_r=8, σ=0.002 for “drier than expected”). Or radial-system losses for a vertical (model with finite radials, not perfect ground). Or feedline radiation adding apparent loss.
Measured R is LOWER than modeledUnusual. Sometimes indicates a near-field coupling to nearby metal that’s actually increasing the radiation resistance (a parasitic effect that helps efficiency by accident).
Measured X is significantly different from modeledCommon-mode coupling from feedline (add a 1:1 current choke (Vol 16) and re-measure). Or environmental coupling. Or LD-card values wrong (for loaded antennas).
Measured SWR bandwidth NARROWER than modeledHigher Q than modeled — usually means the modeled losses were optimistic. Update the model with more loss.
Measured SWR bandwidth WIDER than modeledLower Q than modeled — environmental losses are reducing system Q. May not be a problem (wider bandwidth is often desirable).
Measured pattern (if you can measure it) shows extra lobes or filled-in nullsEnvironmental scatterers (buildings, antenna farm neighbors), or feedline radiation. The model’s clean pattern is the ideal; the real-world pattern is what you get.

The 1-3% frequency-shift “trim wire” delta is universal. A 20 m dipole modeled to resonate at 14.200 MHz, built precisely to the modeled dimensions, will typically measure 14.350-14.500 MHz at resonance — about 1-2% high. This is because the model treats the feedpoint as a dimensionless source and assumes ideal end-effects, while the real antenna has insulator hardware adding capacitance and a finite feedpoint physical extent. The “trim wire” workflow is to deliberately cut the wire ≈ 2-3% long, build the antenna, sweep with NanoVNA, then trim 1-2 cm at a time from each end (keeping the antenna balanced) until the SWR minimum lands on the desired frequency. The model gives you the right starting length; the bench gets you the final length.

Iterating the model. Once you’ve identified the source of a delta — say, the model assumed Sommerfeld real ground with ε_r=13 and σ=0.005, and you measured the antenna over what turned out to be drier soil (probably ε_r=8, σ=0.002) — update the model parameters and re-run. The next build should agree more closely with the next prediction. Over a few build-measure-update cycles for the same antenna farm, the modeler converges on an accurate site-specific ground model that produces predictions within 0.5% for resonance and ±5 Ω for impedance. That is the goal of bench validation: not just “did the antenna work” but “do I now have a more accurate model of my site that improves the next prediction.”

The “verification before completion” principle. A working antenna is one where the bench measurement matches the model prediction within expected tolerance. An antenna that “kind of works” but is wildly different from the model is hiding a problem — common-mode current, environmental coupling, a construction error, a soil assumption that’s wrong. Track down the difference before accepting the antenna as ready for service. The bench-vs-model comparison is the most efficient diagnostic tool in antenna work; if you skip it, you’ll be debugging on the air later instead.


15. Common gotchas and myths

“NEC always gets it right.” False two ways. First, NEC assumes ideal materials and clean environments — real installations have higher ground losses, mast detuning, feedline radiation, nearby-metal couplings, weather-dependent ground conductivity. Second, NEC has known limitations even on the ideal case: stepped-radius junctions (NEC-2 mishandles, NEC-4 fixes), tightly-bent geometries (basis-function overlap breaks down), insulated wires near ground (NEC-4 strength). The model is a sketch with quantifiable error bars; treating it as ground truth is the most common amateur modeling mistake.

“If the model says it works, the antenna works.” Partial truth. Modeled antennas usually work better than reality by 1-2 dB gain, 1-3% frequency, ±20% bandwidth. A model predicting “5 dBi at 14.200 MHz, SWR<1.5:1 across the band” usually delivers 3.5-4.5 dBi at 14.350 MHz with SWR<2:1 — acceptable, but the delta is expected and is not a sign the model lied.

“EZNEC is dead, don’t use it.” Misleading. Roy retired in 2024 and stopped sales, but installations work indefinitely (no online activation, no cloud-tether), and the published amateur literature full of EZNEC plots remains valid because the NEC-2 engine underneath hasn’t changed. New users: 4nec2 (free + GA optimizer). Existing EZNEC users: not stuck.

“FDTD is always more accurate than NEC.” Wrong. For wire antennas in air or over generic ground, NEC-2 is both faster and equally accurate — the thin-wire MoM approximation NEC was built for fits the geometry perfectly. FDTD’s accuracy advantage appears only with dielectric materials, arbitrary 3D structures, or strongly-coupled near-field. A 14 MHz dipole at 10 m height: NEC-2 in 50 ms with 0.1% accuracy; openEMS in 30 seconds with the same 0.1%.

“More segments = more accuracy.” Wrong past a point. Up to λ/10 per segment, more segments improve accuracy. Beyond that, NEC’s MoM accuracy ceiling is set by the basis-function approximation, not segment count — 21 → 101 segments on a 20 m dipole changes the result by <0.1% while slowing the run 30×. Cebik’s 20-50 per half-wave is the well-calibrated sweet spot.

“The optimizer will find the best antenna.” True only within the parameter ranges and objective function you specified. Bound element lengths to ±5% of seed when the true optimum is at +12% and the optimizer cheerfully returns the best ±5% result and calls it converged. Use “max gain at 144.1 MHz” as objective without mentioning SWR or F/B and it returns a high-gain antenna with terrible SWR and bad pattern. The optimizer needs human judgment about what to vary, what to constrain, and what to optimize for.

“I don’t need to validate — the design is published in the ARRL Antenna Book.” Wrong, dangerously so. Published designs assume specific construction (wire diameter, mounting height, ground conditions, hardware) your build won’t exactly match. Trim-wire deltas of 1-3% are universal; impedance shifts of 10-30 Ω from your specific ground are common; environmental coupling from your antenna farm is unpredictable until measured. Published designs are starting models, not substitutes for sweeping your actual antenna with NanoVNA (Vol 24).

“NEC handles ground losses correctly so I don’t need real radials.” False. NEC-4’s Sommerfeld assumes an infinite flat half-space — it gets the pattern over that idealized ground but doesn’t simulate the radial system that makes the ground behave more like that ideal. A vertical over NEC-modeled Sommerfeld with no radials gives an optimistic prediction; the real vertical without radials has 50-100 Ω feedpoint (vs modeled 35 Ω) and 2-4 dB less gain because ground currents flow through high-loss soil. Model a small finite-radial set explicitly (NEC-4 strength) or de-rate the prediction. The radial system in Vol 20 (grounding) bridges the gap.


16. Resources

Original NEC documentation:

  • Burke, G.J. and Poggio, A.J., Numerical Electromagnetics Code (NEC) - Method of Moments, Lawrence Livermore National Laboratory Technical Report UCID-18834, January 1981. The canonical NEC-2 reference; covers the algorithm, the input deck format, and the implementation. Archived as PDF at multiple ham-radio sites; the LLNL original is in the LLNL Technical Information Department archive.
  • Burke, G.J., Numerical Electromagnetics Code - NEC-4: Method of Moments, Lawrence Livermore National Laboratory Report UCRL-MA-109338, January 1992. The NEC-4 documentation; access via LLNL Industrial Partnerships Office along with the runtime license.

Free amateur modelers:

  • 4nec2 (Arie Voors, Windows + Wine): https://www.qsl.net/4nec2/. Free, NEC-2 + NEC-4 + NEC-4D engine support, full GA optimizer. The default recommendation for new amateur modelers in 2026.
  • MMANA-GAL (Alexander Schewelew DL1PBD, Windows + Wine): http://gal-ana.de/basicmm/en/. Free Basic version, paid Pro version. MININEC-derivative engine. Strong for Yagi optimization, smaller user base than 4nec2.
  • xnec2c (Neoklis Kyriazis): an open-source NEC-2 GUI for Linux/X11. Available in most Linux distribution repositories. Native Linux alternative to running 4nec2 under Wine, but with fewer features.
  • NEC2++ (Tim Molteno): an open-source C++ port of NEC-2 with a command-line interface. Useful for batch processing and for scripting NEC into a larger workflow (e.g., Python-driven optimization). https://github.com/tmolteno/necpp

Commercial amateur modelers:

  • EZNEC (Roy Lewallen W7EL, Windows): https://www.eznec.com. Retired from new sales 2024; existing installations function indefinitely. Used licenses on QRZ swap and similar at $50-200 typically. The de-facto standard in amateur publications through the 2010s.

FDTD and commercial CAE:

Books:

  • ARRL Antenna Book, 25th edition (or latest). Chapter 8 covers antenna modeling. Most pattern figures in later chapters are EZNEC or 4nec2 plots — useful to read the prose alongside the visual representation of the model output.
  • Balanis, Antenna Theory: Analysis and Design, 4th ed. The academic reference for antenna theory; gives the mathematical foundations that make NEC’s outputs interpretable.
  • Stutzman & Thiele, Antenna Theory and Design, 3rd ed. Alternative academic reference with strong treatment of arrays and ground effects.

The Cebik papers (L.B. Cebik W4RNL, 1942-2008). Cebik wrote roughly 150 long-form tutorial articles on antenna modeling published in antenneX magazine and on his personal site through the 1990s and 2000s — the canonical amateur modeling literature. He was the dean of the field for a generation of modelers and authored the segmentation rules of thumb, the feedpoint-placement guidance, and the cross-platform comparison studies that are still cited today. The original antenneX archive was closed when the magazine ended publication. Cebik’s personal site (https://www.cebik.com) is in a partial-archive state since his passing; mirrors of the article collection are maintained at https://on5au.be/Cebik/cebik.html (BE) and several other amateur-archive sites. The papers most worth reading first: “Antenna Modeling and the Modeler’s Mind” (philosophy and methodology), “Some Notes on Segmentation” (the practical rules), “Modeling a Practical Antenna” (worked example for a 40m dipole installation), and the “Yagi Notes” series (essentially a textbook on Yagi optimization).

Community resources:

  • The 4nec2 user mailing list / web forum at https://groups.io/g/nec-list/.
  • The EZNEC user group at https://groups.io/g/EZNEC/, still active post-retirement.
  • The MMANA-GAL user community through the program’s site forums.
  • The eHam.net antenna modeling forum (slow but occasionally useful).

Cross-references to other volumes in this deep dive: