<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Runtux Blog</title><link>https://blog.runtux.com/</link><description>Neues, Interessantes, Skurriles</description><atom:link href="https://blog.runtux.com/rss.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:rsc@runtux.com"&gt;Ralf Schlatterbeck&lt;/a&gt; </copyright><lastBuildDate>Tue, 31 Mar 2026 11:43:23 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Mininec Resonant Frequency</title><link>https://blog.runtux.com/posts/2026/31/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;For my antenna modeling code &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; (which is a Python
re-implementation of the original &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; Basic-code) I was researching
why the resonant frequency computed by &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; 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 &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This means that when we compute the resonant &lt;em&gt;length&lt;/em&gt; for a given
frequency, &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; will compute a slightly longer wire length at
resonance than &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From the &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; report &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2026/31/#lr86" id="citation-reference-1" role="doc-biblioref"&gt;[LR86]&lt;/a&gt; we know that &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; 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 &lt;em&gt;pulses&lt;/em&gt;. 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.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2026/31/"&gt;Read more…&lt;/a&gt; (3 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>antenna modeling</category><category>documentation</category><category>english</category><category>hamradio</category><category>howto</category><guid>https://blog.runtux.com/posts/2026/31/</guid><pubDate>Tue, 31 Mar 2026 10:15:00 GMT</pubDate></item><item><title>API Example pymininec, plot-antenna</title><link>https://blog.runtux.com/posts/2025/07/28/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div class="cell border-box-sizing text_cell rendered" id="cell-id=60a09f62"&gt;&lt;div class="prompt input_prompt"&gt;
&lt;/div&gt;&lt;div class="inner_cell"&gt;
&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;
&lt;p&gt;This is an example of using the API of &lt;a href="https://pypi.org/project/pymininec/"&gt;pymininec&lt;/a&gt; together with the API of &lt;a href="https://pypi.org/project/plot-antenna/"&gt;plot-antenna&lt;/a&gt;. So we're computing an antenna with &lt;a href="https://pypi.org/project/pymininec/"&gt;pymininec&lt;/a&gt; and then we display the antenna pattern, voltage standing wave ratio (VSWR), and antenna geometry using &lt;a href="https://pypi.org/project/pymininec/"&gt;plot-antenna&lt;/a&gt;. There is already a small &lt;a href="https://github.com/schlatterbeck/plot-antenna#plot-antenna-api"&gt;API description for plot-antenna&lt;/a&gt;, for pymininec we use the &lt;a href="https://github.com/schlatterbeck/pymininec/blob/master/mininec/mininec.py"&gt;main() function in mininec/mininec.py&lt;/a&gt; – which contains calls to the mininec API as an example. Note that the API uses features of the currently not-yet-released version of pymininec from github.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2025/07/28/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><category>documentation</category><category>english</category><category>hamradio</category><guid>https://blog.runtux.com/posts/2025/07/28/</guid><pubDate>Mon, 28 Jul 2025 15:00:00 GMT</pubDate></item><item><title>Water: A Multi-Objective Benchmark Problem</title><link>https://blog.runtux.com/posts/2025/06/15/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;This is a write-up that really should go into the documentation of
&lt;a class="reference external" href="https://github.com/schlatterbeck/pgapack"&gt;PGAPack&lt;/a&gt; but I was unable to include &lt;a class="reference external" href="https://plotly.com/"&gt;plotly&lt;/a&gt; graphics into a github
&lt;code class="docutils literal"&gt;README.rst&lt;/code&gt; file, even using the proxy-site &lt;code class="docutils literal"&gt;raw.githack.com&lt;/code&gt;
(which is a page that serves html and javascript files with the correct
content type so that it can be displayed in a web browser – github
choses to serve these files with content-type text/plain). Github
refuses to render an iframe inside  a github page.&lt;/p&gt;
&lt;p&gt;The "Water Resource Planning" problem &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/15/#rts01" id="citation-reference-1" role="doc-biblioref"&gt;[RTS01]&lt;/a&gt; is an engineering problem
that has been used as a benchmark for multi-objective optimization in
the literature including classical papers like the original article on
NSGA_II &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/15/#dpam02" id="citation-reference-2" role="doc-biblioref"&gt;[DPAM02]&lt;/a&gt;. The problem consists of seven constraints and a
five-dimensional objective function.&lt;/p&gt;
&lt;p&gt;I have used this for quite some time to test my NSGA-II implementation
in &lt;a class="reference external" href="https://github.com/schlatterbeck/pgapack"&gt;PGAPack&lt;/a&gt;. It is in the examples/nsgaii directory and can (after
compilation) be called with test-problem index &lt;code class="docutils literal"&gt;12&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;examples/nsgaii/optimize 12&lt;/pre&gt;
&lt;p&gt;The output of this program can also be found in the file&lt;/p&gt;
&lt;pre class="literal-block"&gt;test/nsgaii_optimize_12.data&lt;/pre&gt;
&lt;p&gt;For testing I'm shipping a script called &lt;code class="docutils literal"&gt;crowdingplot&lt;/code&gt; to plot
objectives in a multi-objective problem. It is in the same directory as
the code for the example.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2025/06/15/"&gt;Read more…&lt;/a&gt; (3 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>documentation</category><category>english</category><category>genetic algorithms</category><category>open source</category><category>optimization</category><guid>https://blog.runtux.com/posts/2025/06/15/</guid><pubDate>Sun, 15 Jun 2025 11:50:00 GMT</pubDate></item><item><title>Update on non-dominated sorting measurements</title><link>https://blog.runtux.com/posts/2025/06/14/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;This is an update on a previous post &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/14/#sch25" id="citation-reference-1" role="doc-biblioref"&gt;[Sch25]&lt;/a&gt; about a new implementation of
non-dominated sorting for &lt;a class="reference external" href="https://github.com/schlatterbeck/pgapack"&gt;PGAPack&lt;/a&gt;. Non-dominated sorting is a central
component of most multi-objective optimization implementations.&lt;/p&gt;
&lt;p&gt;In the recent post I did not mention how many generations my test ran.
The number of generations in the last and in the following tests was
200. In the last test the code was compiled without optimization. The
following measurements were made with &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;-O3&lt;/span&gt;&lt;/code&gt; the best optimization
&lt;a class="reference external" href="https://gcc.gnu.org/"&gt;gcc&lt;/a&gt; offers. I noticed that my implementation of the evaluation
function for the DTLZ-1 test &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/14/#dtlz05" id="citation-reference-2" role="doc-biblioref"&gt;[DTLZ05]&lt;/a&gt; is quadratic in the number of
objectives so I feared this would influence the tests. It turns out it
didn't, the overhead even for 20 objectives is still too low to be
noticeable.&lt;/p&gt;
&lt;p&gt;In addition to the first tests I'm now measuring – in addition to the
overall time – the time just for the non-dominated sorting. So in the
following we have two types of graphics, the ones where the title is
starting with "Overall" include the time of evaluation function and
whatever the algorithm is doing for bookkeeping. The ones starting with
"Non-dominated" just measure the time for the non-dominated sorting.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2025/06/14/"&gt;Read more…&lt;/a&gt; (7 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>documentation</category><category>english</category><category>genetic algorithms</category><category>open source</category><category>optimization</category><guid>https://blog.runtux.com/posts/2025/06/14/</guid><pubDate>Sat, 14 Jun 2025 08:30:00 GMT</pubDate></item><item><title>Non-dominated Sorting for Multi-Objective Optimization</title><link>https://blog.runtux.com/posts/2025/06/09/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;Some of you know that I'm maintaining &lt;a class="reference external" href="https://github.com/schlatterbeck/pgapack"&gt;PGApack&lt;/a&gt;, a genetic algorithm
package and a corresponding Python wrapper, &lt;a class="reference external" href="https://github.com/schlatterbeck/pgapy"&gt;PGApy&lt;/a&gt;. &lt;a class="reference external" href="https://github.com/schlatterbeck/pgapack"&gt;PGApack&lt;/a&gt; implements
multi-objective optimization using NSGA-II &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#dpam02" id="citation-reference-1" role="doc-biblioref"&gt;[DPAM02]&lt;/a&gt; and NSGA-III
&lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#dj14" id="citation-reference-2" role="doc-biblioref"&gt;[DJ14]&lt;/a&gt;, &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#jd14" id="citation-reference-3" role="doc-biblioref"&gt;[JD14]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Multi-objective optimization means that we have more than one objective
(or fitness-) function. Since typically these functions can contradict
each other – when a candidate solution becomes better in one objective
it might become worse in another objective – we need to establish what
&lt;em&gt;better&lt;/em&gt; means in the context of multi-objective optimization. An
individual &lt;span class="math"&gt;\(A\)&lt;/span&gt; is strictly better than another individual
&lt;span class="math"&gt;\(B\)&lt;/span&gt; – we say individual &lt;span class="math"&gt;\(A\)&lt;/span&gt; &lt;em&gt;dominates&lt;/em&gt; individual
&lt;span class="math"&gt;\(B\)&lt;/span&gt; – when &lt;span class="math"&gt;\(A\)&lt;/span&gt; is better or equal to &lt;span class="math"&gt;\(B\)&lt;/span&gt; in all
objectives and strictly better in at least one of them.&lt;/p&gt;
&lt;p&gt;Since we do not have a single fitness for individuals, multi-objective
algorithms typically establish a ranking of individuals by dominance.
Individuals which are not dominated by any other individual get
dominance rank 0. Then we remove all rank-0 individuals and all
individuals that are then non-dominated get rank 1 etc. This procedure
is typically called non-dominated ranking or non-dominated sorting.
This rank is then one of the components of the new fitness function.&lt;/p&gt;
&lt;p&gt;The NSGA-II paper &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#dpam02" id="citation-reference-4" role="doc-biblioref"&gt;[DPAM02]&lt;/a&gt; implements this by checking each individual
in a population against every other individual to see if one dominates
the other. Then it removes the current non-dominated individuals
one-by-one and establishes ranks as outlined above. This algorithm has a
run-time that grows quadratically with the number of individuals to
sort. In computer science we write this in the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Big_O_notation"&gt;big O notation&lt;/a&gt; as
&lt;span class="math"&gt;\(O(n^2)\)&lt;/span&gt; where &lt;span class="math"&gt;\(n\)&lt;/span&gt; is the number of individuals.&lt;/p&gt;
&lt;p&gt;In 2003 Jensen &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#jen03" id="citation-reference-5" role="doc-biblioref"&gt;[Jen03]&lt;/a&gt; published an algorithm that can perform the
dominance-ranking of all individuals with effort
&lt;span class="math"&gt;\(O\left(n\cdot(\log n)^{m-1}\right)\)&lt;/span&gt; where &lt;span class="math"&gt;\(m\)&lt;/span&gt; is the number
of objectives (and &lt;span class="math"&gt;\(n\)&lt;/span&gt; is the population size as before). Jensen's
algorithm was updated 10 years later because he had formulated his
algorithm in a way that could not handle individuals with the same
evaluation in one objective which he claimed was easy to remedy but was
not so easy for others &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#fgp13" id="citation-reference-6" role="doc-biblioref"&gt;[FGP13]&lt;/a&gt;. A year later a slight modification
was made to formally prove that the algorithm runtime complexity actually
fits the formula above &lt;a class="citation-reference" href="https://blog.runtux.com/posts/2025/06/09/#bs14" id="citation-reference-7" role="doc-biblioref"&gt;[BS14]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2025/06/09/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>documentation</category><category>english</category><category>genetic algorithms</category><category>open source</category><category>optimization</category><guid>https://blog.runtux.com/posts/2025/06/09/</guid><pubDate>Mon, 09 Jun 2025 19:00:00 GMT</pubDate></item><item><title>Dynamic DNS with Bind Stopped Working</title><link>https://blog.runtux.com/posts/2025/03/05/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;p&gt;In 2021 I set up a dynamic DNS server using the popular &lt;a class="reference external" href="https://www.isc.org/bind/"&gt;ISC bind&lt;/a&gt; DNS
server and documented my configuration in a blog article &lt;a class="brackets" href="https://blog.runtux.com/posts/2025/03/05/#footnote-1" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Recently (around the second half of the year 2024) the DNS updates
stopped working. In my configurations I was using the public key method
for signing DNS updates also known as SIG(0). This was long supported in
bind and is &lt;a class="reference external" href="https://bind9.readthedocs.io/en/latest/chapter7.html#sig-0"&gt;still documented to work&lt;/a&gt; – &lt;em&gt;in the latest version&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;All DNS update requests were suddenly denied with a &lt;code class="docutils literal"&gt;REFUSED&lt;/code&gt; status.
Even turning on debugging with the &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;-d&lt;/span&gt; 15&lt;/code&gt; option to &lt;code class="docutils literal"&gt;named&lt;/code&gt; I was
not able to get any further information, not even when logging to
standard output with &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;-g&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It turns out that the public key signatures using SIG(0) have been
disabled due to a denial of service attack vector documented in
&lt;a class="reference external" href="https://security-tracker.debian.org/tracker/CVE-2024-1975"&gt;CVE-2024-1975&lt;/a&gt;. DNS updates with shared &lt;a class="reference external" href="https://bind9.readthedocs.io/en/bind-9.18/chapter7.html#tsig"&gt;TSIG keys&lt;/a&gt; still work.
Unfortunately this seemed not documented and no appropriate log messages are
seen. I've made a &lt;a class="reference external" href="https://gitlab.isc.org/isc-projects/bind9/-/issues/5221"&gt;bug report&lt;/a&gt; for bind.&lt;/p&gt;
&lt;p&gt;As it turns out I would have to look at the documentation for the
version 9.18 shipped with Debian stable aka bookworm at the time of
this writing: It documents that &lt;a class="reference external" href="https://bind9.readthedocs.io/en/bind-9.18/chapter7.html#sig-0"&gt;SIG(0) has been removed&lt;/a&gt; due to
&lt;a class="reference external" href="https://security-tracker.debian.org/tracker/CVE-2024-1975"&gt;CVE-2024-1975&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It looks like &lt;em&gt;later&lt;/em&gt; versions of bind (e.g. version 9.20.6 and up)
again support SIG(0) but with a quota mechanism to prevent a
denial of service attack. But for prior versions it seems that the "fix"
involves completely disabling SIG(0).&lt;/p&gt;
&lt;aside class="footnote-list brackets"&gt;
&lt;aside class="footnote brackets" id="footnote-1" role="doc-footnote"&gt;
&lt;span class="label"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;&lt;a role="doc-backlink" href="https://blog.runtux.com/posts/2025/03/05/#footnote-reference-1"&gt;1&lt;/a&gt;&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;Ralf Schlatterbeck. &lt;a class="reference external" href="https://blog.runtux.com/posts/2021/01/08/"&gt;Dynamic DNS with the bind DNS server&lt;/a&gt;.
Blog post, Open Source Consulting, Jan 2021.&lt;/p&gt;
&lt;/aside&gt;
&lt;/aside&gt;</description><category>documentation</category><category>english</category><category>howto</category><category>open source</category><guid>https://blog.runtux.com/posts/2025/03/05/</guid><pubDate>Wed, 05 Mar 2025 18:00:00 GMT</pubDate></item><item><title>Modeling a Wire Antenna with Insulation</title><link>https://blog.runtux.com/posts/2024/09/17/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;[Update 2024-08-20: Correction of formula for L and equivalent radius]&lt;/p&gt;
&lt;p&gt;[Update 2024-09-19: Correction of citation of article by Stearns,
Supplement to Antenna Book &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-5" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;5&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;For my antenna modeling code &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; (which is a re-implementation of
the original &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; code in Basic) I was researching how to model
insulated wires. I had asked Roy Lewallen, W7EL, the author of &lt;a class="reference external" href="https://eznec.com/"&gt;EZNEC&lt;/a&gt;
what he is using in &lt;a class="reference external" href="https://eznec.com/"&gt;EZNEC&lt;/a&gt; and received a pointer to a paper by J. H.
Richmond &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-1" id="footnote-reference-2" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; which seems the first paper to propose an algorithm for
modeling insulated wires in an antenna and actually implementing it.
The algorithm was implemented by Jerry McCormack in his masters thesis
&lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-2" id="footnote-reference-3" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; and later incorporated into a contractor report &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-3" id="footnote-reference-4" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;3&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; (the
contractor report is almost identical with the thesis except for updated
Fortran code but has a different author). The original
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Fortran"&gt;Fortran&lt;/a&gt; code is not only listed in the reports but is still made
available by Ray L. Cross on his "Antenna Scatterers Analysis Program"
(&lt;a class="reference external" href="http://raylcross.net/asap/index.html"&gt;ASAP&lt;/a&gt;) page. The subroutine "DSHELL" implements the insulated wire
algorithm. With some modifications I was able to run this code today.
Many thanks go to Roy, W7EL for sending me this information.&lt;/p&gt;
&lt;p&gt;To test my implementation in &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; against real measured data, I
dug up a paper by David Lamensdorf &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-4" id="footnote-reference-5" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;4&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; where the effect of insulation
were actually measured. Since at the time the insulation could only be
modelled as an infinite cylinder, the experiment used insulation that
goes beyond the end of the wire until no more changes in the measured
parameters were observed.&lt;/p&gt;
&lt;p&gt;Experiments with the formulation by Richmond &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-1" id="footnote-reference-6" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; indicated that the
resulting impedance matrix is very ill-conditioned: For short wire
segments the formulation yields very large absolute values that are
added to the main diagonal of the impedance matrix and subtracted from
the second diagonals (the matrix is symmetric and the second diagonal is
the same for the lower and upper triangle). Since these large values are
subtracted during the matrix inversion this leads to &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Catastrophic_cancellation"&gt;Catastrophic
Cancellation&lt;/a&gt; and results that are dominated by cancellation effects.&lt;/p&gt;
&lt;p&gt;So I investigated further and found a paper &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-5" id="footnote-reference-7" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;5&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; and a presentation &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-6" id="footnote-reference-8" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;6&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt;
by Steve Stearns, K6OIK which gives distributed inductance and an
equivalent-radius formula for modeling insulation. His presentation also
has a great history of various approaches to modeling insulation with
programs that originally do not support it (like the original &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt;
and the original &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt;):&lt;/p&gt;
&lt;div class="math"&gt;
\begin{align*}
a_e &amp;amp;= a \left(\frac{b}{a}\right)^{\left(1-
    \frac{1}{\varepsilon_r}\right)} \\
L   &amp;amp;= \frac{\mu_0}{2\pi}\left(1-\frac{1}{\varepsilon_r}
  \right)\log\left(\frac{b}{a}\right) \\
\sigma_e &amp;amp;=
\sigma\left(\frac{a}{b}\right)^{2\left(1-\frac{1}{\varepsilon_r}\right)} \\
\end{align*}
&lt;/div&gt;
&lt;p&gt;where &lt;span class="math"&gt;\(a\)&lt;/span&gt; is the original radius of the wire, &lt;span class="math"&gt;\(b\)&lt;/span&gt; is the
radius of the wire &lt;em&gt;including insulation&lt;/em&gt;, &lt;span class="math"&gt;\(\sigma\)&lt;/span&gt; is the
conductivity of the wire, &lt;span class="math"&gt;\(\varepsilon_r\)&lt;/span&gt; is the relative dieelectric
constant of the insulation, &lt;span class="math"&gt;\(a_e\)&lt;/span&gt; is the equivalent radius and
&lt;span class="math"&gt;\(\sigma_e\)&lt;/span&gt; is the equivalent conductivity that is used for
removing the effect of the changed radius on the computation of the skin
effect loading of the wire. The inductance &lt;span class="math"&gt;\(L\)&lt;/span&gt; is the inductance
per length of the insulated wire (or wire segment).&lt;/p&gt;
&lt;p&gt;I then searched for a paper that would confirm the formulas by Steve
Stearns and found an even older paper by Tai Tsun Wu &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-7" id="footnote-reference-9" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;7&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; which has
exactly the formula for the equivalent radius &lt;span class="math"&gt;\(a_e\)&lt;/span&gt; and for the
distributed inductance &lt;span class="math"&gt;\(L\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The formula for the equivalent conductivity is just used to cancel the
effect of the equivalent radius on the computation of the skin effect
load. In a previous blog post &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/09/17/#footnote-8" id="footnote-reference-10" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;8&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; I had given the formula for the skin
effect load. In that formula, the conductivity &lt;span class="math"&gt;\(\sigma\)&lt;/span&gt; appears as
its reciprocal &lt;span class="math"&gt;\(\rho\)&lt;/span&gt;, the resistivity. The square root of
&lt;span class="math"&gt;\(\sigma\)&lt;/span&gt; is always used as a product with the radius. So we can
undo the equivalent radius correction by multiplying &lt;span class="math"&gt;\(\sigma\)&lt;/span&gt; with
the reciprocal of the equivalent radius factor. We get&lt;/p&gt;
&lt;div class="math"&gt;
\begin{align*}
\sqrt{\sigma}a &amp;amp;=
\sqrt{\sigma_e}a\left(\frac{b}{a}\right)^{\left
    (1-\frac{1}{\varepsilon_r}\right)} \\
\frac{\sigma_e}{\sigma} &amp;amp;=
\frac{1}{\left(\frac{b}{a}\right)^{2\left
    (1-\frac{1}{\varepsilon_r}\right)}}
    = \left(\frac{a}{b}\right)^{2\left(1-\frac{1}{\varepsilon_r}\right)} \\
\end{align*}
&lt;/div&gt;
&lt;p&gt;In &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; I don't need to correct the equivalent radius for the
skin effect computation, I can simply use the original radius there.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2024/09/17/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>antenna modeling</category><category>documentation</category><category>english</category><category>hamradio</category><category>howto</category><guid>https://blog.runtux.com/posts/2024/09/17/</guid><pubDate>Tue, 17 Sep 2024 13:45:00 GMT</pubDate></item><item><title>Plotting Antenna Pattern</title><link>https://blog.runtux.com/posts/2024/08/31/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;[Update 2025-12-04: Fix links in bibliography]&lt;/p&gt;
&lt;p&gt;I'm the author of an antenna plotting program called &lt;a class="reference external" href="https://github.com/schlatterbeck/plot-antenna"&gt;plot-antenna&lt;/a&gt;. It is
written in python and has graphics backends for both, &lt;a class="reference external" href="https://matplotlib.org/"&gt;matplotlib&lt;/a&gt; and
&lt;a class="reference external" href="https://github.com/plotly/plotly.py"&gt;plotly&lt;/a&gt;. As of this writing the &lt;a class="reference external" href="https://pypi.org/project/plot-antenna/"&gt;version available on pypi&lt;/a&gt; does not
yet support different frequency resolution for pattern and impedance plots.
The &lt;a class="reference external" href="https://matplotlib.org/"&gt;matplotlib&lt;/a&gt; backend is better when generating graphics for
use in printed documentation while the &lt;a class="reference external" href="https://github.com/plotly/plotly.py"&gt;plotly&lt;/a&gt; backend can generate
interactive graphics for the web. The documentation contains some
&lt;a class="reference external" href="https://matplotlib.org/"&gt;matplotlib&lt;/a&gt; examples, so I'm going into more detail here for the &lt;a class="reference external" href="https://github.com/plotly/plotly.py"&gt;plotly&lt;/a&gt;
backend.&lt;/p&gt;
&lt;p&gt;I've recently added support for the "Antenna Scatterers Analysis
Program" &lt;a class="reference external" href="http://raylcross.net/asap/index.html"&gt;ASAP&lt;/a&gt;, an antenna simulation program written before the
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Fortran"&gt;Fortran&lt;/a&gt;-77 Standard in 1974. It is still interesting today because it uses a
formulation for the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Method_of_moments_(electromagnetics)"&gt;Method of Moments&lt;/a&gt; &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/08/31/#footnote-1" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/08/31/#footnote-2" id="footnote-reference-2" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; that is different
from both, NEC &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/08/31/#footnote-3" id="footnote-reference-3" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;3&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; and &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/08/31/#footnote-4" id="footnote-reference-4" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;4&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt;. And it pioneered the simulation of
wire insulation when an antenna uses insulated elements.&lt;/p&gt;
&lt;p&gt;In the following I'm using a 3-Element Yagi-Uda antenna that is in the
&lt;a class="reference external" href="http://raylcross.net/asap/asapexam/yagi.html"&gt;Example Section&lt;/a&gt; of &lt;a class="reference external" href="http://raylcross.net/asap/index.html"&gt;ASAP&lt;/a&gt;. The &lt;a class="reference external" href="https://blog.runtux.com/content/2024/08/plotly/3-ele.asap"&gt;input file&lt;/a&gt; I'm using exports antenna
pattern for 280 MHz to 305 MHz in 5 MHz steps. In addition it exports
antenna impedance in 1 MHz steps.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2024/08/31/"&gt;Read more…&lt;/a&gt; (5 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>antenna modeling</category><category>documentation</category><category>english</category><category>hamradio</category><category>howto</category><guid>https://blog.runtux.com/posts/2024/08/31/</guid><pubDate>Sat, 31 Aug 2024 17:30:00 GMT</pubDate></item><item><title>Skin Effect Load Update</title><link>https://blog.runtux.com/posts/2024/07/28/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;In my last post &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-1" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; I was wondering why my implementation of &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Skin_effect"&gt;skin effect&lt;/a&gt;
load in &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; did not match the results we get from &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt;. Turns
out I was wrong in assuming that the skin effect load is purely
resistive, it has a large reactive component.&lt;/p&gt;
&lt;p&gt;Note: This article contains a lot of math. You may want to skip to the
end and check how the new implementation in &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; behaves compared
to may last article which used only a purely resistive load from the
skin effect resistivity.&lt;/p&gt;
&lt;p&gt;The english Wikipedia article on &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Skin_effect"&gt;skin effect&lt;/a&gt; &lt;em&gt;does&lt;/em&gt; have the correct
formula:&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
\newcommand{\Int}{{\mathrm\scriptscriptstyle int}}
\newcommand{\ber}{\mathop{\mathrm{ber}}\nolimits}
\newcommand{\bei}{\mathop{\mathrm{bei}}\nolimits}
\end{equation*}
&lt;/div&gt;
&lt;div class="math"&gt;
\begin{equation*}
Z_\Int = \frac{k\rho}{2\pi r}\frac{J_0 (kr)}{J_1 (kr)}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;where&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
k = \sqrt{\frac{-j\omega\mu}{\rho}}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;and &lt;span class="math"&gt;\(r\)&lt;/span&gt; is the wire radius, &lt;span class="math"&gt;\(J_v\)&lt;/span&gt; are the Bessel functions of
the first kind of order &lt;span class="math"&gt;\(v\)&lt;/span&gt;. &lt;span class="math"&gt;\(Z_\Int\)&lt;/span&gt; is the impedance &lt;em&gt;per
unit length&lt;/em&gt; of wire.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt; uses a different formulation &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-2" id="footnote-reference-2" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; (p.75):&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
Z_i = \frac{j\Delta_i}{a_i} \sqrt{\frac{\omega\mu}{2\pi\sigma}}
      \left[\frac{\ber (q) + j\bei (q)}
                  {\ber^\prime(q)+ j\bei^\prime(q)}\right]
\end{equation*}
&lt;/div&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
q = (\omega\mu\sigma)^{1/2} a_i
\end{equation*}
&lt;/div&gt;
&lt;p&gt;and &lt;span class="math"&gt;\(a_i\)&lt;/span&gt; the wire radius, &lt;span class="math"&gt;\(\Delta_i\)&lt;/span&gt; the length of the wire
segment, &lt;span class="math"&gt;\(\sigma\)&lt;/span&gt; the wire conductivity and &lt;span class="math"&gt;\(\ber\)&lt;/span&gt; and
&lt;span class="math"&gt;\(\bei\)&lt;/span&gt; the Kelvin functions. In the following we will use
&lt;span class="math"&gt;\(r\)&lt;/span&gt; for the wire radius, not &lt;span class="math"&gt;\(a_i\)&lt;/span&gt;. Note that
&lt;span class="math"&gt;\(\ber^\prime\)&lt;/span&gt; is the derivative of &lt;span class="math"&gt;\(\ber\)&lt;/span&gt;, we can also write
&lt;span class="math"&gt;\(\ber\)&lt;/span&gt; as &lt;span class="math"&gt;\(\ber_0\)&lt;/span&gt; (order 0) and &lt;span class="math"&gt;\(\ber^\prime\)&lt;/span&gt; as
&lt;span class="math"&gt;\(\ber_1\)&lt;/span&gt; (order 1) and similar for &lt;span class="math"&gt;\(\bei\)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;In the following I'll be a little bit sloppy about the usage of the
permeability of free space &lt;span class="math"&gt;\(\mu_0\)&lt;/span&gt; vs. the permeability of the
wire &lt;span class="math"&gt;\(\mu\)&lt;/span&gt;, for non-ferromagnetic wires these are really (almost)
the same: &lt;span class="math"&gt;\(\mu = \mu_r * \mu_0\)&lt;/span&gt; with &lt;span class="math"&gt;\(\mu_r\approx 1\)&lt;/span&gt; for
non-ferromagnetic material.&lt;/p&gt;
&lt;p&gt;The &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt; code, uses a Fortran function &lt;code class="docutils literal"&gt;ZINT&lt;/code&gt; which gets
two parameters, the conductivity multiplied by the wavelength
&lt;span class="math"&gt;\(\lambda\)&lt;/span&gt; (parameter &lt;code class="docutils literal"&gt;SIGL&lt;/code&gt;) and the radius divided by the
wavelength &lt;span class="math"&gt;\(\lambda\)&lt;/span&gt; (parameter &lt;code class="docutils literal"&gt;ROLAM&lt;/code&gt;). Apart from an
approximation of the Kelvin functions (the term computing the fraction
of the Kelvin functions is &lt;code class="docutils literal"&gt;BR1&lt;/code&gt;), &lt;code class="docutils literal"&gt;ZINT&lt;/code&gt; computes:&lt;/p&gt;
&lt;pre class="literal-block"&gt;X = SQRT (TPCMU * SIGL) * ROLAM
ZINT = FJ * SQRT (CMOTP / SIGL) * BR1 / ROLAM&lt;/pre&gt;
&lt;p&gt;with &lt;code class="docutils literal"&gt;TPCMU = 2368.705&lt;/code&gt;, &lt;code class="docutils literal"&gt;CMOTP=60.0&lt;/code&gt;, and &lt;code class="docutils literal"&gt;FJ&lt;/code&gt; is &lt;span class="math"&gt;\(j\)&lt;/span&gt;.
The computed &lt;code class="docutils literal"&gt;X&lt;/code&gt; is passed to the computation of the Kelvin functions
resulting in &lt;code class="docutils literal"&gt;BR1&lt;/code&gt; for the fraction term. Note that the computed
&lt;code class="docutils literal"&gt;ZINT&lt;/code&gt; does not include the length, it is equivalent with the
Wikipedia definition &lt;em&gt;in unit length&lt;/em&gt;.
With the reverse-engineered magic numbers&lt;/p&gt;
&lt;p&gt;&lt;code class="docutils literal"&gt;CMOTP&lt;/code&gt; &lt;span class="math"&gt;\(\approx \frac{\mu_0 c}{2\pi}\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code class="docutils literal"&gt;TPCMU&lt;/code&gt; &lt;span class="math"&gt;\(\approx 2\pi c\mu_0\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;(&lt;span class="math"&gt;\(c\)&lt;/span&gt; is the speed of light) we get for &lt;code class="docutils literal"&gt;X&lt;/code&gt; from the code (which
we call &lt;span class="math"&gt;\(q\)&lt;/span&gt; now consistent with the formula from &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-2" id="footnote-reference-3" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt;):&lt;/p&gt;
&lt;div class="math"&gt;
\begin{align*}
q &amp;amp;= \frac{r}{\lambda}\sqrt{2368.705\sigma\lambda} \\
  &amp;amp;= r\sqrt{\frac{2368.705\sigma}{\lambda}} \\
  &amp;amp;\approx r\sqrt{\frac{2\pi c\mu_0\sigma}{\lambda}} \\
  &amp;amp;= r\sqrt{\frac{2\pi c\mu_0\sigma f}{c}} \\
  &amp;amp;= r\sqrt{\frac{2\pi \mu_0\sigma \omega}{2\pi}} \\
  &amp;amp;= r\sqrt{\omega\mu_0\sigma} \\
\end{align*}
&lt;/div&gt;
&lt;p&gt;which matches the definition of &lt;span class="math"&gt;\(q\)&lt;/span&gt; in &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-2" id="footnote-reference-4" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; (see above).&lt;/p&gt;
&lt;p&gt;for &lt;span class="math"&gt;\(Z_\Int\)&lt;/span&gt; of the Fortran implementation we get:&lt;/p&gt;
&lt;div class="math"&gt;
\begin{align*}
Z_\Int &amp;amp;= \frac{j}{r} \sqrt{\frac{\mu_0 c}{2\pi\sigma\lambda}}
          \left[\frac{\ber_0 (q) + j\bei_0 (q)}
                  {\ber_1(q)+ j\bei_1(q)}\right] \\
       &amp;amp;= \frac{j}{r} \sqrt{\frac{\mu_0 c f}{2\pi\sigma c}}
          \left[\frac{\ber_0 (q) + j\bei_0 (q)}
                  {\ber_1(q)+ j\bei_1(q)}\right] \\
       &amp;amp;= \frac{j}{r} \sqrt{\frac{\mu_0 f}{2\pi\sigma}}
          \left[\frac{\ber_0 (q) + j\bei_0 (q)}
                  {\ber_1(q)+ j\bei_1(q)}\right] \\
       &amp;amp;= \frac{j}{r} \sqrt{\frac{\mu_0 \omega}{2\pi 2\pi\sigma}}
          \left[\frac{\ber_0 (q) + j\bei_0 (q)}
                  {\ber_1(q)+ j\bei_1(q)}\right] \\
       &amp;amp;= \frac{j}{2\pi r} \sqrt{\frac{\mu_0 \omega}{\sigma}}
          \left[\frac{\ber_0 (q) + j\bei_0 (q)}
                  {\ber_1(q)+ j\bei_1(q)}\right] \\
\end{align*}
&lt;/div&gt;
&lt;p&gt;Which does &lt;em&gt;NOT&lt;/em&gt; match the formula for &lt;span class="math"&gt;\(Z_i\)&lt;/span&gt; from &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-2" id="footnote-reference-5" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; above.
It looks like the formula from &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-2" id="footnote-reference-6" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;2&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; (p. 75) should have the frequency
&lt;span class="math"&gt;\(f\)&lt;/span&gt; instead of &lt;span class="math"&gt;\(\omega\)&lt;/span&gt; under the square root. The formula
derived from the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt; implementation, however, &lt;em&gt;is&lt;/em&gt; consistent with
the Wikipedia formula above.&lt;/p&gt;
&lt;p&gt;The term before the fraction of Kelvin functions differs by a factor
from the Wikipedia formula (I'm leaving out &lt;span class="math"&gt;\(\Delta_i\)&lt;/span&gt;, making it
a &lt;em&gt;per unit length&lt;/em&gt; formula like the one from Wikipedia), also note that
&lt;span class="math"&gt;\(\rho=1/\sigma\)&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;From code:&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
\frac{j}{2\pi r}\sqrt{\frac{\omega\mu}{\sigma}}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;From Wikipedia:&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
\frac{k\rho}{2\pi r}
   = \sqrt{\frac{-j\omega\mu}{\rho}}\frac{\rho}{2\pi r}
   = \frac{1}{2\pi r}\sqrt{-j\omega\mu\rho}
   = \frac{1}{2\pi r}\sqrt{\frac{-j\omega\mu}{\sigma}}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;This is a factor of&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
\frac{\sqrt{-j}}{j} = -\frac{1+j}{\sqrt{2}}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;because &lt;span class="math"&gt;\(\sqrt{-j} = \frac{1-j}{\sqrt{2}}\)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the Kelvin functions we have the following equivalence to Bessel
functions &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/28/#footnote-3" id="footnote-reference-7" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;3&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; (10.61, &lt;a class="reference external" href="https://dlmf.nist.gov/10.61"&gt;Kelvin Functions&lt;/a&gt;):&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
\ber_v x + j \bei_v x = J_v \left(xe^{3\pi j/4}\right)
                      = e^{v\pi j} J_v \left(xe^{-\pi j / 4}\right)
\end{equation*}
&lt;/div&gt;
&lt;p&gt;With the special cases of order 0 and 1:&lt;/p&gt;
&lt;div class="math"&gt;
\begin{align*}
\ber_0 x + j \bei_0 x &amp;amp;= e^{0} J_0 \left(xe^{-\pi j / 4}\right)    \\
                      &amp;amp;= J_0 \left(\frac{1-j}{\sqrt{2}}x\right)    \\
\ber_1 x + j \bei_1 x &amp;amp;= e^{j\pi} J_1 \left(xe^{-\pi j / 4}\right) \\
                      &amp;amp;= -J_1 \left(\frac{1-j}{\sqrt{2}}x\right)   \\
\end{align*}
&lt;/div&gt;
&lt;p&gt;The Wikipedia formula passes &lt;span class="math"&gt;\(kr\)&lt;/span&gt; to the Bessel functions:&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
kr = r\sqrt{\frac{-j\omega\mu}{\rho}} = r\sqrt{-j\omega\mu\sigma}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;while the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt; passes&lt;/p&gt;
&lt;div class="math"&gt;
\begin{equation*}
q = r\sqrt{\omega\mu\sigma}
\end{equation*}
&lt;/div&gt;
&lt;p&gt;which differ by the factor &lt;span class="math"&gt;\(\sqrt{-j}\)&lt;/span&gt;. This means that we pass a
factor of &lt;span class="math"&gt;\(\sqrt{2}\)&lt;/span&gt; too large to the Bessel functions. In turn
due to the symmetry and the fact that the functions in the denominator
are the derivative of the numerator, the output is too large by a factor
of &lt;span class="math"&gt;\(\sqrt{2}\)&lt;/span&gt; which compensates the factor of the first term.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2024/07/28/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>antenna modeling</category><category>documentation</category><category>english</category><category>hamradio</category><category>howto</category><guid>https://blog.runtux.com/posts/2024/07/28/</guid><pubDate>Sun, 28 Jul 2024 18:45:00 GMT</pubDate></item><item><title>Skin Effect Load and Impedance</title><link>https://blog.runtux.com/posts/2024/07/04/</link><dc:creator>Ralf Schlatterbeck</dc:creator><description>&lt;div&gt;&lt;p&gt;I've recently implemented &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Skin_effect"&gt;skin effect&lt;/a&gt; loading of wires in &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt;, my
re-implementation of the &lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; antenna modeling code. The original
&lt;a class="reference external" href="https://github.com/schlatterbeck/MiniNec"&gt;Mininec&lt;/a&gt; code did not have this feature.&lt;/p&gt;
&lt;p&gt;To attempt verification of my implementation I chose to follow an
ancient publication by R. P. Haviland, W4MB &lt;a class="brackets" href="https://blog.runtux.com/posts/2024/07/04/#footnote-1" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; where he, among other
things, investigates effect of wire resistance on feed point impedance.
He has two graphics where the real and the imaginary part of the feed
point impedance are plotted against the length/diameter ratio of the
wire of a dipole. He mentions Mininec in the text but reading closely it
is not apparent if for the two graphics with the feed point impedance he
really used Mininec or something else. I've tried to reproduce his
graphs with both &lt;a class="reference external" href="https://pypi.org/project/PyNEC/"&gt;PyNEC&lt;/a&gt;, a &lt;a class="reference external" href="https://www.python.org/"&gt;Python&lt;/a&gt; wrapper for a C++ implementation of
&lt;a class="reference external" href="https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code"&gt;NEC-2&lt;/a&gt; and my &lt;a class="reference external" href="https://github.com/schlatterbeck/pymininec"&gt;pymininec&lt;/a&gt; implementation of mininec. The results of
Haviland have the same tendencies as the NEC results in the following
but do not match closely.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.runtux.com/posts/2024/07/04/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>antenna modeling</category><category>documentation</category><category>english</category><category>hamradio</category><category>howto</category><guid>https://blog.runtux.com/posts/2024/07/04/</guid><pubDate>Thu, 04 Jul 2024 17:45:00 GMT</pubDate></item></channel></rss>