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 nec2pp_driver 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 yourFRcard.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file antenna_simulation_driver-0.1.1.tar.gz.
File metadata
- Download URL: antenna_simulation_driver-0.1.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d62cec6517e0fd1c6f5b152721f11b29bfe92c5c3f7a77b3682ccd1dabd0ee24
|
|
| MD5 |
683bd72065bf6335bccec94e7f6998b3
|
|
| BLAKE2b-256 |
44bb34e68d40297dde26ff2d0a479a4b48f01a961b3cf908a2eb501433b54254
|
File details
Details for the file antenna_simulation_driver-0.1.1-py3-none-any.whl.
File metadata
- Download URL: antenna_simulation_driver-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1331b6d65acaf1c84df208012126a9a060ffab7fe1cc732c30a38736205e718b
|
|
| MD5 |
d8a6a8c03089309f238707edfaa59b48
|
|
| BLAKE2b-256 |
4ff0418f77ae4e8f4af158aaef4227ad9e4ecd4905ccea06cdd5103baf96d5c7
|