Canadian TV, Computing and Home Theatre Forums banner
1301 - 1309 of 1309 Posts

·
Registered
Joined
·
4 Posts
I am trying to understand and use GA. After extensive searches I cannot find any examples. Is there any documentation that has something more than just a definition? What I do not understand is how to specify the CENTER point.
My interpretation of the definition is that -90° would be in the negative Z direction. I entered this and got nothing but the GW straight line.
SY rad=0.003175
GW 18 5 0, -0.285000, 0.395838, 0, -0.197500, 0.395838, rad
GA 100 5 -0.0125 -90 90 rad

I need it to start at 0, -0.197500, 0.395838 and end at 0, -0.197500, 0.420838 and look like a C (half circle).
The center would be at 0, -0.197500, 0.408338

Then I need to have a backward C which I I have no idea how to tell it which way to rotate.
 

·
Registered
Joined
·
5,191 Posts
Not sure what it is your trying to do, but I have never seen that used anywhere either, not like I use NEC2 a lot though either. Out of curiousity, I just played with it a bit here, and added one arc to the end of this biquad antenna file I have here. The Arc isn't even visible until after there is NEC output data created. Makes me wonder if it is even treated as part of an antenna structure. As even just having a hunk of wire in proximity of the antenna you'd think it would affect the pattern somewhat. Doesn't seem like it did, for me at least. So, unless you have created some output data with your structure, ya won't even see the arc you created in your antenna. I guess I am at a loss for what use it'd be if it doesn't
even affect the pattern...meaning, if it's not even there until after the calculations are done, what use is it? If you want your arc to be part of your antenna, maybe ya just wanna create your arc with many short length wires (GW) simulating an arc with wires instead?



 

·
Registered
Joined
·
5,191 Posts
btw, this was my entire nec file... Maybe you can get it "to do something"?
And I too had to look it up in the part3 documentation, page 16, to figure out how it was even specified. https://www.nec2.org/other/nec2prt3.pdf
Code:
CM testing a GA card....
SY Freqscale=608/578
SY Rsrc=0.112
SY Relem=0.125
SY Gap=1.440253 '0.75, 2
SY HW=6.134204*Freqscale        '4, 8
SY HH=1.741836*Freqscale        '1, 2.5
GW      1       1       0       -Gap/2  0       0       Gap/2   0       Rsrc
GW      2       4       0       -Gap/2  0       0       -HW     HW      Relem
GW      3       5       0       -HW     HW      0       0       HH*HW   Relem
GW      4       5       0       0       HH*HW   0       HW      HW      Relem
GW      5       4       0       HW      HW      0       Gap/2   0       Relem
GW      6       4       0       Gap/2   0       0       HW      -HW     Relem
GW      7       5       0       HW      -HW     0       0       -HH*HW  Relem
GW      8       5       0       0       -HH*HW  0       -HW     -HW     Relem
GW      9       4       0       -HW     -HW     0       -Gap/2  0       Relem
GA      10      20      12      270     90      Relem
GS      0       0       0.0254
GE      0
LD      5       0       0       0       58000000        'Copper Elements
GN      -1
EK
EX      0       1       1       0       1       0       0
FR      0       24      0       0       470     6
RP      0       1       73      1510    90      0       1       5       0       0
EN
 

·
Registered
Joined
·
4 Posts
Thanks majortom
I have an narod on a GH antenna that has an S curve at each end. I'm guessing it is to make the rod look longer. I didn't create it, but I built it. Now I am trying to characterize it and increase the VHF gain. Those Ss are a real problem to define in 4NEC2. This is what it looks like.
11856
11857


There are no geometry errors, but running the Generation produces a few errors and lots of warnings. But I have significantly reduced their numbers. You can see the pieces that are still a problem at the end of the long pieces. Either the segments get too short or the junctions to the straight pieces won't match up. I thought that GA function might solve the issue, but it basically does the same thing by segmenting the arc ,which I did when I drew it out in Sketchup and enter the wire segments so I am not sure it will come up with a workable solution either. I guess I will make 5 equal segments. The longer ones were the size of the 2 short ends but I didn't lengthen them correctly.
Edit: I finally got it symmetrical and I have no errors. Now to figure out why the patterns don't make sense. That is another post.
 

·
Registered
Joined
·
3 Posts
Hello, everyone!

I had the urge to tinker with nikiml’s optimization scripts, but my installation attempts merely succeeded in generating a variety of error messages … hey, I know very little about Windows 10 and its quirks, so what can I say. LOL!!!

After sorting things out, I made a few notes for myself, so that I don’t have to go through this exercise again. On reflection, I thought that I’d share these these notes. Hopefully, they will mitigate a few headaches.

Optimization Script Installation - Care Points

The instructions found at nikiml's Antenna pages - Nec optimization scripts are the way to proceed, but they are just the smallest bit out of date. They also make the assumption that the user is a proficient Windows user. : (

Therefore, I offer the following notes to my fellow Windows-challenged friends out there.

Assumptions: Installation onto a Windows 10 machine

The optimization scripts require Python in order to function, so let’s first check to see if Python is already installed on your target system with:
Code:
C:\ > python –-version
If Python is installed, it will return its version number. Otherwise, Python will need to be downloaded and installed.
Reference: Download Python

A secondary consideration of the Python installation, is that the script optimization install utility needs to be able to copy some of its files into the Python ~\site-packages sub-directory, as well as other locations. If Python is allowed to install itself into the default location, it will install itself into a subdirectory of C:\Program Files\WindowsApps, which is a protected, locked down directory for UWP applications. The script install utility will not have the appropriate permissions to accomplish its task. Therefore, choose the “Customize installation” option, so that Python may be manually installed into a suitable, alternate location, such as C:\Python.

The Python installer also offers to add Python to the PATH variable. I would recommend this, unless you have a compelling reason not to.

Note: It is possible to have multiple versions of Python coexist on your system. If this is your situation, you will need to explicitly call the desired version of Python at runtime, e.g.:
Code:
C:\ > Python\Python310\python abc123.py
I’ve tested the scripts with with Python ver. 3.10.4 (the latest offering as of this writing) and it seems to work just fine.

Download nikiml’s optimization scripts from github, as these are the most recent iterations. Click the green “Code” button and then select “Download ZIP” from the menu.
Reference: GitHub - nikiml/nec.opt: python module for optimization an evaluation of nec antenna models

Unzip the optimization scripts to a convenient location, but before running the installation file, a small edit needs to be made, otherwise I found that an error message is generated:
Code:
Traceback (most recent call last):
File "c:\nec_opt\nec.opt-master\setup.py", line 2, in <module>
from version import git_commit_sha
ModuleNotFoundError: No module named 'version'
I’m not a software developer, so my shabby workaround is to hard-code the program's version number:
Open setup.py in a suitable editor, such as Notepad++
Reference: https://notepad-plus-plus.org

Delete line #2
... and configure line #3 as follows:
Code:
version='0.17.1',
Save your edits and then run the setup file:
Code:
C:\ > python setup.py install
Install the NEC2/MP engines: Even if these engines are already on your system due to a prior installation of 4nec2, for example, Python may not be able to find them when the optimization scripts are executed.

NOTE: Some earlier versions of the optimization scripts zip file also included copies of the NEC2/MP engines. If your zip file did not contain them, or if they are not already installed on your system, they may be downloaded separately:
Reference: NEC/MP - Optimized multithreaded NEC engine

Make a suitable directory for the engines, such as C:\NEC2MP and then unzip/copy the engine files into this directory. These NEC2/MP engine files need to be in Windows’ PATH so that Python can find them, so add their directory to the PATH variable.
Reference: Add to the PATH on Windows 10 | Architect Ryan

I already had a preexisting installation of 4nec2 on my machine, which is where my models are located (… in addition to being backed-up to a NAS). Since this is were my models are, I find it convenient to create a “work” folder here for those models upon which I am working. You’ll need to devise your own system to conveniently contain and keep track of the files that are generated by the optimization scripts.

From here, you can follow nikiml’s tutorial here:
nikiml's Antenna pages - Nec optimization scripts
and here:

Note: I noticed that in the first example there is a typo. The command:
Code:
C:\ > python -m nec.eval -N4 -uV input.nec
will generate an error. The correct syntax is as follows:
Code:
C:\ > python -m nec.eval -n4 -uV input.nec
Hopefully, I haven't overlooked anything, nor further confused the issue. If you notice an error, please advise.
OK, you’re now on your own; have fun!

Before I sign off, please allow me to thank nikiml, majortom, Holl_ands, 300ohm, et al. for generously sharing their time and expertise.
Thank You!
 

·
Registered
Joined
·
1 Posts
This seems like a good place to mention that as nikilm's sites have disappeared, I have forked nec_viewer in github, adjusted it, and the results are accessible at nikiml's Antenna pages - Nec Viewer

PDF versions of the tutorials and direct links to the wayback copies of the two sites nikiml used to use are here:

Utilities from nikiml

This small contribution is my attempt to pass on something in return for the assistance that others have provided.
 

·
Registered
Joined
·
3 Posts
This seems like a good place to mention that as nikilm's sites have disappeared, I have forked nec_viewer in github, adjusted it, and the results are accessible at nikiml's Antenna pages - Nec Viewer

PDF versions of the tutorials and direct links to the wayback copies of the two sites nikiml used to use are here:

Utilitieshttps://web.archive.org/web/20210613142058/http://mladenov.ca/~nickm/gh_n_vV.html from nikiml

This small contribution is my attempt to pass on something in return for the assistance that https://web.archive.org/web/2021061.../http://mladenov.ca/~nickm/gh_n_vV.htmlothers have provided.
Thanks for your efforts to preserve this information, as it is a brilliant resource. If I may be so bold, may I suggest that you also append a link to nikiml's github page, so that everything is in one place?
GitHub - nikiml/nec.opt: python module for optimization an evaluation of nec antenna models

Sadly, it would appear that the wayback machine is not infallible and some of the models appear to be lost forever. For instance there are a few VHF-Hi models listed that have ridiculous gain, but as near as I can determine, the *.nec files are MIA due to a "server error."
nikiml's Antenna pages - GH for VHF-hi/low

With patience, I was able to find most everything else that I was looking for.

EDIT:
The aforementioned VHF-hi/low antenna models may actually be hiding in plain sight on holl_ands site:
Lo+Hi-VHF SBGH w NARODS
 

·
Registered
Joined
·
21 Posts
I made a copy of the site back while it was still hosted on teksavvy. Should be complete. I dont remember any new antennas being added, so never bothered to update my local copy.

I also made an update so that the model can be viewed without needing to access a website. A couple of extra files (taken from the original website) need to be added to your local copy of nec, plus one edit to change so the link points to the local copy instead of online.

www.mediafire.com/folder/vput2t50a1jmg/nec_opt

Hope someone finds it useful
 
1301 - 1309 of 1309 Posts
Top