Skip to main content

Overview

This blog illustrates how to import electromagnetic near fields data into ANSYS HFSS. Users may need to import fields whether calculated analytically, measured, generated by another tool, or received from a provider and use them as a realistic excitation to perform different types of analysis. Below is a brief overview of the import process and a full demonstration is provided in the video link. 

For defining simple-primitive near field source, HFSS uses two kinds of external data files. First, the actual location/field data is stored in .nfd format. Second, the Ansys Near field Descriptor file (.and file) stores the general geometry information and paths of .nfd data. Adding an external near field link to HFSS design is therefore a two-steps workflow. During excitation setup, an external near field design (that is, a design with a box representing mesh points) is created based on information in a .and file and linked to target design. During simulation, external near field design acquires mesh points and field from .nfd file based on specific frequency the target design asks for.

Step1: Generating Near Field Data File

The .nfd file can be generated based on field data whether calculated analytically, measured, generated by another tool, or received from a provider. The .nfd file format should contain the actual location/field data as below:

#Index, X, Y, Z, Ex(real, imag), Ey(real, imag), Ez(real, imag), Hx(real, imag), Hy(real, imag), Hz(real, imag) if the file describe E and H data. More information about the file format can be found on the ANSYS help documentation.

Users can also generate the *.nfd file from a solved HFSS design with near fields using the following steps:

1) Right-click the previously created near-field Sphere or Line1 under Radiation as shown below.

2) Select Compute Max Parameters.

3) The Max Field Data dialog box appears for the selected Line or Sphere as shown below.

4) Click Export Fields and save the file in the .nfd format.

Users can use an *.and file to refer to one or more *.nfd files to describe near fields.

Step2 Preparing the ANSYS Near Field Description File 

The data file that the user can select when trying to create a "Linked Near Field" excitation using external data of the Incident Wave Source dialog box is in the *.and format. The purpose of the Ansys Near Field Description (AND) file is to facilitate the auto-generation of HFSS design for any near field data the user may wish to use for an HFSS simulation. These Near Field Data files could be in a variety of different formats and files, so the AND format was designed to be as flexible as possible to accommodate them.

The *.and file describes the location and contents of one or more near field data files which are in the *.nfd format. If no units are specified for spherical, cylindrical, or Cartesian coordinates, the *.nfd files use SI units of radians and meters respectively. You can append units, such as mm or deg, as needed for each coordinate value. An example of a *.and file is shown below; 

$begin 'NearFieldHeader'
type='nfd'
fields='EH'
geometry='plane'
center='0mm,0mm,0mm'
size='0.06858meter,0.05842meter'
normal='0,0,-1'
fsweep='10.0GHz'
$end 'NearFieldHeader'
 
$begin 'NearFieldData'
FreqData("10.0GHz","exportfields_Horn2.nfd")
$end 'NearFieldData'
 
Every AND file requires a NearFieldHeader block shown below. This header is used to provide information to HFSS about the near field data that may not be present in the data files themselves.
 
 
  • Supported 'format type':
    • "nfd" - HFSS External Near Field Data File generated by exporting Fields.
  • Supported 'field type':
    • "EH" - Both E and H incident fields are provided. (Default)
    • "E" - Only E Fields are provided.
    • "H" - Only H Fields are provided.
    • "JM" - Both J and M Tangential Currents are provided.
    • "J" - Only J Current is provided.
    • "M" - Only M Current is provided.
  • Supported 'primitive type':
    • ""sphere" - Spherical Geometry requiring center, radius.
    • ""box" - Cube Geometry requiring center, size. Must be axis aligned.
    • ""cylinder" - Cylinder Geometry requiring center, axis, radius, height. Must be axis aligned.
    • ""plane" - Pseudo-Plane Geometry requiring center, normal, size. Must be axis aligned. Plane data is really treated as a Rectangle so a two dimensional size must be specified.
  • Supported 'fcoords type':
    • "cartesian" - Data Points are described using cartesian coordinates.
    • "spherical" - Data Points are formatted using spherical coordinates.
    • "cylindrical" - Data Points are formatted using cylindrical coordinates.
  • The Coordinate System Type is optional and will default to the corresponding system for that primitive type ("spherical" for Spheres, "cylindrical" for Cylinders, "cartesian" for Box/Plane).

Step3: Assigning the Excitation

Presupposing that you have prepared the *.and and .nfd files:
1. Go to HFSS>Excitations>Assign>Linked Field>Near Field Wave....

The Incident Wave Source dialog box appears.

2. Select the Create External Data Design radio button to enable the Create Design button.
3. Click Create Design... to browse your computer to access a previously created *.and file.

4) Select the Boundary Type for the auto-generated design, as Radiation, FE-BI or PML (the
default).


5) If necessary, specify the Source Relative Coordinate System on the Near Field Wave
Options panel of the Incident Wave Source dialog box.

Upon a successful source design generation, the datalink setup for the near field incident wave source will be automatically set to the generated source design. This auto-design generation is neither undo-able nor scriptable. This design becomes the source design for external near field. This workflow allows the user to view the external field data via HFSS. Automatically generated design components include:

  • Geometry: the external geometry and a region.
  • Boundaries: your choice of Radiation, FE-BI or PML (the default).
  • Excitations: an External Near Field Data Excitation. This is an excitation type for user defined external near field.
  • The padding ratio is the same as open region.
  • A default solve setup is created with the adaptive frequency set to the highest frequency in the external data
  • A discrete frequency sweep is created if multiple frequencies are present in the External Data.

6) When you run the Analysis of your target design, it uses this newly created source design
for the Near Fields.

A complete demonstration of this work flow is shown in the video link below:

 

Post by Ibrahim Nassar
January 2, 2025