IN THE 3.0 (and newer) VERSIONS, THE FUNCTIONALLITY DESCRIBED IN THIS FILE IS
INCORPERATED AS AUTOMATIC FUNCTIONS IN THE PROGRAM...!
 
For those who would like more information this file might be usefull. 

****

Getting started with the 4NEC2 visualization tool v2.4 for NEC-2 (nec2dxxx.exe)

There are three ways you can use 4nec2:

1) Show structure, currents and 3D far field data
2) Same as 1) and display impedance, SWR and total gain for range of frequencies
3) Show Structure and display 2D far field data, impedance and SWR for range of frequencies

Below these three ways are discussed in more detail:

1) Show structure, currents and phase and display 3D far field pattern for one fixed 
   frequency.

	With this first basic example you can examine and validate structure geometry and 
	display the currents and phase relationship on the structure. Also you can display
	and rotate the 3D far field pattern on the geometry view.   
	In the 'pattern' view you can examine the (normalized) horizontal- or vertical cut
	for the far field (radiation) pattern for increasing theta or phi angles (space/
	up/down/left/right keys). With the ,(<) and .(>) key's you can cycle through the 
	vertical-, horizontal- and total power gains and the E(theta) and E(phi) patterns
	as included in the generated *.OUT file. You can view the contents of this *.OUT 
	file by pressing the F8 key.

	This is mostly the first step in evaluating a new antenna structure.

	Below an example is given for a simple free space dipole (see example1.nec)

CM Dipole example 1.			' Comment cards
CE 					' End of comment
'
GW 1 9 0 -.2418 0 0 .2418 0 .0001	' Wire 1, halve wavelength with 9 segments
GE 0					' End of geometry
'
EX 0 1 5 0 1 0				' Voltage source 1 volt at wire 1 segment 5
'
FR 0 1 0 0 300 0			' Set (only one) frequency (300 Mc) for calculations
'
RP 0 37 37 1000 -90 0 5 10		' Settings for far field pattern calculations
'					' 37 theta steps from -90 to +90 degrees
'					' 37 phi steps from 0 to 360 degrees
EN					' End of NEC input

	In this first example the RP card generates the far field gain data for 37*37 
	angles above ground. You have to use one additional step to cover the whole 180 
	or 360 degree range. 
	For the horizontal pattern you may use 36(+1) * 10 degrees to cover the complete 
	0-360 phi degrees. For the vertical pattern you may use 36(+1) * 5 degrees to 
	cover the half sphere above ground for the -90 to +90 theta degrees.

	You may also decide to generate the complete pattern by setting the following 
	RP card. This card generates also the bottom half for the radiation pattern.

RP 0 73 37 1000 0 0 5 10		' Theta from 0-360 and Phi from 0-360 degrees
	
	You may add/remove the comment char's ( ' ) in example1.nec to see how it works.

	Mostly you will create a new *.NEC antenna input file by copying an existing *.NEC
	file to a new name. Then you start 4nec2, select the newly created file and edit 
	the NEC input file by pressing the F6 key. After saving and closing this notepad 
	session, structure geometry for the new *.NEC input file is displayed. 
	(grey background for *.NEC data).

	After that you let nec2d.exe generate new nec-2 output data by pressing the F7 key.
	This starts the nec2dxxx.exe calculation core which generates a new *.OUT output 
	file. When this is done, the newly generated data is loaded by 4nec2 and the 
	resulting geometry structure is displayed. (white background for *.OUT data). 

	If requested by appropriate NEC cards also the far field pattern view and the 
	impedance view are displayed. You may view the contents of the nec-2 output file 
	by pressing the F8 key. (Usually in case of errors).

	In the *.NEC input file you may include comments. All text behind a ' character is
	treated as comment. When returning to 4nec2, the *.NEC file is red by 4nec2, all
	comment is stripped out and the resulting textlines are written to *.INP on the 
	\out directory. These *.INP files are used by the nec2d.exe calculation core as 
	the NEC-2 input files. 

2) Same as above plus additional impedance, SWR and gain graphs for range of frequencies. 
   (example2.nec).

	You can also let 4nec2 generate and display impedance, SWR and gain values for 
	a range of frequencies. This is done by adding the following lines to the first
 	example:

PT -1			' Suppress current calculations to improve speed (not required)
PQ -1			' Suppers charge calculations to improve speed (not required)
'
FR 0 20 0 0 280 2	' Set frequency sweep from 280 up to 320 Mc with 2 Mc interval
'
XQ			' Start impedance calculations
'	
EN			' End of nec file

	On de 'impedance' form you can select the Impedance, SWR graphs but no gain graph
	is available.
	
	Note that the frequency set with the first FR card is used for the current and 
	3D far field data generation as discussed in example 1) and that the frequency
	(loop), set with the second FR card is used for impedance and SWR data generation.

	When you also want to display and evaluate the total gain for a range of 
	frequencies, you have to replace the XQ card with a single step RP card. 
	This card sets the angle for which you want to see the total gain within the 
	frequency loop. You can use the far field data generated in the first example
	to determine the angle in which you are interested.

	For instance:

RP 0 1 1 1000 -45 0	' Calculate/display gain for Theta=-45 and Phi = 0 degrees.
'
EN			' End of nec file


3) Show structure and 2D far field pattern, impedance and SWR graphs for frequency sweep.
   (example3.nec)

	With the below set of cards you can display a 2D horizontal (phi) or vertical 
	(theta) cut for the far field radiation pattern within a frequency loop. However, 
	compared to the first two examples no (valid) 3D far-field pattern is available
	on the geometry view.

CM Dipole example 3.			' Comment cards
CE 					' End of comment
'
GW 1 9 0 -.2418 0 0 .2418 0 .0001	' Wire 1, halve wavelength with 9 segments
GE 0					' End of geometry
'
EX 0 1 5 0 1 0				' Voltage source 1 volt at wire 1 segment 5
'
FR 0 36 0 0 250 20		' Set frequency sweep from 250-950 Mc, 20 Mc interval
'
RP 0 1 37 1000 -45 0 0 10 	' Generate one horizontal pattern for theta = -45 degrees
'				' and PHI = 0 to 360 degrees 36(+1) * 10
EN				' End of nec file

	Note that in this last example as compared to example 2 only one EX and RP card
	are included.

	You can 'walk' through the generated patterns for each frequency with the left 
	and right arrow key's

	When you want to examine the vertical(theta) cut for the radiation pattern for 
	a range of frequencies you have to replace the above RP card with the following
	RP card.

RP 0 37 1 1000 -90 0 5 0 	' Generate only one vertical pattern for phi = 0 degrees
				' and theta = -90 to +90 degrees 36(+1) * 5
EN				' End of NEC file.

	It is not possible with the same *.NEC input file to display both a horizontal 
	and a vertical cut for the far field pattern, or horizontal or vertical patterns
	for more than one theta or phi angle. 

Additional notes:

	1) The power specified on the settings tab in the main form is used for current 
	calculations in the geometry form. The current value displayed for the selected
	segment (Shift+left/right) is the current on the wire when the specified power 
	is fed into the antenne at the voltage source.

	2) The maximum number of segments your computer can handle depends on the amount of
	RAM memory. First you devide the ammount of RAM in bytes by 16. Then you take the
	square root of this devision. The max number of segments your computer can handle
	is about 5-10% less than the result of these calculation.
