Importing Wires
Supported Formats
Wires in an external file can be imported into AN-SOF by going to File > Import Wires in the main menu. A sub-menu having four options will be displayed: AN-SOF, NEC, DXF, and MM formats. The DXF and MM formats must contain only linear wires written in ASCII text format.
AN-SOF Format
Wires can be imported into the AN-SOF workspace from a different AN-SOF project. Upon saving a project, a corresponding file will be created in the same directory, marked with a .wre extension. This file mirrors the project’s name and contains the geometrical description of all wires within the project. For reference on the files generated during project saves, you can access the details at File Formats.
To import wires into your project, navigate to the main menu and select: File > Import Wires > AN-SOF Format. From there, locate and choose the specific .wre file you wish to import. You can import as many .wre files as needed, one at a time.
NEC Format
There are slight differences between the commands supported by AN-SOF and the standard NEC cards. To maintain compatibility with the NEC format, which was originally created for entering data using punch cards, some fields appear repeating, and others must be entered with a zero with no meaning. Lengths and wire radii are assumed to be in meters. If errors are found while importing a file, an error report will be shown in the Note panel of the Setup tab >.
The SY command for symbolic language is not supported. To run simulations with variable geometric parameters, you can write scripts to generate the NEC files and then use the Run Bulk Simulation command. See examples here >.
GW – Linear Wire
One linear wire per line must be set beginning with “GW” and ending with an Enter as follows:
GW Tag Segments X1 Y1 Z1 X2 Y2 Z2 Radius
[Enter]
Tag > 0. Tag number for the linear wire. The space between “GW” and Tag is optional. A single tab or comma can also be used as a separator between the command name and the first data field.
Segments = Number of segments for the wire. If a zero is entered, the minimum recommended number of segments will be computed.
X1 Y1 Z1 = Cartesian coordinates of the start point of the linear wire.
X2 Y2 Z2 = Cartesian coordinates of the end point of the linear wire.
Radius = Wire radius.
Fields can be separated by up to two spaces, a single tab, a single comma, or a comma and space. Each GW line, including the last one in a set of linear wires to be imported, must end with an Enter (press Enter in the keyboard for a carriage return). The text lines above the GW lines will be ignored, so comments can be added at the beginning of the file.
The following are equivalent examples:
Write comments here
GW 1 12 5.42 0.38 1.262 5.425 -0.378 1.261 0.01[Enter]
GW 2 5 7.45 0 1.122 7.45 0 1.49 0.015[Enter]
GW 3 2 8.3 0.0 1.12 8.37 0.0 1.595 0.01[Enter]
Write comments here
GW1,12,5.42,0.38,1.262,5.425,-0.378,1.261,0.01[Enter]
GW2,5,7.45,0,1.122,7.45,0,1.49,0.015[Enter]
GW3,2,8.3,0.0,1.12,8.37,0.0,1.595,0.01[Enter]
CM and Other Commands
The CM (comment lines), GH (helical wire), GA (arc), GM (coordinate transformation), GS (scale dimensions), FR (frequency), EX (excitation), LD (load impedances and wire conductivity), EK (exact kernel), RP (radiation pattern), GE (ground connections) and GN (real ground parameters) commands will also be read.
The CM lines will be added to the Note panel of the Setup tabsheet after the NEC file is imported. The comment termination card, “CE”, is not needed in AN-SOF. Comments without the CM command at the beginning of the file will be ignored and not imported. The command names, “CM”, “GW”, “GH”, etc., are reserved words in AN-SOF and they are used to recognize the fields between these commands and the final Enter in each text line, so the command names should not be used in comments.
The rest of the AN-SOF commands must have the following formats, where all the indicated fields are mandatory:
GH – Helix
GH Tag Segments Spacing Length R R R R Radius
[Enter]
Tag > 0. Tag number for the helix. The space between “GH” and Tag is optional. The helix begins at the origin at develops along the positive z-axis. To rotate and/or move the helix, use the GM command described below. This GH command corresponds to the NEC-2 helix specification. Consider that the GH command is different in NEC-4.
Segments = Number of segments for the helix. If a zero is entered, the minimum recommended number of segments will be computed. We must point out that unlike NEC, AN-SOF uses conformal segments that exactly follow the helix contour.
Spacing = Spacing between turns.
Length = Total length of the helix. Length > 0 gives a right-handed helix, and Length < 0 gives a left-handed helix.
R = Radius of the helix (it must appear four times).
Radius = Wire radius.
GA – Arc
GA Tag Segments R Ang1 Ang2 Radius
[Enter]
Tag > 0. Tag number for the arc. The space between “GA” and Tag is optional. The arc is on the xz-plane, and it is centered at the origin, so the arc axis is the y-axis. To rotate and/or move the arc, use the GM command described below.
Segments = Number of segments for the arc. If a zero is entered, the minimum recommended number of segments will be computed. We must point out that unlike NEC, AN-SOF uses conformal segments that exactly follow the arc contour.
R = Arc radius.
Ang1 = Angle of the first end of the arc measured from the x-axis in a left-handed direction about the y-axis, in degrees.
Ang2 = Angle of the second end of the arc, in degrees.
Radius = Wire radius.
GM – Coordinate Transformation
GM 0 N rotX rotY rotZ DX DY DZ 0
[Enter]
N = 0 means that the whole structure above the GM command must be rotated and moved using (rotX,rotY,rotZ) and (DX,DY,DZ). The coordinate transformations are applied sequentially in that order. N = 1 means that the whole structure above the GM command must be copied and the copy must be moved to a new position (DX,DY,DZ) from the origin. The “GM” command can be used below the “GW”, “GH” and “GA” commands for rotating, moving, and copying the desired linear wires, helices and arcs.
rotX = Angle of rotation about X-axis, in degrees.
rotY = Angle of rotation about Y-axis, in degrees.
rotZ = Angle of rotation about Z-axis, in degrees.
DX = Move the structure an amount DX along X-axis.
DY = Move the structure an amount DY along Y-axis.
DZ = Move the structure an amount DZ along Z-axis.
GS – Scale Structure Dimensions
GS 0 0 Scale
[Enter]
Scale = Scaling factor. All structure dimensions, including wire radii, are multiplied by Scale.
FR – Frequencies
FR Type Num 0 0 Freq Df
[Enter]
Type = Type of frequency sweep. Linear -> Type = 0, Log -> Type = 1.
Num = Number of frequency steps.
Freq = Frequency in MHz or starting frequency in a range.
Df = If Type = 0, it is the frequency stepping increment in MHz. If Type = 1, it is the multiplication factor of a log sweep.
EX – Excitation
EX Type Wire# Seg# 0 Real Imag
[Enter]
Type = Type of source. Set Type = 0 or 5 (the “5” being an old source model only used in NEC) for a voltage source. Set Type = 6 for a current source. Since current sources must have a non-zero internal impedance in parallel with the source, AN-SOF will set an internal impedance of 1E6 Ohm.
Wire# = Wire tag number where the source is placed.
Seg# = Segment where the source is placed.
Real = Real part of the source voltage.
Imag = Imaginary part of the source voltage.
LD – Load Impedance
LD Type Wire# Seg# Seg# R L C
[Enter]
Type = Type of load. Only series RLC loads are currently supported, so set Type = 0 for a RLC load. Set Type = 5 and Seg# = 0 to specify a wire conductivity [S/m] in the “R” field for the wire number “Wire#”. Type LD 5 0 0 0 R 0 0 to set a conductivity “R [S/m]” on all wires.
Wire# = Wire tag number where the load or conductivity is placed.
Seg# = Segment tag number where the load is placed. It is a field that appears twice due to a NEC convention that is not used in AN-SOF, so the second Seg# will be ignored. Set Seg# = 0 if a wire conductivity is to be entered.
R = Resistance in Ohms or conductivity in S/m.
L = Inductance in Henries. It is ignored if R is a conductivity; enter a zero.
C = Capacitance in Farads; if none, enter zero. It is ignored if R is a conductivity, so enter a zero.
IS – Insulated Wire
IS 0 Wire# 0 0 Epsilon 0 Radius
[Enter]
Wire# = Wire tag number where the insulation or coating will be applied.
Epsilon = Relative permittivity of the dielectric sheath.
Radius = Radius of the insulating sheath. It must be greater than the wire radius.
GE – Ground Connections
GE Type
[Enter]
Type = 0 -> No ground plane is present. A “GE” command without a type will be interpreted as “GE 0”.
Type = 1 -> A PEC ground plane is placed at z = 0 and wires ending on the ground plane will be connected to the ground. If a real ground plane has been chosen, Type = 1 means that the wire connections to the ground must be considered as zero-Ohm connections.
Type = -1 -> The wire connections to the ground are imperfect and producing power losses when a real ground plane has been chosen.
GN – Real Ground
GN Type Screen 0 0 Epsilon Sigma Length WireRadius
[Enter]
Type = type of ground plane.
Type = -1 -> Free space simulation; all ground parameters are ignored. “GN -1” can be used in this case.
Type = 0 -> Reflection Coefficients/Asymptotic option.
Type = 1 -> PEC ground plane at z = 0; the other parameters are ignored. “GN 1” can be used in this case.
Type = 2 -> Sommerfeld-Wait/Asymptotic option.
Screen = Number of radials in a radial wire ground screen. Set Screen = 0 if no ground screen is present.
Epsilon = Ground plane relative permittivity or dielectric constant.
Sigma = Ground plane conductivity in [S/m].
Length = Length of radial wires if a radial wire ground screen is used. Enter a zero if no ground screen is used.
WireRadius = Radius of radial wires if a screen is used. Enter a zero if no ground screen is used.
RP – Radiation Pattern
RP 0 Ntheta Nphi 1001 Theta Phi Dtheta Dphi R
[Enter]
Ntheta = Number of values of Θ at which the field is to be computed.
Nphi = Number of values of φ at which the field is to be computed.
1001 = It is a NEC variable which indicates that the average power gain must be computed. This value will be ignored since AN-SOF always computes the average power gain.
Theta = Initial Θ angle in degrees.
Phi = Initial φ angle in degrees.
Dtheta = Increment for Θ in degrees.
Dphi = Increment for φ in degrees.
R = Radial distance in meters of the field point from the origin. R = 0 is taken as R = 1 m.
Review the definitions of Θ (Theta) and φ (Phi) in this link >, as well as the precaution to be taken when there is a ground plane.
EK – Exact Kernel
EK
[Enter]
This command forces the use of the Exact Kernel in case this option is disabled. Note that AN-SOF has the Exact Kernel enabled by default.
DXF Format
The DXF file format is a standard format for storing CAD (Computer Aided Design) geometrical data as ASCII text lines.
Only DXF files containing LINE objects can be imported into AN-SOF. The structure of a LINE entity is as follows, where only the (X,Y,Z) coordinates of the starting and ending points are read:
LINE
8 // Subclass marker. Not read
0 // Thickness (default = 0). Not read
10 // Starting point – 10, 20, 30 are tags – Not read
-0.5000 // X value
20 // Not read
-0.5000 // Y value
30 // Not read
1.000 // Z value
11 // Ending point – 11, 21, 31 are tags – Not read
0.5000 // X value
21 // Not read
-0.5000 // Y value
31 // Not read
1.000 // Z value
0 // Extrusion direction (default = 0) – Not read
Since LINE objects have zero thickness, AN-SOF will set a wire radius equal to 0.5% of the wire length. The LINE coordinates in the DXF file are in meters. AN-SOF will also set the number of segments for each wire according to the operating frequency, so it is recommended to set the frequencies before importing the DXF file. Wire radii and the number of segments can be modified after importing the DXF file using the Modify command > in the main menu.
Download examples of DXF files to import into AN-SOF >
MM Format
One linear wire per line must be defined as follows:
X1,[TAB]Y1,[TAB]Z1,[TAB]X2,[TAB]Y2,[TAB]Z2,[TAB]Radius,[TAB]Segments
[Enter]
X1 Y1 Z1 = Cartesian coordinates of the wire start point.
X2 Y2 Z2 = Cartesian coordinates of the wire end point.
Radius = Wire radius.
Segments = Number of segments.
The last text line must end with an Enter (press Enter in the keyboard for a carriage return).
Example:
5.42, 0.38, 1.262, 5.425, -0.378, 1.261, 0.01, 12
7.45, 0, 1.122, 7.45, 0, 1.49, 0.015, 5
8.3, 0.0, 1.12, 8.37, 0.0, 1.595, 0.01, 2
[Enter]
In the MM format, automatic segmentation of a wire can be obtained by entering any number equal or less than zero as the number of segments. The units for the coordinates of the start and end points of any wire must be consistent with the length unit chosen in the AN-SOF Preferences dialog box. Also, the wire radius or diameter of any imported wire must be expressed in the unit chosen in the Preferences > dialog box.