: 4nec2 & Other Antenna Design Modeling Software


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [43] 44 45

300ohm
2011-11-13, 11:40 PM
Anyway this is probably a discussion for the software thread.


OK, here we go from the phasing line thread.

300ohm
2011-11-13, 11:45 PM
No. The impedance would be the same so the SWR would be the same.
Well, Duh Brian. The point is the impedance isnt the same. You've got better test equipment than I do. :p

OK, moved from another thread :

Quote:
The other thing is that to maximize average forward gain over a set of frequencies, you need to combine the gain figures in watts, not dB.

Brian
Brian, can you please elaborate on that?
Isn't the gain just a ratio ( so it is unit-less )?
Do you mean to calculate the average from the gain ratios without taking logarithm first?

And can you please explain the reason behind this?
Is it because

(log(a)+log(b))/2 == log(ab)/2 ?

In light of which your statement is starting to make some sense to me...

Thanks in advance.

k6sti
2011-11-14, 06:11 AM
Well, Duh Brian. The point is the impedance isnt the same. You've got better test equipment than I do.

When you calculate the equivalent cylindrical diameter of an irregular conductor, you are finding the diameter of round conductor with the same self-impedance. This will make it act the same in an electromagnetic field, including as an antenna element. If you use a round element with a different self-impedance, it won't behave the same way. The methods I referred to were derived from electromagnetic theory, not measurement. They do not depend on frequency or RF paths. They just depend on the irregular cross-section of the conductor. If you believe the authors have overlooked something in their derivations, you should contact them. I'm sure they would appreciate any corrections.

Brian

300ohm
2011-11-19, 07:21 PM
Found this link of NEC2, NEC3, NEC4 commands side by side :

http://www.nittany-scientific.com/specs/necdiff.htm

mrplow
2011-11-23, 06:44 PM
With nikiml's help I've managed to get nec optimization going in native linux. It took me a little bit to figure out but it really wasn't all that difficult. On the downside I'm getting some strange output in the terminal that doesn't seem to effect anything other than spamming the output constantly.
python -m nec.opt -e nec2 -s "(647,1,1)" -s "(683,1,1)" --strict-max-target -f "{647:(12,20),683:(12,18)}" test.nec

apparent state: unit 5 named /home/mrplow/4nec/models/mine/output/nec2PkQ8fk.inp
last format: (a)
lately reading sequential formatted external IO
fmt: end of file
apparent state: unit 5 named /home/mrplow/4nec/models/mine/output/nec2tCndlR.inp
last format: (a)
lately reading sequential formatted external IO
..................................................
396. Min score 3.36821, Mean score 4.94799, Improved 2 members, IterTime(49 sec)
fmt: end of file
apparent state: unit 5 named /home/mrplow/4nec/models/mine/output/nec28ZSa7P.agt
last format: (a)
lately reading sequential formatted external IO
fmt: end of file
apparent state: unit 5 named /home/mrplow/4nec/models/mine/output/nec2GO5tb6.agt
last format: (a)
lately reading sequential formatted external IO
fmt: end of file

The script is making good best*_***.nec files so I can track the progress that way but its not as easy to watch the progress from bed that way.
I can turn on debug logging or provide more info if it would help.
Next step setup an Amazon EC2 cloud to crunch away!

Forgot to mention I'm using the standard nec2 engine from Ubuntu 11.10's nec package (version 2-16).

300ohm
2011-11-23, 09:06 PM
Forgot to mention I'm using the standard nec2 engine from Ubuntu 11.10's nec package (version 2-16).

These files ? https://launchpad.net/ubuntu/oneiric/+source/nec/2-16

Is there a description or home page anywhere ? Whats the max number of segments allowed ?

mrplow
2011-11-23, 09:44 PM
These files ? https://launchpad.net/ubuntu/oneiric/+source/nec/2-16

Is there a description or home page anywhere ? Whats the max number of segments allowed ?
yes thats the one, from the manual:
The maximum size of problem which the code can handle must be hard coded at compile time and no dynamic memory allocation is performed. Two versions are therefore provided suitable for different sizes of problem, nec2 is compiled for a maximum of 10000 wire segments and 5000 surface patches, while nec2small is compiled for a maximum of 600 wire segments and 200 surface patches.
http://manpages.ubuntu.com/manpages/hardy/man1/nec2.1.html

nikiml
2011-11-24, 02:35 AM
apparent state: unit 5 named /home/mrplow/4nec/models/mine/output/nec2PkQ8fk.inp
last format: (a)
lately reading sequential formatted external IO
fmt: end of file
apparent state: unit 5 named /home/mrplow/4nec/models/mine/output/nec2tCndlR.inp
last format: (a)
lately reading sequential formatted external IO



This output is definitely not from my scripts. Therefore it must be from the nec2 engine.
A possible solution would be to write a small shell script that runs the engine
forwarding the input parameters and dumping the engine output to /dev/null.
And use that shell script as engine with the -e option.

All this providing the messages above are not indicating any serious problem... But what the messages mean can probably be found out only from their sources.

nikiml
2011-11-24, 02:41 AM
May be you should "vi -b" your input file and check if it contains some ^M characters....

300ohm
2011-11-24, 04:10 AM
Therefore it must be from the nec2 engine.
Im sure it is, maybe even from the Comment (CM) cards. It looks like it only accepts 80 column input. (Damn, I just got rid of my card hopper, heh.) 4nec2's NEC2 engine has been modified to accept 256 column input.
The i386 label gives a clue to its age.
Due to the age of the program, it expects input in the form of punched cards fed into a hopper. It currently does not accept any options.

mrplow
2011-11-24, 11:12 AM
A possible solution would be to write a small shell script that runs the engine forwarding the input parameters and dumping the engine output to /dev/null.
And use that shell script as engine with the -e option.Good idea, I'll try that after work today.
May be you should "vi -b" your input file and check if it contains some ^M characters....just checked, but all the line endings were proper
Im sure it is, maybe even from the Comment (CM) cards. It looks like it only accepts 80 column input.there aren't any lines with columns over 80 in my nec file, I tried removing all CM lines and replacing all tabs with spaces, to no avail.

mrplow
2011-11-24, 03:11 PM
using this script as the engine seems to have fixed the extra output
#!/bin/sh
/usr/bin/nec2 $1 $2 > /dev/null 2>&1

balm
2011-12-06, 10:42 PM
What is the best way to model the far field patterns (theta=90) for different frequencies, from different directions, with the antenna assumed aimed in a given direction for a given transmitter...is there an easy way to get overlapped images of the various fields and azimuths?

Ex. I aim the antenna at cluster A (azimuth A), for frequency 1, say. This produces FF pattern and gain A, at the same time I want to see the FF pattern and gain, for cluster B (azimuth B), for frequency 3, say (with antenna aimed still at A).

GHZ24
2011-12-22, 01:16 PM
maybe I don't understand the question but
balm : can't you just run single frequency full scans of the frequencies you want and use info from the pattern (f-4) widow, change "far field" to "horizontal plane" (so you're looking down on the pattern) left clicking on the pattern outline brings up an info line that gives gain at what ever direction you pull the line to (left and right arrow keys rotate the line around the horizon, and up down arrow keys tilt the antenna up or down).

different metals : The LD card that specifies the metal a wire is made of:does it effect only the GW cards before it? Can I put two different LD cards to make part of an antenna one metal and other parts of an other?

I made a cylinder model to see how much I could up f/r ratio and limit side lobes sort of a dipole in a garbage can or a uhf cantenna.

After getting results with f/b ratios that seemed impossible
I decided to run the model with the "lid" on (no opening ) sort of a leak test.

I'll have to run it again (it took forever) I overwrote the out file but It looked like an isotropic pattern with a gain of -1

maybe I freaked it out.
Anyone else out there try hiding your antenna under a basket?

balm
2011-12-22, 02:17 PM
its ok, i think I figured it out,

you run a pattern with file 1, at frequency A, then open again and run file 1, at frequency B, then go back to file 1, the pattern A, then in Pattern window, click on Compare, Add new pattern, open file 1, pattern B, and voila, the 2 patterns at different frequencies will be superimposed in the pattern view

Now, I havent figured out how to get the RP card set up to give me patterns at different azimuths aims...

balm
2011-12-22, 02:46 PM
Ok with thr RP card, and Phi set to say, 60 degrees, you can set it to get gain at any given azimuth on the line graph, but I cant get it on the FF FR pattern view... yet


EDIT : I set frequency to 470 Mhz, and Phi = 60, in the RP card, then run original file, and nothing results...

300ohm
2011-12-22, 09:57 PM
Can I put two different LD cards to make part of an antenna one metal and other parts of an other?

Yeah, but I believe if you use more than one LD card, then you have to use a separate LD card for each wire. (and it looks like each segment could specify a different metal too)
You may then have to change Max-nr LD cards in Settings.

The difference in conductivity between commonly used metals only makes a tiny difference in gain and SWR, and I usually omit the LD card when optimizing to decrease compute time. :)

Anyone else out there try hiding your antenna under a basket?
I think thats a limitation of the NEC2 engine. If you want to bury your antenna or throw it into a lake, youll need the pricey NEC4 engine, heh.

300ohm
2011-12-22, 10:16 PM
Balm, you do realize that you can get the raw gain figure for any angle on the pattern just by clicking the mouse on the pattern graph line.

Of course, if you want EVERY single degree, then you have to calculate with a 1 degree Resolution.
And you may then have to change Max-nr field points in Settings.

holl_ands
2011-12-23, 04:46 AM
I tack the fol. "standard" set of FR/RP Cards to the end of EVERY 4nec2 file I run.
Surely you'll find an FR/RP pair that suits your application...or can be modified.
Note that plotting Gain along individual azimuths is easy...but since "Forward" is 90-deg,
can be somewhat confusing when entering the (Theta?) angle.

I suspect that you may not be getting a 2D Azimuthal Pattern chart because you are
asking for a 1D Calculation (Gain vs Freq Line Chart ONLY), see examples below:


' FR Freq Sweep choices in order of increasing calculation time (fm holl_ands):
' FR 0 0 0 0 198 0 ' Fixed Freq
' FR 0 0 0 0 590 0 ' Fixed Freq
FR 0 29 0 0 470 12 ' Freq Sweep 470-806 every 12 MHz - OLD UHF BAND
' FR 0 34 0 0 410 12 ' Freq Sweep 410-806 every 12 MHz - Even Wider Sweep
' FR 0 39 0 0 470 6 ' Freq Sweep 470-698 every 6 MHz - PREFERRED FOR UHF
' FR 0 77 0 0 470 3 ' Freq Sweep 470-698 every 3 MHz
' FR 0 153 0 0 470 1.5 ' Freq Sweep 470-698 every 1.5 MHz
' FR 0 71 0 0 300 10 ' Freq Sweep 300-1000 every 10 MHz - WIDEBAND SWEEP
' FR Hi-VHF choices:
' FR 0 15 0 0 174 3 ' Freq Sweep 174-216 every 3 MHz
' FR 0 29 0 0 174 1.5 ' Freq Sweep 174-216 every 1.5 MHz - PREFERRED
' FR 0 43 0 0 174 1 ' Freq Sweep 174-216 every 1 MHz - Hi-Rez
' FR 0 26 0 0 150 6 ' Freq Sweep 150-300 every 6 MHz - WIDEBAND SWEEP
' FR Lo-VHF choices:
' FR 0 22 0 9 87 1 ' Frequency Sweep every 1 MHz for 87-108 MHz - FM Band
' FR 0 19 0 0 54 3 ' Frequency Sweep every 3 MHz for Ch2-6 + FM
' FR 0 28 0 0 54 6 ' Wide Freq Sweep every 6 MHz for Ch2-13
' FR 0 35 0 0 54 1 ' Frequency Sweep every 1 MHz for Ch2-6
' FR 0 36 0 0 75 1 ' Frequency Sweep every 1 MHz for Ch5 + Ch6 + FM
' FR 0 64 0 0 54 12 ' Super Wide Freq Sweep 54-810 every 12 MHz
' RP choices in order of increasing calculation time:
' RP 0 1 1 1510 90 90 1 1 0 0 ' 1D Gain toward 0-deg Azimuth - SIDE GAIN
' RP 0 1 1 1510 90 45 1 1 0 0 ' 1D Gain toward 45-deg Azimuth - DIAGONAL GAIN
' RP 0 1 1 1510 90 0 1 1 0 0 ' 1D Gain toward 90-deg Azimuth - FORWARD GAIN
' RP 0 1 1 1510 90 180 1 1 0 0 ' 1D Gain toward 270-deg Azimuth - REVERSE GAIN
' RP 0 1 1 1510 90 150 1 1 0 0 ' 1D Gain toward 300-deg Azimuth - DIAGONAL GAIN
' RP 0 1 37 1510 90 0 1 5 0 0 ' 2D (Left only) Azimuthal Gain Slice
RP 0 1 73 1510 90 0 1 5 0 0 ' 2D Azimuthal Gain Slice - PREFERRED
' RP 0 73 1 1510 90 0 5 1 0 0 ' 2D Elevation Gain Slice
' RP 0 73 73 1510 90 0 5 5 0 0 ' 3D Lower Hemisphere reveals antenna (Fixed Freq)
' RP 0 285 73 1510 90 0 5 5 0 0 ' 3D Full Coverage obscures antenna (Fixed Freq)
EN

balm
2011-12-23, 09:48 AM
ok, got it now...

it looks like 4nec2 doesnt allow the pattern view with the antenna rotated to different azimuths, the only way to see this is by first rotating the antenna in geometry edit, then run the FF

thanks