How do you model wire antennas with NEC and 4nec2?
The Numerical Electromagnetics Code (NEC) is a method-of-moments program for thin-wire antennas developed at Lawrence Livermore National Laboratory; the public-domain NEC-2 was documented by Burke and Poggio in 1981.[1] 4nec2 is a free Windows front end that wraps NEC-2 (and NEC-4 where licensed) with geometry editing, pattern plots, sweeps and an optimizer, widely used for Yagis, verticals, loops and arrays.[2]
What segmentation rules apply?
Segments should typically be no longer than about λ/10, with λ/20 or finer near feeds and sharp bends; segment length should be large compared with wire radius for the thin-wire kernel (NEC’s extended kernel relaxes this); connected wires should have similar segment lengths at junctions; and wires should not overlap or intersect except at segment ends.[1]
How does NEC model ground?
Options include free space, perfect ground via images, a reflection-coefficient approximation for real ground, and the more accurate Sommerfeld–Norton method for antennas close to lossy ground. NEC-2 cannot model wires buried in ground; NEC-4 can.[1]
What can NEC not do well?
Dielectric-loaded structures, printed antennas on substrates and closely spaced wires of different radii push it beyond its assumptions. For such structures, use openEMS or a 3D solver. The average gain test (AGT), in which a lossless model in free space should give an average gain of 1 (0 dB), is a useful check of model validity.[1][2]
Frequently asked questions
Is NEC-2 free?
Yes; NEC-2 is in the public domain. NEC-4 is licensed separately.
What is the average gain test?
For a lossless model, integrated average gain should be 1; deviations reveal modeling errors.
Can NEC optimize a Yagi?
Yes; 4nec2 includes optimizers for gain, F/B and SWR.
See also
References
Online sources accessed October 21, 2026; printed works cited by edition. See all sources.
- “Numerical Electromagnetics Code (NEC) — Method of Moments, Tech. Rep. UCID-18834”. G. J. Burke and A. J. Poggio, Lawrence Livermore Laboratory. January 1981.
- “4nec2: NEC-2/NEC-4 based antenna modeling and optimizing tool for Windows”. A. Voors. freeware.