NEC2++ is a C++ rewrite of the Numerical Electromagnetics Code (NEC-2) with many new features like automatic error detection when you specify the structure incorrectly and much faster execution. Nec2++ can analyse radiating as well as scattering properties of structures. The simulation engine in Nec2++ is compiled into a library for easy integra…
Switch branches/tags
Nothing to show
Clone or download
Failed to load latest commit information.
Ruby Fixed up paths to be consistent between the README and the a… May 3, 2015
antlr Add position independent code, and depend on nec_results.cpp Aug 27, 2017
debian Added debian package files Mar 29, 2012
docs Updated docs Mar 30, 2015
example Added example using traditional cards Aug 22, 2017
python Removed old .gitignore Aug 28, 2017
src Update to build using more recent versions of clapack.h Nov 5, 2017
templates Import codebase from alioth Mar 22, 2012
testharness Changed TIM, TST to READ to allow compilation on gfortran Apr 26, 2018
win32/nec2++ Update nec2++.vcxproj Dec 28, 2015
.gitignore Ignore test harness output files May 5, 2015
AUTHORS Updated some authors work, as well as TODO May 23, 2015 Add diagnostic pragmas to remove warnings in Eigen Aug 28, 2017
COPYING Import codebase from alioth Mar 22, 2012
Doxyfile Version bump and new accessors for getting bits of a radiation pattern May 8, 2015 Update readme for better install instructions Aug 28, 2017 Removed old files May 23, 2015
Makefile.git osx: use glibtoolize Oct 4, 2014
NEWS Added basic error handling to C-interface. Bump to version 1.6 Mar 4, 2015 Added link to Java-based GUI by Incgomz Oct 12, 2017 Updated some authors work, as well as TODO May 23, 2015 Version bump Aug 22, 2017
makefile.dist Import codebase from alioth Mar 22, 2012
nec2++-9999.ebuild Create nec2++-9999.ebuild Sep 10, 2013
nec2++.1 Remove unused second parameter to geometry_complete(). Closes Issue #19 May 10, 2015
nec2diff.1 Improved documentation structure Mar 9, 2015 Add support for pkg-config Mar 9, 2015

NEC2++ Numerical Electromagnetic Code in C++

This is a free (GPL) electromagnetic simulation software compatable with NEC-2. It has been rewritten from the ground up.

Nec2++ consists of a library that can be called from C++, C, python and Ruby, and so it can incorporated into other projects like GUI tools and automatic antenna optimization systems.

There is also an executable necpp that can read antenna description files (like the original). Nec2++ is developed on Debian linux, but will work on a variety of other operating systems.


  • NEC-2 syntax compatable.
  • C, C++, Python and Ruby libraries included. Ideal for antenna optimization.
  • Large designs can be simulated with tens of thousands of elements (to the limit of 64-bit address space)
  • Geometry error detection. Throws exceptions if wires intersect or lie too close to one another.
  • Simulate in different media (for example antennas in seawater) by modifying the dielectric properties.
  • Uses fast numerical routines (BLAS and LAPACK). Can use the Intel MKL or OpenBLAS.

Citing NEC2++

If you use nec2++, please cite it as follows:

Timothy C.A. Molteno, ''NEC2++: An NEC-2 compatible Numerical Electromagnetics Code'', Electronics Technical Reports No. 2014-3, ISSN 1172-496X, October 2014.


Online documentation built form the source code is available at A guide to using nec2++ from python.


Instructions are in the file