How Can We Help?

Search for answers or browse our Knowledge Base.

Guides | Models | Validation | Blog

Print

Importing Wires

Supported Formats

To import wires from an external file into AN-SOF, follow these steps:

  1. Navigate to File > Import Wires in the main menu.
  2. A sub-menu with four options will be displayed: AN-SOF, NEC, DXF, and MM formats.
  3. Note that DXF and MM formats should contain only linear wires in ASCII text format.

AN-SOF Format

Wires can be imported into the AN-SOF workspace from another AN-SOF project. When a project is saved, a corresponding file with a .wre extension is created in the same directory. This file, named after the project, contains the geometrical description of all wires within the project. For details on files generated during project saves, refer to File Formats.

To import wires into your project, navigate to the main menu and select File > Import Wires > AN-SOF Format. Then, choose the specific .wre file you wish to import. You can import multiple .wre files, one at a time, as needed.

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, originally designed for data entry using punch cards, some fields appear repeating, and others must be entered with a zero, having 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 (refer to section “12.8 Running a Bulk Simulation”). 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: Tag number for the linear wire (Tag > 0). 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 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 on 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 following commands: CM (comment lines), GH (helical wire), GA (arc), GM (coordinate transformation), GS (scale dimensions), GE (ground connections), GN (real ground parameters), TL (transmission line), LD (load impedances and wire conductivity), IS (insulated wire), FR (frequency), EX (excitation), EK (exact kernel), and RP (radiation pattern), will also be read.

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 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 in NEC format are listed below, where all the indicated fields are mandatory.

GH – Helix

The GH command is used to define a helix in AN-SOF with the following syntax:

GH Tag Segments Spacing Length R R R R Radius

[Enter]

Tag: A positive number representing the tag for the helix. The space between “GH” and the Tag is optional. Note that the helix begins at the origin and develops along the positive z-axis. To adjust the helix’s position or rotation, use the GM command described below. It’s important to mention that the GH command differs in NEC-4.

Segments: The number of segments for the helix. If zero is entered, AN-SOF will compute the minimum recommended number of segments. Unlike NEC, AN-SOF uses conformal segments that precisely follow the helix contour.

Spacing: Spacing between turns.

Length: Total length of the helix. A positive Length value results in a right-handed helix, while a negative Length value produces a left-handed helix. 

R: Radius of the helix (repeated four times).

Radius: Wire radius.

Note: AN-SOF uses conformal segments that exactly follow the helix contour, distinguishing it from NEC.

GA – Arc

The GA command is utilized to define an arc in AN-SOF with the following syntax:

GA Tag Segments R Ang1 Ang2 Radius

[Enter]

Tag: A positive number serving as the tag for the arc. The space between “GA” and the Tag is optional. The arc is situated on the xz-plane, centered at the origin, making the y-axis the axis of the arc. To manipulate the position or rotation of the arc, use the GM command described below.

Segments: The number of segments for the arc. If zero is entered, AN-SOF will compute the minimum recommended number of segments. It’s worth noting that, unlike NEC, AN-SOF uses conformal segments that precisely follow the arc contour.

R: Arc radius.

Ang1: The angle of the first end of the arc measured from the x-axis in a left-handed direction about the y-axis, given in degrees. 

Ang2: The angle of the second end of the arc, measured in degrees.

Radius: Wire radius.

Note: AN-SOF uses conformal segments that exactly follow the arc contour, distinguishing it from NEC.

GM – Coordinate Transformation

The GM command in AN-SOF facilitates coordinate transformations with the following syntax:

GM 0 N rotX rotY rotZ DX DY DZ 0

[Enter]

N: If N is set to 0, it implies that the entire structure above the GM command must undergo rotation and translation based on the specified values for (rotX, rotY, rotZ) and (DX, DY, DZ). The coordinate transformations are applied sequentially in that order. If N is set to 1, it indicates that the structure above the GM command must be copied, and the copy should be moved to a new position (DX, DY, DZ) from the origin. You can use the “GM” command below the “GW,” “GH,” and “GA” commands to rotate, move, and copy linear wires, helices, and arcs as needed.

rotX: Angle of rotation about the X-axis, specified in degrees.

rotY: Angle of rotation about the Y-axis, specified in degrees.

rotZ: Angle of rotation about the Z-axis, specified in degrees.

DX: Translation along the X-axis, moving the structure by an amount DX.

DY: Translation along the Y-axis, moving the structure by an amount DY.

DZ: Translation along the Z-axis, moving the structure by an amount DZ.

GS – Scale Structure Dimensions

The GS command in AN-SOF is used for scaling structure dimensions. The syntax is as follows:

GS 0 0 Scale

[Enter]

Scale: This represents the scaling factor. Applying this command results in the multiplication of all structure dimensions, including wire radii, by the specified scale value.

GE – Ground Connections

The GE command in AN-SOF is used for defining ground connections. The syntax is as follows:

GE Type

[Enter]

Type = 0: No ground plane is present. If a “GE” command is used without specifying a type, it 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 indicates 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 produce power losses when a real ground plane has been chosen.

GN – Real Ground

The GN command in AN-SOF is used for defining real ground parameters. The syntax is as follows:

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; 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 zero if no ground screen is used.

WireRadius: Radius of radial wires if a screen is used. Enter zero if no ground screen is used.

TL – Transmission Line

The TL command in AN-SOF is used to define a transmission line. The syntax is as follows:

TL Tag1 Seg1 Tag2 Seg2 Zc Length Y1r Y1i Y2r Y2i

[Enter]

Tag1: Wire tag number to which the first port of the transmission line connects.

Seg1: Segment number of wire Tag1 to which the first port of the transmission line connects.

Tag2: Wire tag number to which the second port of the transmission line connects.

Seg2: Segment number of wire Tag2 to which the second port of the transmission line connects.

Zc: Characteristic impedance of the transmission line in Ohms. A negative Zc can be entered to set a “crossed” transmission line with a 180° phase reversal relative to the reference directions of the segments. The characteristic impedance of the line is |Zc|.

Length: Length of the transmission line in meters. If Length = 0, the linear distance between the transmission line ports will be considered as the length for the line. To simulate a zero-length transmission line, enter 1E-10.

Y1r: Real part of the shunt admittance across end one of the transmission line [S].

Y1i: Imaginary part of the shunt admittance across end one of the transmission line [S].

Y2r: Real part of the shunt admittance across end two of the transmission line [S].

Y2i: Imaginary part of the shunt admittance across end two of the transmission line [S].

Refer to Adding Transmission Lines for a review of considerations when setting transmission lines, including advanced settings not available with the TL command.

LD – Load Impedance

The LD command in AN-SOF is used to define a load impedance. The syntax is as follows:

LD Type Wire# Seg# Seg# R L C

[Enter]

Type: Type of load. Series RLC loads, fixed impedances R+jX, and wire conductivity can be set.

  • Set Type = 0 for a series RLC load.
  • Set Type = 4 for a fixed impedance R+jX. The reactance “X” must be entered in the position of “L” (the “C” field will be ignored). The reactance is fixed, so it does not scale with frequency.
  • Set Type = 5 and Seg# = 0 to specify a wire conductivity [S/m] in the “R” field for the wire number “Wire#”. Use the command LD 5 0 0 0 R 0 0 to set a conductivity “R [S/m]” on all wires. “LD 5” command for setting wire conductivity must be below all “LD 0” and “LD 4” lines.

Wire#: Wire tag number where the load or conductivity is placed.

Seg#: Segment number where the load is placed. Note that it appears twice due to a NEC convention 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 when Type = 0, or reactance in Ohms when Type = 4 (it does not scale with frequency). The “L” field is ignored if R is a conductivity, so a zero can be entered.

C: Capacitance in Farads; if none, enter zero. It is ignored if R is a conductivity, so enter zero.

IS – Insulated Wire

The IS command in AN-SOF is used to define an insulated wire. The syntax is as follows:

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. Ensure it is greater than the wire radius.

FR – Frequencies

The FR command in AN-SOF is used to specify frequencies for simulations. The syntax is as follows:

FR Type Num 0 0 Freq Df

[Enter]

Type: Type of frequency sweep. For a linear sweep, set Type = 0; for a logarithmic sweep, set Type = 1.

Num: Number of frequency steps.

Freq: Frequency in MHz or starting frequency in a range.

Df: If Type = 0, it represents the frequency stepping increment in MHz. If Type = 1, it is the multiplication factor for a logarithmic sweep.

EX – Excitation

The EX command in AN-SOF is used to define excitation sources for simulations. The syntax is as follows:

EX Type Wire# Seg# 0 Real Imag

[Enter]

Type: Type of source. Use Type = 0 or 5 (the “5” corresponds to an old source model used in NEC) for a voltage source. Set Type = 6 for a current source. Note that current sources in AN-SOF automatically have a non-zero internal impedance set in parallel with the source (1E6 Ohm).

Wire#: Wire tag number where the source is placed.

Seg#: Segment where the source is located.

Real: Real part of the source voltage or current.

Imag: Imaginary part of the source voltage or current.

EK – Exact Kernel

The EK command in AN-SOF is used to force the use of the Exact Kernel. The syntax is as follows:

EK

[Enter]

This command ensures that the Exact Kernel is utilized, even if this option is disabled. It’s important to note that AN-SOF has the Exact Kernel enabled by default.

RP – Radiation Pattern

The RP command in AN-SOF is used to set the radiation pattern parameters. The syntax is as follows:

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.

(Note: The value “1001” is a NEC variable and 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.

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

// 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.

Table of Contents