Skip to main content

Software to run antenna simulations, for parameter studies and optimizations.

Project description

Antenna simulation driver and optimizer

What?

This is a way of running the NEC2 antenna simulation nec2++. You need to install that yourself. See to it that the pull request 82 is on board, otherwiese, this won't work. Finally, see to it that the nec2++ executable can be called, that is, is reachable via PATH.

What not?

There is a Python binding for nec2++. I tried to get that to work, but failed. If that stuff works for you, you probably don't need this.

So this is a pedestrian approach: Run nec2++ in a separate process and communicate with that process via stdin/stdout.

Why?

  • Parameter studies. Which terrible things happen if you make your antenna shorter and shorter, or lower and lower, or whatever.
  • Optimization. Put this project and an appropriate scipy optimization algorithm into a tumbler and stir well. Voila: A best antenna!

How?

The antenna_simulation_driver package is your entry point. You need to feed it with a string that contains the content you would usually put into a .nec file.

The problem: That format is neither documented here nor in the context of the nec2pp project. The NEC software traces its origin to the 1970s, when punched (paper) cards were commonplace. The original input format for NEC2 software was defined in terms of such puched cards. Old printed documentation of the day has been OCR'ed, manually polished, and is now available at www.nec2.org. In particular, the NEC-2 manual (converted from paper September 1996) is a good reference.

Today's nec2 implementations still read that stuff, even though they are no longer as picky about column numbers as the old code used to be.

If you got your cards that you want to put into the simulation as a Python string, and used an RP card to actually start the simulation process somewhere in there, then my method run_nec2pp of package antenna_simulation_driver will run the simulation for you and give you a Nec2ppOutput object back (defined in package nec2pp_output_parser) that is a big bucket containing information about the simulation run's result.

There is a showcase of how to actually use this stuff to do parameter studies. It also has a few examples of useful card input to get you started. This showcase is publicized via my personal block at https://dj3ei.famsik.de/blog/antennas/antenna_simulation_driver_showcase.

Limitations

  • The output parser has just started to catch information about the antenna's gain diagram and radiation diagram. This is preliminary, largely untested, and may change depending on whether I like it or don't.

  • One frequency, one call to nec2pp_driver. Don't yet specify more than one frequency in your FR card.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

antenna_simulation_driver-0.1.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

antenna_simulation_driver-0.1.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file antenna_simulation_driver-0.1.2.tar.gz.

File metadata

File hashes

Hashes for antenna_simulation_driver-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4f97f108ca588942df3973734228c025e231a35e04c740f62ad4722023c1297b
MD5 d8d731298fdf63045fdfd91328ac68eb
BLAKE2b-256 85005d2438b3ed1cc4e59f1ae017c629258979603f66c3d3df1ebc4ae00307a8

See more details on using hashes here.

File details

Details for the file antenna_simulation_driver-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for antenna_simulation_driver-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1619484096a40a0c46e5793b16ec4bb16c6fcac0257f0a6f9366dc57d1551db7
MD5 c439c4c1893b0d2f704cba1d3ae127bf
BLAKE2b-256 5b5e354db7111eed35c98aaac4c8234efe2124eb7020a06185f1eccbe0927261

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page