SBR+: HFSS to SBR+ time animation#

This example shows how you can use PyAEDT to create an SBR+ time animation and save it to a GIF file. This example works only on CPython.

Perform required imports.#

Perform requried imports.

import os
from pyaedt import Hfss, examples

Set non-graphical mode#

Set non-graphical model. "PYAEDT_NON_GRAPHICAL" is needed to generate documentation only. You can set non_graphical either to True or False.

non_graphical = os.getenv("PYAEDT_NON_GRAPHICAL", "False").lower() in ("true", "1", "t")

Launch AEDT and load project#

Launch AEDT and load the project.

project_file = examples.download_sbr_time()

hfss = Hfss(project_file, specified_version="2022.2", non_graphical=non_graphical, new_desktop_session=True)


Get solution data#

Get solution data. After simulation is performed, you can load solutions in the solution_data object.

solution_data =["NearEX", "NearEY", "NearEZ"],
                                            variations={"_u": ["All"], "_v": ["All"], "Freq": ["All"]},
                                            report_category="Near Fields")

Compute IFFT#

Compute IFFT (Inverse Fast Fourier Transform).

t_matrix = solution_data.ifft("NearE", window=True)

Export IFFT to CSV file#

Export IFFT to a CSV file.

frames_list_file = solution_data.ifft_to_file(coord_system_center=[-0.15, 0, 0], db_val=True,
                                              csv_dir=os.path.join(hfss.working_directory, "csv"))

Plot scene#

Plot the scene to create the time plot animation., os.path.join(hfss.working_directory, "animation.gif"), norm_index=15, dy_rng=35,

SBR Time Plot

Total running time of the script: ( 1 minutes 28.465 seconds)

Gallery generated by Sphinx-Gallery