You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is a vertical dipole from the nec user documentation e.g. from https://www.nec2.org/other/nec2prt3.pdf example 3 on page 92 but change of wire radius from 30cm (!) to 3mm. I'm also using 1° stepped phi and theta angles instead of 10° stepping for theta and just 0 and 90° for phi (see commented line in code), just 2 values for phi is possible because the vertical dipole has a completely symmetric pattern.
Since this uses ideal ground it should produce an average gain fairly close to 2.0
In my example (which uses python bindings but I'm quite sure the problem is in the C++ code) this prints: avg gain: 2.05305 solid angle: 2.00000
which is off by more than 2%.
The nec2c code prints for this example with the following input:
CE
GW 1 9 0. 0. 2. 0. 0. 7. .003
GE 1
EK
FR 0 1 0 0 30.
EX 0 1 5 0 1.
GN 1
RP 0 91 361 1301 0. 0. 1. 1.
EN
AVERAGE POWER GAIN: 1.9901E+00 - SOLID ANGLE USED IN AVERAGING: (+2.0000)*PI STERADIANS
when I replace the RP card with: RP 0 10 2 1301 0. 0. 10. 90.
(which is equivalent to the commented line in the code) I get AVERAGE POWER GAIN: 1.9876E+00 - SOLID ANGLE USED IN AVERAGING: (+0.5000)*PI STERADIANS
which is still close enough to 2.0
If I enable the commented line in the code (and comment the current rp_card line instead) I'm getting:
avg gain: 3.88009 solid angle: 0.50000
which is way off.
My observation is that the average gain is overestimated systematically. I note this in another project I'm working on.
Hope you have some time looking into this
Ralf
The text was updated successfully, but these errors were encountered:
See pull request #73 - this fixes it for me, I'm now getting for the two test-cases avg gain: 1.99009 solid angle: 2.00000
and avg gain: 1.98762 solid angle: 0.50000
The following example:
Which is a vertical dipole from the nec user documentation e.g. from https://www.nec2.org/other/nec2prt3.pdf example 3 on page 92 but change of wire radius from 30cm (!) to 3mm. I'm also using 1° stepped phi and theta angles instead of 10° stepping for theta and just 0 and 90° for phi (see commented line in code), just 2 values for phi is possible because the vertical dipole has a completely symmetric pattern.
Since this uses ideal ground it should produce an average gain fairly close to 2.0
In my example (which uses python bindings but I'm quite sure the problem is in the C++ code) this prints:
avg gain: 2.05305 solid angle: 2.00000
which is off by more than 2%.
The nec2c code prints for this example with the following input:
AVERAGE POWER GAIN: 1.9901E+00 - SOLID ANGLE USED IN AVERAGING: (+2.0000)*PI STERADIANS
when I replace the RP card with:
RP 0 10 2 1301 0. 0. 10. 90.
(which is equivalent to the commented line in the code) I get
AVERAGE POWER GAIN: 1.9876E+00 - SOLID ANGLE USED IN AVERAGING: (+0.5000)*PI STERADIANS
which is still close enough to 2.0
If I enable the commented line in the code (and comment the current rp_card line instead) I'm getting:
avg gain: 3.88009 solid angle: 0.50000
which is way off.
My observation is that the average gain is overestimated systematically. I note this in another project I'm working on.
Hope you have some time looking into this
Ralf
The text was updated successfully, but these errors were encountered: