.. title: Mininec Resonant Frequency
.. slug: 31
.. date: 2026-03-31 12:15
.. tags: documentation,english,howto,hamradio,antenna modeling
.. description:
.. wp-status: publish
.. has_math: true

.. |--|  unicode:: U+2013  .. en dash
.. |ohm| unicode:: U+02126 .. Omega
   :trim:
.. |_| unicode:: U+00A0 .. Non-breaking space
   :trim:
.. |mho| unicode:: U+2127 .. upside-down Omega

For my antenna modeling code pymininec_ (which is a Python
re-implementation of the original Mininec_ Basic-code) I was researching
why the resonant frequency computed by Mininec_ is always a little too
high (so the real resonant frequency is slightly lower than simulated
and to get the correct higher resonance frequency, wires need to be cut
a little shorter than simulated by Mininec_).

This means that when we compute the resonant *length* for a given
frequency, Mininec_ will compute a slightly longer wire length at
resonance than `NEC-2`_.

From the Mininec_ report [LR86]_ we know that Mininec_ breaks wires into
segments (well in fact the user needs to specify the number of segments
to use) and calls the points between adjacent segments *pulses*. It
computes the current at each pulse and determines the resulting antenna
pattern from these currents. Since there is no pulse at the end of a
wire (unless another wire is connected at this point) the simulation
leaves out half a segment length at the end of each unconnected wire.

.. TEASER_END

This means that for a dipole at each end Mininec_ leaves out half a
segment and the resulting resonant frequency is a little too high due to
the shorter length.

So the hypothesis is that when we use shorter segments *at the end of a
wire* we should get a lower resonant frequency |--| or equivalently |--|
a shorter resonant length when the frequency is fixed.

To test this hypothesis, I've plotted the resonant length of dipole
against the number of segments used in the simulation for both, `NEC-2`_ and
pymininec_. In addition I'm using length-tapering, i.e. I'm using short
segments at the end of the wire while using longer segments at the
center of the dipole. Segment lengths are tapered by a factor of two for
each increase in wire length up to a maximum of
:math:`\lambda/20` for the segment length. This length-tapering
mechanism is a builtin feature in pymininec_. The *minimum* segment
length was set to :math:`\lambda/400`.

It can be seen that the orange pymininec_ curve (labelled *Mininec
length*) converges slowly to the blue *NEC-length*-curve (as segments are
getting shorter) but that around 16 segments the green line labelled
*Mininec T1 length* with pymininec_ end-tapered segment lengths already
converged nearly to the `NEC-2`_ value.

There are two traces not shown by default which can be shown by clicking
into the legend on the right side.
The grey curve labelled *Ballanis 2016* is an estimate of the resonant
dipole length from an antenna book by C. Balanis [Bal16]_. The red line
labelled *Mininec T2 length* is another length-tapered version computed
by mininec, but this time the short segments are in the middle of the
dipole (at the feedpoint) and the longer segments at the wire ends.

Even for very short segment length (:math:`10^{-5}\lambda`, not shown)
the pymininec_ length-tapered curve stays close to the `NEC-2`_ curve
even though the thin-wire asumption is violated (the segments are
thicker than long for this short segment length). It seems the Mininec_
algorithm can deal with very short segment lengths as long as those
segments belong to a single wire.

From this experiment it is clear that the Mininec_ algorithm
systematically models a shorter wire than specified by the user due to
ignoring the last half-segment at each wire end. I intend to experiment
with an artificially elongated segment at the end of each wire to see if
this systematic error can be eliminated.


.. iframe:: /content/2026/03/plotly/resonant-length.html
    :width:  800
    :height: 640

.. [LR86] J. C. Logan and J. W. Rockway. The new MININEC (version 3):
    A mini-numerical electromagnetic code. Technical Report NOSC TD 938,
    Naval Ocean Systems Center (NOSC), San Diego, California, September 1986.
    The original is ADA181682_,
    a `transcribed version`_ is available on github (better readability).
.. [Bal16] Constantine A. Balanis. Antenna Theory |--| Analysis and Design.
    John Wiley & Sons, fourth edition, 2016.

.. _pymininec: https://github.com/schlatterbeck/pymininec
.. _Mininec: https://github.com/schlatterbeck/MiniNec
.. _ADA181682: https://apps.dtic.mil/sti/pdfs/ADA181682.pdf
.. _`transcribed version`:
    https://github.com/schlatterbeck/mininec-3-doc/blob/master/mininec3.pdf
.. _`NEC-2`: https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code

