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 antenna_simulation_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.3.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.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for antenna_simulation_driver-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fd3cda8c2cc8654def4b8c2130814dda310229790cae9a89ecddb31bf965e3c5
MD5 60c0c4e75c887ebcd2abda6c9320c803
BLAKE2b-256 502d9fbe37c46c7b1a643f5524539c92925f9adfcfe04c9366927ce22584cf72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for antenna_simulation_driver-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d0611d20350d34e3012e821ca05e98f6dcd8deb8fd626f565f3696a78104d684
MD5 e7d67fc8ee5df2cacaf43024cd165e36
BLAKE2b-256 e1b214a397ad5fb580622473becec37798fb6c7495d8fcf28469676ece53c0b5

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