Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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…
C++ C FORTRAN Python Ruby GAP Other
Branch: master
Failed to load latest commit information.
Python Build update. New development occuring in the python-necpp repository
Ruby Fixed up paths to be consistent between the README and the build.sh a…
antlr Added inverted-v test antenna
debian Added debian package files
docs Updated docs
example Move to single parameter geometry_complete() function
python Moved to python-necpp repository
src Added parallel make. Closes #24
templates Import codebase from alioth
testharness Added 2D matrix for radiation pattern gain_
win32/nec2++ Added win32 bitrot fixes
.gitignore Ignore test harness output files
AUTHORS Updated some authors work, as well as TODO
CHANGELOG.md Added parallel make. Closes #24
COPYING Import codebase from alioth
Doxyfile Version bump and new accessors for getting bits of a radiation pattern
INSTALL.md Some more eigen enstructions. Use argc to print usage
Makefile.am Removed old files
Makefile.git osx: use glibtoolize
NEWS Added basic error handling to C-interface. Bump to version 1.6
README.md Added link to python howto
TODO.md Updated some authors work, as well as TODO
configure.ac Version bump and new accessors for getting bits of a radiation pattern
makefile.dist Import codebase from alioth
nec2++-9999.ebuild Create nec2++-9999.ebuild
nec2++.1 Remove unused second parameter to geometry_complete(). Closes Issue #19
nec2diff.1 Improved documentation structure
necpp.pc.in Add support for pkg-config

README.md

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.

Features

  • 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.

Documentation

Online documentation built form the source code is available at http://tmolteno.github.io/necpp/. A guide to using nec2++ from python.

Instructions for Linux

nec2++ is available precompiled as part of most modern linux distributions, including Debian, Ubuntu and Fedora.

sudo aptitude install necpp

Compiling on Linux

See the INSTALL file. But here is the short version

sudo aptitude install libatlas-base-dev
make -f Makefile.git
./configure
make
sudo make install

To build a debugging version use

./configure --with-bounds

!NOTE! nec2++ now requires LAPACK (unless you use the --without-lapack configure option)

Instructions for Compiling on Windows

Versions of nec2++ since 1.2.3 now compile fine with the MinGW (http://www.mingw.org/) free compiler tools. Just download the source distribution, and follow the unix installation guide (./configure and make).

Compiling with Visual Studio 2013

NEC2++ has been tested with Microsoft Visual Studio 2013. Step-by-step instructions

  • Build the project inside the win32 subdirectory with Visual Studio 2103.
Something went wrong with that request. Please try again.