Videos > Importing External Electromagnetic Near Field Data into ANSYS HFSS
Jan 3, 2025

Importing External Electromagnetic Near Field Data into ANSYS HFSS

Hello, this is Ibrahim Nassar with OZEN Engineering. In this demo, we'll show you how to import new field 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.

Required Files

To import new fields, the user needs two files:

  • A file containing the new field data.
  • A .and file, which is a descriptor file that describes the new field data, the location of the file, and the number of files to import.

Demo Overview

In this demo, I will be using a horn antenna design. The horn antenna design is generated by the antenna toolkit. We will go through the process of exporting the new field data and then importing it to set up the simulation.

Exporting New Field Data

  1. Create a new field setup by right-clicking on Radiation and selecting Insert New Field Setup.
  2. Choose to calculate the new field on a line or rectangle. In this demo, a rectangle is used.
  3. Specify the size of the rectangle in the U and V directions and the number of points to be calculated.
  4. Define the coordinate system to determine the location of the rectangle. For this demo, it's at the bottom of the horn.
  5. To export the new field data, right-click on the new field setup, select Compute Max Parameters, and then Export Fields.
  6. Change the file extension to .nfd for the near field data file.
  7. If the .and file is not already created, export it along with the near field data.

Understanding the Files

The .nfd file contains:

  • X, Y, Z locations.
  • Real and imaginary parts of the electric and magnetic fields.
  • Optionally, electric current (J) and magnetic current (M).

The .and file, the ANSYS near field descriptor file, includes:

  • Field type (e.g., near field data, .nfd).
  • Fields being imported (e.g., E, H).
  • Geometry type (e.g., plane, box, cylinder).
  • Center location and size of the geometry.
  • Normal directions of the field.
  • Frequency of the near fields.
  • Coordinate system (e.g., Cartesian, cylindrical, spherical).
  • Reference to the .nfd file.

Importing Near Fields

  1. Insert an HFSS design by going to Project > Insert HFSS Design.
  2. To create near field excitations, right-click on Excitations, select Assign, and choose Near Linked Fields.
  3. Select External Data Design for importing external data.
  4. Specify the coordinate system for the excitation location and click Create Design.
  5. Import the .and file, which provides details for the simulation setup and refers to the .nfd file.
  6. Select the boundary type for simulating the near fields (e.g., radiation, finite element boundary integral, PML).

Simulation Setup

HFSS processes the .and file and creates a new design with the simulation setup ready to simulate the near fields. The setup includes:

  • Geometry description (e.g., a plane with specified size and thickness).
  • An air box enclosing the plane with a radiation boundary.
  • An analysis setup with a solution frequency (e.g., 10 GHz).

Comparing Results

To compare the original and imported field data:

  1. Create a 3D polar plot for the original horn design to observe the directivity.
  2. Create a similar plot for the imported near-field data in HFSS Design 2.
  3. Note any differences in directivity, which may be due to export settings and can be adjusted for accuracy.

This concludes the demo. Thank you for watching.

[This was auto-generated. There may be mispellings.]

Hello, this is Ibrahim Nassar with OZEN Engineering. In this demo, we'll show you how to import new field 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.

To import new fields, the user would need two files: a file that contains the new field data and a descriptor file (.and) that describes the new field data and the location of the file and the number of files that you want to import. In this demo, I will be using this horn antenna design.

The horn antenna design is a process generated by the antenna toolkit to go over the process first of exporting the new field data and then importing it and showing you how to set up the simulation.

To export the new field data, first, you have to create a new field setup by right-clicking on Radiation, Insert New Field Setup, and then you have these options. You can calculate the new field on the line or rectangle. Here, we already created a new field rectangle.

Once I select it, you see the area where I want to calculate the new field is highlighted. So you want to calculate the new field on this rectangle. The user here can provide the size of the rectangle in the U direction and the V direction and the number of points that need to be calculated.

And then you can specify the coordinate system to determine the location of this rectangle. So here it is defined to be at the bottom of the horn. And if we click OK here. Now, to export the new field data, you can right-click on the new field setup and select Compute Max Parameters.

And now we can click on Export Fields. Now, we have the new field setup. To export the near field and be able to import it, you need to change the file extension to .nfd. So the .nfd file will have the near field data, the location, and the near field values.

And to be able again to import it, you need another file, which is the .and file. So if you don't have it already created, you can select here to export it with the near field data.

And then if the users already have near field data, he can use this .and file and just adjust it to refer to the new file. So let's select Save and hit Yes. And we can click OK. Now let's open the files that were generated. Let's look first at the .nfd.

And we can see that it's already in the .nfd file. You can open it with an Excel file or you can open it with a notepad. So this is the .nfd file, which again contains the near field data. It has the x, y, z locations.

Then it lists the real and imaginary part of the electric field at the x location, then the y location, then the z location. And similarly for the magnetic field. It can also contain j, the electric current, the m, the magnetic current, and both of them can only contain electric field.

It can also contain the magnetic field by itself. The second file that's needed to be able to import the fields is the .and file, which is again the ANSYS near field descriptor file. This is the format of the .and file. It can start with this header here.

Then you specify basically the type of the fields that you're importing. In this case, it's a near field data, .nfd. And then you specify the fields that you are importing. In this case, we're importing e and h, so we list it as e, h. You can have e only, h only.

You can have j for the electric current, m for the magnetic current, and j, m for both of them. Then you specify the geometry. In this case, it's a plane. It can be a plane. It can be a box. It can be a cylinder. Then you specify the center location. In this case, it's at the origin.

Then you specify the size of the plane. So here it's 2.7 inches by 2.3 inches as we specified in the near field setup. Then you specify the normal directions of the field. So in our case, the horn is pointing in the negative z direction, so we can change this to minus one.

Then you specify the frequency where the near fields are generated at. Then you specify the coordinate system, if it's Cartesian or cylindrical or spherical. Then you point to the .nfd file by providing the name and the extension.

And in this case, since they both are located at the same location, so we don't need to provide the full extension. To import the near fields, we can basically insert first an HFSS design by going to Project, Insert HFSS Design. So we inserted HFSS design one.

To create a near field excitation, we can right-click on Excitations, Assign, and select Near Linked Fields. And in this case, it's a near field setup. In our case, we want to import external data, so we select External Data Design.

You specify the coordinate system where you want the excitation to be located at, and then you click on Create Design. Here, we have to import basically the .and file that provides all the details we need for the simulation setup and refer to the .nfd file that we need to import.

So let's select the .and file. And then here, we have the option to select the boundary type that is going to be used to simulate the near fields. So you have Radiation, Finite Element Boundary Integral, and the PML. So let's select Radiation in this case. And we hit Open. And we click OK.

So as you see, HFSS has a script in the background, treats the .and file, and creates a new design, in this case HFSS design 2, and has the simulation setup ready to simulate these near fields. So let's see what was created here. So it created geometry.

Basically here, is the red box we see, which basically describes the plane that we defined. So if we click on Create Box, we see the size of the plane as we described it, and it provides some thickness to it.

And also, it created an air box that encloses this plane with a radiation boundary to simulate. It also created the analysis setup with a solution frequency of 10 gigahertz, same as was provided on the .and file. So now let's simulate this file.

And while it's solving, so we created the excitation on HFSS Design 1, here where we basically place the other geometry that we want to simulate with this near-field excitation. So this is the near-field excitation, which basically has the same excitation as the other geometry.

So this is the near-field excitation. It has a link to HFSS Design 2 to read the files from HFSS Design 2. So this design has the excitation that refers to HFSS Design 2 that has the near-field data with the simulation setup to read the files from there.

So now if we go back to HFSS Design 2, it has this excitation that basically reads the file that we specified here. So now let's look at the original fields in the horn design. So let's look at the 3D polar plot.

Let's create far-field 3D polar plot and look at the directivity and compare it to the imported data.

So this is the 3D polar plot with the maximum directivity of about 13. 15. And now let's see the simulated pattern of the imported near-field in HFSS Design 2. So let's try to click on Results, Create Far-Field Report, 3D Polar Plot, and let's select Directivity in dB and click on New Report.

So as we see, the radiation pattern is similar to the radiation pattern generated by the original horn design. There's some delta to the directivity.

This has to do with the way we exported the near-fields, and it also can be adjusted by changing the settings in the analysis setup to improve the accuracy. We also see that the radiation pattern is pointing in the negative Z direction, as we specified that in the .and file.

So we can define here since we have it pointing in the negative Z direction. This concludes this demo, and thank you for watching.