.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples\00-EDB\14_edb_create_parametrized_design.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_00-EDB_14_edb_create_parametrized_design.py: EDB: parameterized design ------------------------ This example shows how to 1, Create an HFSS simulation project using SimulationConfiguration class. 2, Create automatically parametrized design. .. GENERATED FROM PYTHON SOURCE LINES 9-16 Final expected project ~~~~~~~~~~~~~~~~~~~~~~ .. image:: ../../_static/parametrized_design.png :width: 600 :alt: Fully automated parametrization. ##################################################################### .. GENERATED FROM PYTHON SOURCE LINES 19-23 Create HFSS simulatio project ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Load an existing EDB folder. ##################################################################### .. GENERATED FROM PYTHON SOURCE LINES 23-35 .. code-block:: default import os import pyaedt project_path = pyaedt.generate_unique_folder_name() target_aedb = pyaedt.downloads.download_file('edb/ANSYS-HSD_V1.aedb', destination=project_path) print("Project folder will be", target_aedb) aedt_version = "2023.2" edb = pyaedt.Edb(edbpath=target_aedb, edbversion=aedt_version) print("EDB is located at {}".format(target_aedb)) .. rst-class:: sphx-glr-script-out .. code-block:: none Project folder will be D:\Temp\pyaedt_prj_9W0\edb/ANSYS-HSD_V1.aedb EDB is located at D:\Temp\pyaedt_prj_9W0\edb/ANSYS-HSD_V1.aedb .. GENERATED FROM PYTHON SOURCE LINES 36-38 Create SimulationConfiguration object and define simulation parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 38-49 .. code-block:: default simulation_configuration = edb.new_simulation_configuration() simulation_configuration.signal_nets = ["PCIe_Gen4_RX0_P", "PCIe_Gen4_RX0_N", "PCIe_Gen4_RX1_P", "PCIe_Gen4_RX1_N"] simulation_configuration.power_nets = ["GND"] simulation_configuration.components = ["X1", "U1"] simulation_configuration.do_cutout_subdesign = True simulation_configuration.start_freq = "OGHz" simulation_configuration.stop_freq = "20GHz" simulation_configuration.step_freq = "10MHz" .. GENERATED FROM PYTHON SOURCE LINES 50-52 Build simulation project ~~~~~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 52-55 .. code-block:: default edb.build_simulation_project(simulation_configuration) .. rst-class:: sphx-glr-script-out .. code-block:: none True .. GENERATED FROM PYTHON SOURCE LINES 56-58 Generated design parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 58-63 .. code-block:: default edb.auto_parametrize_design(layers=True, materials=True, via_holes=True, pads=True, antipads=True, traces=True) edb.save_edb() edb.close_edb() .. rst-class:: sphx-glr-script-out .. code-block:: none True .. GENERATED FROM PYTHON SOURCE LINES 64-66 Open project in AEDT ~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 66-70 .. code-block:: default # Uncomment the following line to open the design in HFSS 3D Layout # hfss = pyaedt.Hfss3dLayout(projectname=target_aedb, specified_version=aedt_version, new_desktop_session=True) # hfss.release_desktop() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 6.953 seconds) .. _sphx_glr_download_examples_00-EDB_14_edb_create_parametrized_design.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 14_edb_create_parametrized_design.py <14_edb_create_parametrized_design.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 14_edb_create_parametrized_design.ipynb <14_edb_create_parametrized_design.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_