Failure to simulate ...

Failure to simulate ...

Author: Onno (VK6FLAB) November 18, 2023 Duration: 6:17
Foundations of Amateur Radio

During the week I started a new project. If you know me at all, this is not unusual. Having worked in the IT industry for nearly 40 years it's also not unusual that projects have a way of surprising you and this project was no different.

Recently I've been talking about antennas, a topic close to the heart of many amateurs and one that garners a lot of opinion and in my experience, much less in the way of facts, so being a firm believer of facts, I set out to add some of those to the discussion.

After having described that the environment is not often discussed in the context of antenna behaviour, coupled with the personal experience that it has by far the biggest influence, I set out to discover if I could use my computing skills to simulate this problem to build a picture that would speak a thousand words. Prompted by a friend who shared with me a link to an opinion that stated that dipole antennas didn't have 2.15 dBi gain, but in fact, apparently, had 8.5 dBi gain, I was energised to find out where this number came from.

I figured I'd spin up some antenna modelling software, use a standard model of a dipole, then simulate it at various heights above the ground and see what I could learn. Any good journey starts with a single step, so I started with looking for a generic model of a dipole antenna. I've played in this space before, so I was familiar with the fact that most, but not all, antenna modelling tools use a piece of software called NEC2 to do the actual calculations. Its models are described using text files ending in the .NEC extension. This software goes back to punch card days, so the format for the NEC2 files is essentially a stack of punch cards, so much so that every line in the text file is called a card and any software that uses the underlying NEC2 tool describes it in that way.

I won't bore you with the syntax, it's, let's put it this way. If you've been around computers for as long as I have, you're familiar with a tool called "sendmail", which is known to be user-friendly, just very particular with whom it makes friends. The NEC2 card format is much the same. It's not that surprising, and for added nostalgia, NEC2 was written in FORTRAN, originally in 1981 at the Lawrence Livermore Labs by Jerry Burke and Andrew Poggio. It was later released to the public. There's translations to C and C++, but they use the same notion of cards, so no magic progress there.

I started learning the syntax, and eventually came across a text-book with an example of cards that describe a dipole. Mind you, there were plenty of disclaimers around how poorly the ground was simulated and wouldn't you know it, the file format uses meters as the dimension, rather than wavelengths, so as far as I can tell, you can't simulate a quarter wave antenna, you have to simulate one of a specific length, so much for using a standard model of a dipole.

I found a tool that uses Python to issue NEC2 commands and as a surprise to nobody, it too uses cards. I used it to discover that for a particular type of ground, at some unknown height, the optimum length for a 10m WSPR dipole antenna is 5,225.87 millimetres long, apparently. You know it's true, it says so right there on the screen. I'm skipping over having to compile the software that was supposed to be a ready made Python library, but I digress.

There was a tool, written in TCL, that visualised NEC2 output, last updated 18 or so years ago and I unsuccessfully tried to make it work. Then there were those who suggested to fire up some random Windows tool on my Linux box, but as far as I can tell, I'd have to do the height adjustments manually, not ideal if you want to visualise from say, ground to geostationary orbit, one millimetre at a time and output an image at every step.

I searched the net for others who would surely have trodden this path long before I came along, only to discover that my search-fu is clearly broken, or any website with promising information has long ago been booted off the Internet, leaving "For Sale" signs on the domain name.

I came across one file which simulated a dipole in free space. It had, to use the NEC2 terms, 11 cards. When I run that through "nec2c", it generates a 12 megabyte file with over 104-thousand lines of output. Only takes 650 milliseconds to generate. If only I could visualise it.

I also came across a whole range of physics programs, which is not that surprising, since essentially antenna design is physics, but those tools require that I start learning a whole new way of building antennas, apparently from electrons, preferably whilst getting a degree in physics with a specialisation in computational electromagnetics. Then there was the Wolfram Alpha notebook model for a simple dipole, only 3,200 lines of code, so, you know, trivial to use.

So, here's the thing. Has nobody in living memory simulated a dipole at more than three heights and documented the process? Am I really the first human on the planet to think of this?

Oh, yes, I did find a project that simulated different lengths of dipoles, but I'll leave those for another day. And finally, I also found "xnecview", which does generate images, but it too is very particular whom it makes friends with and I've yet to discover if it can generate what I'm looking for.

As for the 8.5 dBi, I'm still looking. My current best guess is that at some specific height a dipole has an ugly spike that has 8.5 dBi gain and that someone used that number without looking at the detail, but, who knows, there's plenty of opinion to go around.

I'm Onno VK6FLAB


For anyone curious about the crackle of a distant voice emerging from the static or the thrill of making a contact across the globe using nothing but radio waves, Foundations of Amateur Radio offers a friendly, steady guide. Hosted by Onno (VK6FLAB) from Australia, this long-running podcast acts as a companion for newcomers navigating the initial, often overwhelming, steps into this vast hobby. Each episode deliberately unpacks a single facet of amateur radio, breaking down technical concepts, equipment, and operating practices into digestible pieces. You'll hear practical advice on how to get started, find your place within the global community, and discover which of the hobby's countless avenues-from building antennas to satellite communication or emergency service-might spark your passion. It’s not about dry theory; it’s about demystifying the process and sharing the genuine rewards that keep enthusiasts engaged for a lifetime. Having evolved from its earlier incarnation in 2011, this podcast builds from the ground up, week by week, creating a solid resource that grows with you. Tune in for a down-to-earth conversation that makes the airwaves feel a little more accessible and a lot more inviting.
Author: Language: English Episodes: 579

Foundations of Amateur Radio
Podcast Episodes
What's in an S-unit? [not-audio_url] [/not-audio_url]

Duration: 10:43
Foundations of Amateur Radio The other day fellow amateur Randall VK6WR raised an interesting question. Using his HP 8920A RF Communications Test Set, which you might recall from our adventures in measuring radio harmoni…
Where is the spark .. gap? [not-audio_url] [/not-audio_url]

Duration: 8:35
Foundations of Amateur Radio The thing I love most about this amazing hobby of amateur radio is the sheer size of the community and the depth of knowledge that comes with it. Case in point, the other day I mentioned the…
Bald Yak 18: Everything Everywhere All at Once? [not-audio_url] [/not-audio_url]

Duration: 7:02
Foundations of Amateur Radio The other day I was playing around with RDS, or Radio Data System, it's a digital signal that's often embedded in a commercial broadcast FM transmission. Among other things it contains inform…
Bald Yak 17: Adventures in Radio Data Systems [not-audio_url] [/not-audio_url]

Duration: 5:01
Foundations of Amateur Radio While spending some quality time discovering what I don't know about GNU Radio, I explored the notion of attempting to at least understand a little more about how an FM signal works. Dependin…
Bald Yak 16: How do you decode FM? [not-audio_url] [/not-audio_url]

Duration: 6:51
Foundations of Amateur Radio How do you make a hole? That's a pretty straightforward kind of question, and by the time this sentence is finished, there's going to be at least as many answers as people who considered it.…
One step forward ... three steps back. [not-audio_url] [/not-audio_url]

Duration: 5:38
Foundations of Amateur Radio Still excited from my minor victory in discovering a missing puzzle piece associated with the project I'm working on, I spent the past week introducing my head, if not literally, at least fig…
Bald Yak 15, Playing with Radio .. now with software [not-audio_url] [/not-audio_url]

Duration: 6:48
Foundations of Amateur Radio A little while ago I discussed a lovely article by programmer, artist, and game designer "blinry" called "Fifty Things you can do with a Software Defined Radio". This week it occurred to me t…
How to go about documenting your setup? [not-audio_url] [/not-audio_url]

Duration: 5:22
Foundations of Amateur Radio How to go about documenting your setup? Possibly the single most important thing that separates science from "fiddling around" is documentation. Figuring out how to document things is often n…
Transmitting into a dummy load .. for a year .. on purpose. [not-audio_url] [/not-audio_url]

Duration: 8:34
Foundations of Amateur Radio Just under a year ago I started an experiment. I set-up a beacon for WSPR, or Weak Signal Propagation Reporter, transmitting at 200 mW into a dummy load using eight bands between 80m and 10m.…
How to become a radio amateur today? [not-audio_url] [/not-audio_url]

Duration: 6:02
Foundations of Amateur Radio The other day a fellow amateur revealed that they qualified for membership of the QWCA, the Quarter Century Wireless Association .. twice over .. there may have been some innocent whistling i…