diff --git a/examples/07-SBR+/_static/car_w_pedestrians.png b/doc/source/_static/thumbnails/car_w_pedestrians.png similarity index 100% rename from examples/07-SBR+/_static/car_w_pedestrians.png rename to doc/source/_static/thumbnails/car_w_pedestrians.png diff --git a/doc/source/_static/thumbnails/components.png b/doc/source/_static/thumbnails/components.png new file mode 100644 index 000000000..a644387cc Binary files /dev/null and b/doc/source/_static/thumbnails/components.png differ diff --git a/doc/source/_static/thumbnails/electrothermal.png b/doc/source/_static/thumbnails/electrothermal.png new file mode 100644 index 000000000..0f8fc3962 Binary files /dev/null and b/doc/source/_static/thumbnails/electrothermal.png differ diff --git a/examples/10-EMIT/_static/emit_simple_cosite.png b/doc/source/_static/thumbnails/emit_simple_cosite.png similarity index 100% rename from examples/10-EMIT/_static/emit_simple_cosite.png rename to doc/source/_static/thumbnails/emit_simple_cosite.png diff --git a/doc/source/_static/thumbnails/external_circuit.png b/doc/source/_static/thumbnails/external_circuit.png new file mode 100644 index 000000000..f1f73bdfe Binary files /dev/null and b/doc/source/_static/thumbnails/external_circuit.png differ diff --git a/doc/source/_static/thumbnails/interference_type.png b/doc/source/_static/thumbnails/interference_type.png new file mode 100644 index 000000000..0e38b4d59 Binary files /dev/null and b/doc/source/_static/thumbnails/interference_type.png differ diff --git a/doc/source/_static/thumbnails/lumped_filter.png b/doc/source/_static/thumbnails/lumped_filter.png new file mode 100644 index 000000000..b97f4f0ae Binary files /dev/null and b/doc/source/_static/thumbnails/lumped_filter.png differ diff --git a/doc/source/_static/thumbnails/modeler.png b/doc/source/_static/thumbnails/modeler.png new file mode 100644 index 000000000..6f3c1a73a Binary files /dev/null and b/doc/source/_static/thumbnails/modeler.png differ diff --git a/examples/11-twin_builder/_static/rectifier.png b/doc/source/_static/thumbnails/rectifier.png similarity index 100% rename from examples/11-twin_builder/_static/rectifier.png rename to doc/source/_static/thumbnails/rectifier.png diff --git a/doc/source/_static/thumbnails/rmxpert.png b/doc/source/_static/thumbnails/rmxpert.png new file mode 100644 index 000000000..1a930682b Binary files /dev/null and b/doc/source/_static/thumbnails/rmxpert.png differ diff --git a/doc/source/_static/thumbnails/touchstone.png b/doc/source/_static/thumbnails/touchstone.png new file mode 100644 index 000000000..800e5d685 Binary files /dev/null and b/doc/source/_static/thumbnails/touchstone.png differ diff --git a/doc/source/conf.py b/doc/source/conf.py index 1db8610d2..d20a83a49 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -36,13 +36,13 @@ BRANCH = "main" DOC_PATH = "doc/source" - project = "pyaedt-examples" copyright = f"(c) 2021 - {datetime.datetime.now().year} ANSYS, Inc. All rights reserved" author = "Ansys Inc." cname = os.getenv("DOCUMENTATION_CNAME", "nocname.com") release = version = "0.1.dev0" + # -- Connect functions (hooks) to Sphinx events ----------------------------- class PrettyPrintDirective(Directive): @@ -127,7 +127,7 @@ def copy_script_examples(app: Sphinx, config: Config): """ destination_dir = Path(app.outdir, "examples").resolve() logger.info(f"Copying script examples into out directory {destination_dir}.") - + EXAMPLES = EXAMPLES_DIRECTORY.glob("**/*.py") for example in EXAMPLES: example_path = str(example).split("examples" + os.sep)[-1] @@ -207,6 +207,7 @@ def skip_gif_examples_to_build_pdf(app: Sphinx): ] ) + def remove_examples(app: Sphinx, exception: None | Exception): """Remove the doc/source/examples directory created during documentation build. @@ -250,13 +251,15 @@ def convert_examples_into_notebooks(app): DESTINATION_DIR = Path(app.srcdir, "examples").resolve() EXAMPLES = EXAMPLES_DIRECTORY.glob("**/*.py") EXAMPLES_TO_NOT_EXECUTE = ( - "03_gui_manipulation.py", - "05_electrothermal.py", + "template.py", + "gui_manipulation.py", + "electrothermal.py", # TODO: Remove the following example when 2025.1 is released, currently the latest version is 24.1. - "Lumped_Element_Response.py", + "lumped_element.py", # TODO: Remove once EMIT examples are moved into extensions. - "ComputeInterferenceType.py", - "interference_gui.py", + "interference_type.py", + "interference.py", + "hfss_emit.py", ) # NOTE: Only convert the examples if the workflow isn't tagged as coupling HTML and PDF build. @@ -307,7 +310,7 @@ def setup(app): app.connect("config-inited", check_pandoc_installed) app.connect("config-inited", copy_examples_structure) # Builder inited hooks - app.connect("builder-inited", convert_examples_into_notebooks) + app.connect("builder-inited", convert_examples_into_notebooks) app.connect("builder-inited", skip_gif_examples_to_build_pdf) # Source read hook app.connect("source-read", adjust_image_path) @@ -316,6 +319,7 @@ def setup(app): app.connect("build-finished", remove_doctree) app.connect("build-finished", copy_script_examples) + # -- General configuration --------------------------------------------------- # Add any extension module names here as strings. @@ -381,7 +385,6 @@ def setup(app): copybutton_prompt_text = r">>> ?|\.\.\. " copybutton_prompt_is_regexp = True - # The language for content autogenerated. language = "en" @@ -412,26 +415,38 @@ def setup(app): # Define static thumbnails nbsphinx_thumbnails = { - "examples/01-Modeling-Setup/Configurations": "_static/thumbnails/configuration_file_icepak.png", - "examples/01-Modeling-Setup/CoordinateSystem": "_static/thumbnails/coordinate_system.png", - "examples/01-Modeling-Setup/Polyline_Primitives": "_static/thumbnails/polyline.png", - "examples/02-HFSS/HFSS_FSS_unitcell": "_static/thumbnails/unitcell.png", - "examples/04-Layout/hfss_3d_layout/03_gui_manipulation": "_static/thumbnails/user_interface.png", - "examples/08-Circuit/Circuit_Siwave_Multizones": "_static/thumbnails/multizone.png", - "examples/08-Circuit/Circuit_Subcircuit_Example": "_static/thumbnails/subcircuit.png", - "examples/08-Circuit/Create_Netlist": "_static/thumbnails/netlist.png", - "examples/08-Circuit/Virtual_Compliance": "_static/thumbnails/virtual_compliance_eye.png", - "examples/09-Multiphysics/Circuit_HFSS_Icepak_Coupling": "_static/thumbnails/ring.png", - "examples/09-Multiphysics/Maxwell_Icepak_Wireless_Charging": "_static/thumbnails/charging.png", - "examples/10-EMIT/ComputeInterferenceType": "_static/thumbnails/interference.png", - "examples/10-EMIT/ComputeProtectionLevels": "_static/thumbnails/protection.png", - "examples/10-EMIT/EMIT_Example": "_static/thumbnails/emit.png", - "examples/10-EMIT/EMIT_HFSS_Example": "_static/thumbnails/emit_hfss.png", - "examples/11-twin_builder/static_rom_creation_and_visualization": "_static/thumbnails/static_rom.png", - "examples/12-general/com_analysis": "_static/thumbnails/com_eye.png", - "examples/12-general/convert_model_version": "_static/thumbnails/e3dcomp.png", + "examples/02-aedt_general/configuration_files": "_static/thumbnails/configuration_file_icepak.png", + "examples/02-aedt_general/modeler/index": "_static/thumbnails/modeler.png", + "examples/02-aedt_general/modeler/coordinate_system": "_static/thumbnails/coordinate_system.png", + "examples/02-aedt_general/modeler/polyline": "_static/thumbnails/polyline.png", + "examples/02-aedt_general/modeler/netlist_to_schematic": "_static/thumbnails/netlist.png", + "examples/02-aedt_general/components/index": "_static/thumbnails/components.png", + "examples/02-aedt_general/components/component_conversion": "_static/thumbnails/e3dcomp.png", + "examples/02-aedt_general/report/index": "_static/thumbnails/touchstone.png", + "examples/02-aedt_general/report/virtual_compliance": "_static/thumbnails/virtual_compliance_eye.png", + "examples/03-high_frequency/antenna/fss_unitcell": "_static/thumbnails/unitcell.png", + "examples/03-high_frequency/antenna/large_scenarios/index": "_static/thumbnails/car_w_pedestrians.png", + "examples/03-high_frequency/antenna/interferences/index": "_static/thumbnails/emit_simple_cosite.png", + "examples/03-high_frequency/antenna/interferences/antenna": "_static/thumbnails/emit.png", + "examples/03-high_frequency/antenna/interferences/hfss_emit": "_static/thumbnails/emit_hfss.png", + "examples/03-high_frequency/antenna/interferences/interference": "_static/thumbnails/interference.png", + "examples/03-high_frequency/antenna/interferences/protection": "_static/thumbnails/protection.png", + "examples/03-high_frequency/antenna/interferences/interference_type": "_static/thumbnails/interference_type.png", + "examples/03-high_frequency/emc/subcircuit": "_static/thumbnails/subcircuit.png", + "examples/03-high_frequency/radiofrequency_mmwave/lumped_element": "_static/thumbnails/lumped_filter.png", + "examples/03-high_frequency/layout/signal_integrity/com_analysis": "_static/thumbnails/com_eye.png", + "examples/03-high_frequency/layout/signal_integrity/multizone": "_static/thumbnails/multizone.png", + "examples/03-high_frequency/multiphysics/index": "_static/thumbnails/multizone.png", + "examples/04-low_frequency/general/external_circuit": "_static/thumbnails/external_circuit.png", + "examples/04-low_frequency/general/twin_builder/index": "_static/thumbnails/rectifier.png", + "examples/04-low_frequency/general/twin_builder/static_rom": "_static/thumbnails/static_rom.png", + "examples/04-low_frequency/motor/aedt_motor/rmxpert": "_static/thumbnails/rmxpert.png", + "examples/04-low_frequency/multiphysics/maxwell_icepak": "_static/thumbnails/charging.png", + "examples/05-electrothermal/icepak_circuit_hfss_coupling": "_static/thumbnails/ring.png", + "examples/05-electrothermal/electrothermal": "_static/thumbnails/electrothermal.png", } + # Define custom notebook format nbsphinx_custom_formats = { ".py": ["jupytext.reads", {"fmt": ""}], diff --git a/doc/source/index.rst b/doc/source/index.rst index 74be2ab1b..b22ed76da 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -10,158 +10,85 @@ Embedding examples for `PyAEDT `_ These end-to-end examples show how you can use PyAEDT. -.. grid:: 3 +.. grid:: 2 - .. grid-item-card:: Modeling and setup + .. grid-item-card:: PyAEDT basics :padding: 2 2 2 2 - :link: examples/01-Modeling-Setup/index - :link-type: doc - - .. image:: examples/01-Modeling-Setup/_static/Project_manager.png - :alt: AEDT Project Manager - :width: 200px - :height: 150px - - Explore general model and simulation setup features inside AEDT - - .. grid-item-card:: HFSS - :padding: 2 2 2 2 - :link: examples/02-HFSS/index - :link-type: doc - - .. image:: examples/02-HFSS/_static/array_w_ff.png - :alt: Phased array antenna - :width: 200px - :height: 150px - - Explore end-to-end workflows for HFSS 3D + :link: https://aedt.docs.pyansys.com/version/stable/User_guide/index.html + :link-type: url - .. grid-item-card:: Maxwell 3D - :padding: 2 2 2 2 - :link: examples/03-Maxwell3D/index - :link-type: doc + .. image:: examples/01-basic/_static/logo.png + :alt: PyAEDT logo + :width: 250px + :height: 200px + :align: center - .. image:: examples/03-Maxwell3D/_static/motor.png - :alt: Motor fields - :width: 200px - :height: 150px - - Uncover the various uses of Maxwell 3D - - .. grid-item-card:: Maxwell 2D - :padding: 2 2 2 2 - :link: examples/03-Maxwell2D/index - :link-type: doc - - .. image:: examples/03-Maxwell2D/_static/motor.png - :alt: Motor fields - :width: 200px - :height: 150px - - Uncover the various uses of Maxwell 2D - - .. grid-item-card:: Layout - :padding: 2 2 2 2 - :link: examples/04-Layout/index - :link-type: doc + This section demonstrates basic PyAEDT capabilities - .. image:: examples/04-Layout/hfss_3d_layout/_static/HFSS_3DL.png - :alt: Flex assembly - :width: 200px - :height: 150px - - Explore end-to-end workflows for Layout automation - - .. grid-item-card:: Icepak - :padding: 2 2 2 2 - :link: examples/05-Icepak/index - :link-type: doc - - .. image:: examples/05-Icepak/_static/pcb_icepak.png - :alt: PCB temperature - :width: 200px - :height: 150px - - Discover use cases of Icepak - - .. grid-item-card:: Q3D - :padding: 2 2 2 2 - :link: examples/06-Q3D/index - :link-type: doc - - .. image:: examples/06-Q3D/_static/busbar.png - :alt: PCB temperature - :width: 200px - :height: 150px - - Discover end-to-end workflows for 2D Extractor and Q3D Extractor - - .. grid-item-card:: SBR+ + .. grid-item-card:: General :padding: 2 2 2 2 - :link: examples/07-SBR+/index + :link: examples/02-aedt_general/index :link-type: doc - .. image:: examples/07-SBR+/_static/car_w_pedestrians.png - :alt: Automotive radar - :width: 200px - :height: 150px + .. image:: examples/02-aedt_general/_static/aedt_electronics.png + :alt: AEDT electronics + :width: 250px + :height: 200px + :align: center - Venture into the diverse applications of SBR+ + AEDT general capabilities - .. grid-item-card:: Circuit + .. grid-item-card:: High Frequency :padding: 2 2 2 2 - :link: examples/08-Circuit/index + :link: examples/03-high_frequency/index :link-type: doc - .. image:: examples/08-Circuit/_static/circuit.png - :alt: Circuit example - :width: 200px - :height: 150px + .. image:: examples/03-high_frequency/_static/hf.png + :alt: High frequency IC + :width: 250px + :height: 200px + :align: center - Investigate some examples of Circuit in action + PyAEDT capabilities for High Frequency applications - .. grid-item-card:: Multiphysics + .. grid-item-card:: Low Frequency :padding: 2 2 2 2 - :link: examples/09-Multiphysics/index + :link: examples/04-low_frequency/index :link-type: doc - .. image:: examples/09-Multiphysics/_static/pcb_stress.png - :alt: PCB stress - :width: 200px - :height: 150px + .. image:: examples/04-low_frequency/_static/motor_maxwell.png + :alt: Low frequency motor + :width: 250px + :height: 200px + :align: center - Create some multiphysics workflows + PyAEDT capabilities for Low Frequency applications - .. grid-item-card:: EMIT + .. grid-item-card:: Electrothermal :padding: 2 2 2 2 - :link: examples/10-EMIT/index + :link: examples/05-electrothermal/index :link-type: doc - .. image:: examples/10-EMIT/_static/emit_simple_cosite.png - :alt: Simple cosite - :width: 200px - :height: 150px + .. image:: examples/05-electrothermal/_static/icepak_logo.png + :alt: Icepak + :width: 250px + :height: 200px + :align: center - Study the practical uses of EMIT + PyAEDT capabilities for Electrothermal applications - .. grid-item-card:: Twin Builder + .. grid-item-card:: Examples by AEDT application :padding: 2 2 2 2 - :link: examples/11-twin_builder/index + :link: examples/06-AEDT/index :link-type: doc - .. image:: examples/11-twin_builder/_static/rectifier.png - :alt: Rectifier - :width: 200px - :height: 150px - - Inspect how Twin Builder is applied in different scenarios - - .. grid-item-card:: General - :padding: 2 2 2 2 - :link: examples/12-general/index - :link-type: doc + .. image:: examples/06-AEDT/_static/aedt.png + :alt: AEDT + :width: 250px + :height: 200px + :align: center - Discover some general end-to-end workflows + Examples divided by AEDT application .. toctree:: :hidden: diff --git a/examples/01-Modeling-Setup/_static/Project_manager.png b/examples/01-Modeling-Setup/_static/Project_manager.png deleted file mode 100644 index d66d4940a..000000000 Binary files a/examples/01-Modeling-Setup/_static/Project_manager.png and /dev/null differ diff --git a/examples/01-Modeling-Setup/index.rst b/examples/01-Modeling-Setup/index.rst deleted file mode 100644 index 23cd0b89b..000000000 --- a/examples/01-Modeling-Setup/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -General model and setup examples -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some general model and simulation -setup features inside AEDT. - -.. nbgallery:: - - Configurations.py - CoordinateSystem.py - Optimetrics.py - Polyline_Primitives.py diff --git a/examples/01-basic/_static/logo.png b/examples/01-basic/_static/logo.png new file mode 100644 index 000000000..e0d706677 Binary files /dev/null and b/examples/01-basic/_static/logo.png differ diff --git a/examples/02-HFSS/index.rst b/examples/02-HFSS/index.rst deleted file mode 100644 index 75907a983..000000000 --- a/examples/02-HFSS/index.rst +++ /dev/null @@ -1,17 +0,0 @@ -HFSS examples -~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for HFSS 3D. -This includes model generation, setup, meshing, and postprocessing. - -.. nbgallery:: - - Array.py - Create_3d_Component_and_use_it.py - Flex_CPWG.py - HFSS_Choke.py - HFSS_Dipole.py - HFSS_eigenmode.py - HFSS_FSS_unitcell.py - HFSS_Spiral.py - Probe_Fed_Patch.py - Waveguide_Filter.py diff --git a/examples/02-aedt_general/_static/aedt_electronics.png b/examples/02-aedt_general/_static/aedt_electronics.png new file mode 100644 index 000000000..7dbf797a4 Binary files /dev/null and b/examples/02-aedt_general/_static/aedt_electronics.png differ diff --git a/examples/02-aedt_general/components/_static/e3dcomp.png b/examples/02-aedt_general/components/_static/e3dcomp.png new file mode 100644 index 000000000..37f678838 Binary files /dev/null and b/examples/02-aedt_general/components/_static/e3dcomp.png differ diff --git a/examples/12-general/convert_model_version.py b/examples/02-aedt_general/components/component_conversion.py similarity index 100% rename from examples/12-general/convert_model_version.py rename to examples/02-aedt_general/components/component_conversion.py diff --git a/examples/02-aedt_general/components/index.rst b/examples/02-aedt_general/components/index.rst new file mode 100644 index 000000000..1463525f0 --- /dev/null +++ b/examples/02-aedt_general/components/index.rst @@ -0,0 +1,9 @@ +3D Components +~~~~~~~~~~~~~ + +These examples use PyAEDT to show some 3D Component capabilities + +.. nbgallery:: + + reuse_component.py + component_conversion.py diff --git a/examples/02-HFSS/Create_3d_Component_and_use_it.py b/examples/02-aedt_general/components/reuse_component.py similarity index 99% rename from examples/02-HFSS/Create_3d_Component_and_use_it.py rename to examples/02-aedt_general/components/reuse_component.py index cb8f3f55f..aa706a28e 100644 --- a/examples/02-HFSS/Create_3d_Component_and_use_it.py +++ b/examples/02-aedt_general/components/reuse_component.py @@ -7,7 +7,7 @@ # 3. Reuse the 3D component in another project. # 4. Parametrize and optimize target design. # -# Keywords: **HFSS**, **3D Component**. +# Keywords: **AEDT**, **General**, **3D Component**. # ## Preparation # Import the required packages diff --git a/examples/01-Modeling-Setup/Configurations.py b/examples/02-aedt_general/configuration_files.py similarity index 98% rename from examples/01-Modeling-Setup/Configurations.py rename to examples/02-aedt_general/configuration_files.py index b956fcb1b..911746b50 100644 --- a/examples/01-Modeling-Setup/Configurations.py +++ b/examples/02-aedt_general/configuration_files.py @@ -23,7 +23,7 @@ # any reason, this face position has changed or the object name in the target # design has changed, the boundary fails to apply. # -# Keywords: **General**, **configuration file**, **setup**. +# Keywords: **AEDT**, **general**, **configuration file**, **setup**. # ## Preparation # Import the required packages diff --git a/examples/02-aedt_general/index.rst b/examples/02-aedt_general/index.rst new file mode 100644 index 000000000..4bdade2b2 --- /dev/null +++ b/examples/02-aedt_general/index.rst @@ -0,0 +1,11 @@ +General +~~~~~~~ +These examples use PyAEDT to show some general capabilities + +.. nbgallery:: + + configuration_files.py + modeler/index + optimetrics.py + components/index + report/index \ No newline at end of file diff --git a/examples/08-Circuit/_static/circuit.png b/examples/02-aedt_general/modeler/_static/circuit.png similarity index 100% rename from examples/08-Circuit/_static/circuit.png rename to examples/02-aedt_general/modeler/_static/circuit.png diff --git a/examples/08-Circuit/Circuit_Example.py b/examples/02-aedt_general/modeler/circuit_schematic.py similarity index 98% rename from examples/08-Circuit/Circuit_Example.py rename to examples/02-aedt_general/modeler/circuit_schematic.py index e9b7c6b87..b1be44a5d 100644 --- a/examples/08-Circuit/Circuit_Example.py +++ b/examples/02-aedt_general/modeler/circuit_schematic.py @@ -5,7 +5,7 @@ # # -# Keywords: **Circuit**, **Setup**. +# Keywords: **AEDT**, **Circuit**, **Schematic**. # ## Perform required imports # diff --git a/examples/01-Modeling-Setup/CoordinateSystem.py b/examples/02-aedt_general/modeler/coordinate_system.py similarity index 99% rename from examples/01-Modeling-Setup/CoordinateSystem.py rename to examples/02-aedt_general/modeler/coordinate_system.py index 30f051733..0f4d92072 100644 --- a/examples/01-Modeling-Setup/CoordinateSystem.py +++ b/examples/02-aedt_general/modeler/coordinate_system.py @@ -2,7 +2,7 @@ # # This example shows how you can use PyAEDT to create and modify coordinate systems in the modeler. # -# Keywords: **General**, **coordinate system**. +# Keywords: **AEDT**, **modeler**, **coordinate system**. # ## Preparation # Import the required packages diff --git a/examples/02-aedt_general/modeler/index.rst b/examples/02-aedt_general/modeler/index.rst new file mode 100644 index 000000000..6483298fc --- /dev/null +++ b/examples/02-aedt_general/modeler/index.rst @@ -0,0 +1,10 @@ +Modeler +~~~~~~~ +These examples use PyAEDT to show some modeler capabilities + +.. nbgallery:: + + coordinate_system.py + polyline.py + circuit_schematic.py + netlist_to_schematic.py \ No newline at end of file diff --git a/examples/08-Circuit/Create_Netlist.py b/examples/02-aedt_general/modeler/netlist_to_schematic.py similarity index 98% rename from examples/08-Circuit/Create_Netlist.py rename to examples/02-aedt_general/modeler/netlist_to_schematic.py index 78ded164e..29f44b1d1 100644 --- a/examples/08-Circuit/Create_Netlist.py +++ b/examples/02-aedt_general/modeler/netlist_to_schematic.py @@ -5,7 +5,7 @@ # # Note that HSPICE files are fully supported and many other formats enjoy broad coverage. # -# Keywords: **Circuit**, **Netlist**. +# Keywords: **Circuit**, **netlist**. # ## Imports # diff --git a/examples/01-Modeling-Setup/Polyline_Primitives.py b/examples/02-aedt_general/modeler/polyline.py similarity index 99% rename from examples/01-Modeling-Setup/Polyline_Primitives.py rename to examples/02-aedt_general/modeler/polyline.py index 601df3aac..b25c6ac52 100644 --- a/examples/01-Modeling-Setup/Polyline_Primitives.py +++ b/examples/02-aedt_general/modeler/polyline.py @@ -2,7 +2,7 @@ # # This example shows how you can use PyAEDT to create and manipulate polylines. # -# Keywords: **General**, **polyline**, **modeler**. +# Keywords: **AEDT**, **modeler**, **polyline**. # ## Preparation # Import the required packages diff --git a/examples/01-Modeling-Setup/Optimetrics.py b/examples/02-aedt_general/optimetrics.py similarity index 98% rename from examples/01-Modeling-Setup/Optimetrics.py rename to examples/02-aedt_general/optimetrics.py index b72a79be5..c74aed4b6 100644 --- a/examples/01-Modeling-Setup/Optimetrics.py +++ b/examples/02-aedt_general/optimetrics.py @@ -3,7 +3,7 @@ # This example shows how you can use PyAEDT to create a project in HFSS and create all optimetrics # setups. # -# Keywords: **General**, **Optimetrics**. +# Keywords: **AEDT**, **General**, **optimetrics**. # ## Preparation # Import the required packages diff --git a/examples/08-Circuit/_static/virtual_compliance_class.png b/examples/02-aedt_general/report/_static/virtual_compliance_class.png similarity index 100% rename from examples/08-Circuit/_static/virtual_compliance_class.png rename to examples/02-aedt_general/report/_static/virtual_compliance_class.png diff --git a/examples/08-Circuit/_static/virtual_compliance_configs.png b/examples/02-aedt_general/report/_static/virtual_compliance_configs.png similarity index 100% rename from examples/08-Circuit/_static/virtual_compliance_configs.png rename to examples/02-aedt_general/report/_static/virtual_compliance_configs.png diff --git a/examples/08-Circuit/_static/virtual_compliance_eye.png b/examples/02-aedt_general/report/_static/virtual_compliance_eye.png similarity index 100% rename from examples/08-Circuit/_static/virtual_compliance_eye.png rename to examples/02-aedt_general/report/_static/virtual_compliance_eye.png diff --git a/examples/08-Circuit/_static/virtual_compliance_scattering1.png b/examples/02-aedt_general/report/_static/virtual_compliance_scattering1.png similarity index 100% rename from examples/08-Circuit/_static/virtual_compliance_scattering1.png rename to examples/02-aedt_general/report/_static/virtual_compliance_scattering1.png diff --git a/examples/08-Circuit/_static/virtual_compliance_scattering2.png b/examples/02-aedt_general/report/_static/virtual_compliance_scattering2.png similarity index 100% rename from examples/08-Circuit/_static/virtual_compliance_scattering2.png rename to examples/02-aedt_general/report/_static/virtual_compliance_scattering2.png diff --git a/examples/08-Circuit/_static/virtual_compliance_usage.png b/examples/02-aedt_general/report/_static/virtual_compliance_usage.png similarity index 100% rename from examples/08-Circuit/_static/virtual_compliance_usage.png rename to examples/02-aedt_general/report/_static/virtual_compliance_usage.png diff --git a/examples/08-Circuit/Results.py b/examples/02-aedt_general/report/automatic_report.py similarity index 100% rename from examples/08-Circuit/Results.py rename to examples/02-aedt_general/report/automatic_report.py diff --git a/examples/02-aedt_general/report/index.rst b/examples/02-aedt_general/report/index.rst new file mode 100644 index 000000000..a4283c65c --- /dev/null +++ b/examples/02-aedt_general/report/index.rst @@ -0,0 +1,12 @@ +.. _ref_report: + +Report +~~~~~~ + +These examples use PyAEDT to show some report capabilities + +.. nbgallery:: + + virtual_compliance.py + touchstone_file.py + automatic_report.py \ No newline at end of file diff --git a/examples/08-Circuit/Touchstone_Management.py b/examples/02-aedt_general/report/touchstone_file.py similarity index 97% rename from examples/08-Circuit/Touchstone_Management.py rename to examples/02-aedt_general/report/touchstone_file.py index c76332c8d..711712d95 100644 --- a/examples/08-Circuit/Touchstone_Management.py +++ b/examples/02-aedt_general/report/touchstone_file.py @@ -7,7 +7,7 @@ # # This example runs only on Windows using CPython. # -# Keywords: **Circuit**, **Report**. +# Keywords: **Touchstone**, **report**. # ## Perform required imports # diff --git a/examples/08-Circuit/Virtual_Compliance.py b/examples/02-aedt_general/report/virtual_compliance.py similarity index 89% rename from examples/08-Circuit/Virtual_Compliance.py rename to examples/02-aedt_general/report/virtual_compliance.py index 69115d489..3b0007bc8 100644 --- a/examples/08-Circuit/Virtual_Compliance.py +++ b/examples/02-aedt_general/report/virtual_compliance.py @@ -3,7 +3,7 @@ # This example shows how to generate a compliance report in PyAEDT using # the ``VirtualCompliance`` class. # -# Keywords: **Circuit**, **Virtual compliance**. +# Keywords: **Circuit**, **Automatic report**, **virtual compliance**. # ## Perform required imports @@ -60,7 +60,6 @@ # Use the LNA setup to retrieve Touchstone files # and generate frequency domain reports. -# + circuit = ansys.aedt.core.Circuit(project=h3d.project_name, design="Touchstone") status, diff_pairs, comm_pairs = circuit.create_lna_schematic_from_snp( input_file=touchstone_path, @@ -91,7 +90,6 @@ math_formula="dB", nets=["RX0", "RX1", "RX2", "RX3"], ) -# - # ## Create TDR project # @@ -142,17 +140,10 @@ # Initialize the ``VirtualCompliance`` class # and set up the main project information needed to generate the report. # -# -# .. image:: _static/virtual_compliance_class.png -# :width: 400 -# :alt: Virtual compliance class description. -# -# -# .. image:: _static/virtual_compliance_configs.png -# :width: 400 -# :alt: Virtual compliance configuration files hierarchy. -# -# + +# + +# template = os.path.join(download_folder, "pcie_gen5_templates", "main.json") @@ -163,11 +154,7 @@ # Define the path to the project file and the # design names to be used in each report generation. # -# -# .. image:: _static/virtual_compliance_usage.png -# :width: 400 -# :alt: Virtual compliance configuration usage example. - +# v.project_file = circuit.project_file v.reports["insertion losses"].design_name = "LNA" @@ -207,22 +194,9 @@ # # Generate the reports and produce a PDF report. # -# -# .. image:: _static/virtual_compliance_scattering1.png -# :width: 400 -# :alt: Insertion loss output. -# -# -# .. image:: _static/virtual_compliance_scattering2.png -# :width: 400 -# :alt: Return loss output. -# -# -# .. image:: _static/virtual_compliance_eye.png -# :width: 400 -# :alt: Eye diagram example. -# -# +# +# +# v.create_compliance_report() diff --git a/examples/03-Maxwell2D/index.rst b/examples/03-Maxwell2D/index.rst deleted file mode 100644 index 29b5d60ad..000000000 --- a/examples/03-Maxwell2D/index.rst +++ /dev/null @@ -1,19 +0,0 @@ -Maxwell 2D examples -~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for Maxwell 2D. -This includes model generation, setup, meshing, and postprocessing. -Examples cover different Maxwell solution types (Eddy Current, Magnetostatic, -and Transient). - -.. nbgallery:: - - Maxwell2D_Control_Program.py - Maxwell2D_DCConduction.py - Maxwell2D_EC_Reduced_Matrix - Maxwell2D_Electrostatic.py - Maxwell2D_H_contour_opt1.py - Maxwell2D_H_contour_opt2.py - Maxwell2D_PMSynchronousMotor.py - Maxwell2D_transformer_LL.py - Maxwell2D_Transient.py - Maxwell2D_external_circuit.py diff --git a/examples/03-Maxwell3D/_static/motor.png b/examples/03-Maxwell3D/_static/motor.png deleted file mode 100644 index 5ba396466..000000000 Binary files a/examples/03-Maxwell3D/_static/motor.png and /dev/null differ diff --git a/examples/03-Maxwell3D/index.rst b/examples/03-Maxwell3D/index.rst deleted file mode 100644 index 5f5237f51..000000000 --- a/examples/03-Maxwell3D/index.rst +++ /dev/null @@ -1,19 +0,0 @@ -Maxwell 3D examples -~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for Maxwell 3D. -This includes model generation, setup, meshing, and postprocessing. -Examples cover different Maxwell solution types (Eddy Current, Magnetostatic, -and Transient). - -.. nbgallery:: - - Maxwell3D_Choke.py - Maxwell3D_Conductor.py - Maxwell3D_Segmentation.py - Maxwell3D_Team3_bath_plate.py - Maxwell3D_Transformer_Coreloss.py - Maxwell3D_Transient_Fields_Export.py - Maxwell3DTeam7.py - - - diff --git a/examples/02-HFSS/_static/array_w_ff.png b/examples/03-high_frequency/_static/array.png similarity index 100% rename from examples/02-HFSS/_static/array_w_ff.png rename to examples/03-high_frequency/_static/array.png diff --git a/examples/03-high_frequency/_static/emc.png b/examples/03-high_frequency/_static/emc.png new file mode 100644 index 000000000..1e24c4500 Binary files /dev/null and b/examples/03-high_frequency/_static/emc.png differ diff --git a/examples/03-high_frequency/_static/hf.png b/examples/03-high_frequency/_static/hf.png new file mode 100644 index 000000000..556c30831 Binary files /dev/null and b/examples/03-high_frequency/_static/hf.png differ diff --git a/examples/03-high_frequency/_static/layout.png b/examples/03-high_frequency/_static/layout.png new file mode 100644 index 000000000..bae41c445 Binary files /dev/null and b/examples/03-high_frequency/_static/layout.png differ diff --git a/examples/09-Multiphysics/_static/pcb_stress.png b/examples/03-high_frequency/_static/pcb_stress.png similarity index 100% rename from examples/09-Multiphysics/_static/pcb_stress.png rename to examples/03-high_frequency/_static/pcb_stress.png diff --git a/examples/03-high_frequency/_static/touchstone.png b/examples/03-high_frequency/_static/touchstone.png new file mode 100644 index 000000000..800e5d685 Binary files /dev/null and b/examples/03-high_frequency/_static/touchstone.png differ diff --git a/examples/02-HFSS/_static/wgf.png b/examples/03-high_frequency/_static/wgf.png similarity index 100% rename from examples/02-HFSS/_static/wgf.png rename to examples/03-high_frequency/_static/wgf.png diff --git a/examples/02-HFSS/Array.py b/examples/03-high_frequency/antenna/array.py similarity index 98% rename from examples/02-HFSS/Array.py rename to examples/03-high_frequency/antenna/array.py index 9d07037c1..199029f71 100644 --- a/examples/02-HFSS/Array.py +++ b/examples/03-high_frequency/antenna/array.py @@ -5,7 +5,7 @@ # the analysis, solves it, and uses postprocessing functions to create plots using Matplotlib and # PyVista without opening the HFSS user interface. This example runs only on Windows using CPython. # -# Keywords: **HFSS**, **antenna array**, **far field**. +# Keywords: **HFSS**, **antenna array**, **3D components**, **far field**. # ## Preparation diff --git a/examples/02-HFSS/HFSS_Dipole.py b/examples/03-high_frequency/antenna/dipole.py similarity index 98% rename from examples/02-HFSS/HFSS_Dipole.py rename to examples/03-high_frequency/antenna/dipole.py index 967f8455a..db2f827a1 100644 --- a/examples/02-HFSS/HFSS_Dipole.py +++ b/examples/03-high_frequency/antenna/dipole.py @@ -3,7 +3,7 @@ # This example shows how you can use PyAEDT to create a dipole antenna in HFSS # and postprocess results. # -# Keywords: **HFSS**, **antenna array**, **far field**. +# Keywords: **HFSS**, **modal**, **antenna**, **3D components**, **far field**. # ## Perform required imports # diff --git a/examples/02-HFSS/HFSS_FSS_unitcell.py b/examples/03-high_frequency/antenna/fss_unitcell.py similarity index 99% rename from examples/02-HFSS/HFSS_FSS_unitcell.py rename to examples/03-high_frequency/antenna/fss_unitcell.py index 695430e19..c51595938 100644 --- a/examples/02-HFSS/HFSS_FSS_unitcell.py +++ b/examples/03-high_frequency/antenna/fss_unitcell.py @@ -1,7 +1,7 @@ # # FSS Unit Cell Simulation # # This example shows how you can use PyAEDT to model and simulation a unit cell -# for a frequency-selectiv surface in +# for a frequency-selective surface in # HFSS. # # Keywords: **HFSS**, **FSS**, **Floquet**. diff --git a/examples/03-high_frequency/antenna/index.rst b/examples/03-high_frequency/antenna/index.rst new file mode 100644 index 000000000..911d33b29 --- /dev/null +++ b/examples/03-high_frequency/antenna/index.rst @@ -0,0 +1,13 @@ +Antenna +~~~~~~~ +These examples use PyAEDT to show some antenna examples + +.. nbgallery:: + + dipole.py + array.py + patch.py + fss_unitcell.py + ../../02-aedt_general/modeler/circuit_schematic.py + large_scenarios/index + interferences/index diff --git a/examples/10-EMIT/_static/coupling.png b/examples/03-high_frequency/antenna/interferences/_static/coupling.png similarity index 100% rename from examples/10-EMIT/_static/coupling.png rename to examples/03-high_frequency/antenna/interferences/_static/coupling.png diff --git a/examples/03-high_frequency/antenna/interferences/_static/emit_hfss.png b/examples/03-high_frequency/antenna/interferences/_static/emit_hfss.png new file mode 100644 index 000000000..5c771902a Binary files /dev/null and b/examples/03-high_frequency/antenna/interferences/_static/emit_hfss.png differ diff --git a/examples/03-high_frequency/antenna/interferences/_static/emit_simple_cosite.png b/examples/03-high_frequency/antenna/interferences/_static/emit_simple_cosite.png new file mode 100644 index 000000000..a136180ae Binary files /dev/null and b/examples/03-high_frequency/antenna/interferences/_static/emit_simple_cosite.png differ diff --git a/examples/10-EMIT/EMIT_Example.py b/examples/03-high_frequency/antenna/interferences/antenna.py similarity index 95% rename from examples/10-EMIT/EMIT_Example.py rename to examples/03-high_frequency/antenna/interferences/antenna.py index 3b2b64605..76564972a 100644 --- a/examples/10-EMIT/EMIT_Example.py +++ b/examples/03-high_frequency/antenna/interferences/antenna.py @@ -11,15 +11,13 @@ # # Perform required imports. -# + + import tempfile import time import ansys.aedt.core -from ansys.aedt.core.emit_core.emit_constants import ( - ResultType, TxRxMode) # noqa: F401 -# - +# from ansys.aedt.core.emit_core.emit_constants import ResultType, TxRxMode # ## Define constants @@ -42,7 +40,7 @@ # run AEDT in non-graphical mode. project_name = ansys.aedt.core.generate_unique_project_name( - rootname=temp_folder.name, project_name="antenna_cosite" + root_name=temp_folder.name, project_name="antenna_cosite" ) d = ansys.aedt.core.launch_desktop(AEDT_VERSION, NG_MODE, new_desktop=True) aedtapp = ansys.aedt.core.Emit(project_name, version=AEDT_VERSION) diff --git a/examples/10-EMIT/EMIT_HFSS_Example.py b/examples/03-high_frequency/antenna/interferences/hfss_emit.py similarity index 97% rename from examples/10-EMIT/EMIT_HFSS_Example.py rename to examples/03-high_frequency/antenna/interferences/hfss_emit.py index 371b3613d..55dd68bf0 100644 --- a/examples/10-EMIT/EMIT_HFSS_Example.py +++ b/examples/03-high_frequency/antenna/interferences/hfss_emit.py @@ -1,7 +1,8 @@ # # HFSS to EMIT coupling # -# This example -# demonstrates how link an HFSS design +# +# +# This example demonstrates how link an HFSS design # to EMIT and model RF interference among various components. # # > **Note:** This example uses the ``Cell Phone RFI Desense`` @@ -14,7 +15,6 @@ # # Perform required imports. -# + import os import shutil import tempfile @@ -23,8 +23,6 @@ import ansys.aedt.core from ansys.aedt.core.emit_core.emit_constants import ResultType, TxRxMode -# - - # ## Define constants AEDT_VERSION = "2024.2" diff --git a/examples/03-high_frequency/antenna/interferences/index.rst b/examples/03-high_frequency/antenna/interferences/index.rst new file mode 100644 index 000000000..edb74a821 --- /dev/null +++ b/examples/03-high_frequency/antenna/interferences/index.rst @@ -0,0 +1,11 @@ +RF interference +~~~~~~~~~~~~~~~ +These examples use PyAEDT to show some general capabilities of EMIT for RF interference + +.. nbgallery:: + + antenna.py + hfss_emit.py + interference.py + protection.py + interference_type.py diff --git a/examples/10-EMIT/ComputeInterferenceType.py b/examples/03-high_frequency/antenna/interferences/interference.py similarity index 100% rename from examples/10-EMIT/ComputeInterferenceType.py rename to examples/03-high_frequency/antenna/interferences/interference.py diff --git a/examples/10-EMIT/interference_gui.py b/examples/03-high_frequency/antenna/interferences/interference_type.py similarity index 99% rename from examples/10-EMIT/interference_gui.py rename to examples/03-high_frequency/antenna/interferences/interference_type.py index 22f51f60d..a4bd9fd34 100644 --- a/examples/10-EMIT/interference_gui.py +++ b/examples/03-high_frequency/antenna/interferences/interference_type.py @@ -17,9 +17,8 @@ import ansys.aedt.core import openpyxl -from ansys.aedt.core import Emit, get_pyaedt_app # noqa: F401 -from ansys.aedt.core.emit_core.emit_constants import ( # noqa: F401 - InterfererType, ResultType, TxRxMode) +from ansys.aedt.core import get_pyaedt_app +from ansys.aedt.core.emit_core.emit_constants import InterfererType from openpyxl.styles import PatternFill from PySide6 import QtCore, QtGui, QtUiTools, QtWidgets diff --git a/examples/10-EMIT/ComputeProtectionLevels.py b/examples/03-high_frequency/antenna/interferences/protection.py similarity index 98% rename from examples/10-EMIT/ComputeProtectionLevels.py rename to examples/03-high_frequency/antenna/interferences/protection.py index 401bc7965..d317b601f 100644 --- a/examples/10-EMIT/ComputeProtectionLevels.py +++ b/examples/03-high_frequency/antenna/interferences/protection.py @@ -10,7 +10,6 @@ # ## Perform required imports # -# + import os import sys import tempfile @@ -18,10 +17,9 @@ import plotly.graph_objects as go from ansys.aedt.core import Emit -from ansys.aedt.core.emit_core.emit_constants import \ - InterfererType # noqa: F401 -# - +# from ansys.aedt.core.emit_core.emit_constants import \ +# InterfererType # noqa: F401 # ## Define constants diff --git a/examples/07-SBR+/SBR_City_Import.py b/examples/03-high_frequency/antenna/large_scenarios/city.py similarity index 98% rename from examples/07-SBR+/SBR_City_Import.py rename to examples/03-high_frequency/antenna/large_scenarios/city.py index 6f75d1cb2..4b811feb1 100644 --- a/examples/07-SBR+/SBR_City_Import.py +++ b/examples/03-high_frequency/antenna/large_scenarios/city.py @@ -3,7 +3,7 @@ # This example shows how you can use PyAEDT to create an HFSS SBR+ project from an # OpenStreeMaps. # -# Keywords: **HFSS SBR+**, **City**. +# Keywords: **HFSS**, **SBR+**, **city**. # ## Perform required imports # diff --git a/examples/07-SBR+/SBR_Doppler_Example.py b/examples/03-high_frequency/antenna/large_scenarios/doppler.py similarity index 99% rename from examples/07-SBR+/SBR_Doppler_Example.py rename to examples/03-high_frequency/antenna/large_scenarios/doppler.py index 7a92cc1b8..45fde1226 100644 --- a/examples/07-SBR+/SBR_Doppler_Example.py +++ b/examples/03-high_frequency/antenna/large_scenarios/doppler.py @@ -3,7 +3,7 @@ # This example shows how you can use PyAEDT to create a multipart scenario in HFSS SBR+ # and set up a doppler analysis. # -# Keywords: **HFSS SBR+**, **Doppler**. +# Keywords: **HFSS**, **SBR+**, **doppler**. # ## Perform required imports # diff --git a/examples/03-high_frequency/antenna/large_scenarios/index.rst b/examples/03-high_frequency/antenna/large_scenarios/index.rst new file mode 100644 index 000000000..0fa29b96e --- /dev/null +++ b/examples/03-high_frequency/antenna/large_scenarios/index.rst @@ -0,0 +1,10 @@ +Large scenarios +~~~~~~~~~~~~~~~ +These examples use PyAEDT to show some general capabilities of HFSS SBR+ for large scenarios + +.. nbgallery:: + + city.py + doppler.py + reflector.py + time_domain.py diff --git a/examples/07-SBR+/SBR_Example.py b/examples/03-high_frequency/antenna/large_scenarios/reflector.py similarity index 98% rename from examples/07-SBR+/SBR_Example.py rename to examples/03-high_frequency/antenna/large_scenarios/reflector.py index 72c6dba89..e82ffe08b 100644 --- a/examples/07-SBR+/SBR_Example.py +++ b/examples/03-high_frequency/antenna/large_scenarios/reflector.py @@ -1,9 +1,9 @@ -# # HFSS to SBR+ coupling +# # Reflector # # This example shows how you can use PyAEDT to create an HFSS SBR+ project from an # HFSS antenna and run a simulation. # -# Keywords: **HFSS SBR+**, **Reflector**. +# Keywords: **HFSS**, **SBR+**, **reflector**. # ## Perform required imports # diff --git a/examples/07-SBR+/SBR_Time_Plot.py b/examples/03-high_frequency/antenna/large_scenarios/time_domain.py similarity index 96% rename from examples/07-SBR+/SBR_Time_Plot.py rename to examples/03-high_frequency/antenna/large_scenarios/time_domain.py index 97fb52ed5..b44b83cc4 100644 --- a/examples/07-SBR+/SBR_Time_Plot.py +++ b/examples/03-high_frequency/antenna/large_scenarios/time_domain.py @@ -1,9 +1,9 @@ -# # SBR+: HFSS to SBR+ time animation +# # 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. # -# Keywords: **HFSS SBR+**, **Time domain**, **IFFT**. +# Keywords: **HFSS**, **SBR+**, **time domain**, **IFFT**. # ## Perform required imports. # diff --git a/examples/02-HFSS/Probe_Fed_Patch.py b/examples/03-high_frequency/antenna/patch.py similarity index 98% rename from examples/02-HFSS/Probe_Fed_Patch.py rename to examples/03-high_frequency/antenna/patch.py index 229278eac..f84ba2098 100644 --- a/examples/02-HFSS/Probe_Fed_Patch.py +++ b/examples/03-high_frequency/antenna/patch.py @@ -6,7 +6,7 @@ # Note that the HFSS 3D Layout interface may offer advantages for # laminate structures such as the patch antenna. # -# Keywords: **HFSS**, **patch**, **antenna**. +# Keywords: **HFSS**, **terminal**, **antenna**., **patch**. # # ## Perform required imports # diff --git a/examples/06-Q3D/Q2D_Armoured_Cable.py b/examples/03-high_frequency/emc/armoured_cable.py similarity index 99% rename from examples/06-Q3D/Q2D_Armoured_Cable.py rename to examples/03-high_frequency/emc/armoured_cable.py index 2a09d3ce9..4faea47a4 100644 --- a/examples/06-Q3D/Q2D_Armoured_Cable.py +++ b/examples/03-high_frequency/emc/armoured_cable.py @@ -11,7 +11,7 @@ # - [4 Core Armoured Power Cable] # (https://www.luxingcable.com/low-voltage-cables/4-core-armoured-power-cable.html) # -# Keywords: **Q2D**, **Cable**. +# Keywords: **Q2D**, **EMC**, **cable**. # ## Perform required imports # diff --git a/examples/06-Q3D/Q3D_Example_Busbars.py b/examples/03-high_frequency/emc/busbar.py similarity index 99% rename from examples/06-Q3D/Q3D_Example_Busbars.py rename to examples/03-high_frequency/emc/busbar.py index c61f18314..5c0be70a1 100644 --- a/examples/06-Q3D/Q3D_Example_Busbars.py +++ b/examples/03-high_frequency/emc/busbar.py @@ -3,7 +3,7 @@ # This example shows how you can use PyAEDT to create a busbar design in # Q3D Extractor and run a simulation. # -# Keywords: **Q3D**, **Busbar**. +# Keywords: **Q3D**, **EMC*, **busbar**. # ## Perform required imports # diff --git a/examples/02-HFSS/HFSS_Choke.py b/examples/03-high_frequency/emc/choke.py similarity index 99% rename from examples/02-HFSS/HFSS_Choke.py rename to examples/03-high_frequency/emc/choke.py index 9010f8d7e..c9d0c1799 100644 --- a/examples/02-HFSS/HFSS_Choke.py +++ b/examples/03-high_frequency/emc/choke.py @@ -2,7 +2,7 @@ # # This example shows how you can use PyAEDT to create a choke setup in HFSS. # -# Keywords: **HFSS**, **Choke**, **EMC**. +# Keywords: **HFSS**, **EMC**, **choke**, . # ## Perform required imports # diff --git a/examples/02-HFSS/HFSS_eigenmode.py b/examples/03-high_frequency/emc/eigenmode.py similarity index 100% rename from examples/02-HFSS/HFSS_eigenmode.py rename to examples/03-high_frequency/emc/eigenmode.py diff --git a/examples/02-HFSS/Flex_CPWG.py b/examples/03-high_frequency/emc/flex_cable.py similarity index 100% rename from examples/02-HFSS/Flex_CPWG.py rename to examples/03-high_frequency/emc/flex_cable.py diff --git a/examples/03-high_frequency/emc/index.rst b/examples/03-high_frequency/emc/index.rst new file mode 100644 index 000000000..fd141309c --- /dev/null +++ b/examples/03-high_frequency/emc/index.rst @@ -0,0 +1,15 @@ +EMC +~~~ + +These examples use PyAEDT to show some EMC examples + +.. nbgallery:: + + choke.py + eigenmode.py + flex_cable.py + armoured_cable.py + busbar.py + subcircuit.py + ../../02-aedt_general/modeler/circuit_schematic.py + ../antenna/interferences/index diff --git a/examples/08-Circuit/Circuit_Subcircuit_Example.py b/examples/03-high_frequency/emc/subcircuit.py similarity index 98% rename from examples/08-Circuit/Circuit_Subcircuit_Example.py rename to examples/03-high_frequency/emc/subcircuit.py index dde4681c3..4378482e2 100644 --- a/examples/08-Circuit/Circuit_Subcircuit_Example.py +++ b/examples/03-high_frequency/emc/subcircuit.py @@ -4,7 +4,7 @@ # In this example, the focus is changed within the hierarchy between # the child subcircuit and the parent design. # -# Keywords: **Circuit**, **Schematic**. +# Keywords: **Circuit**, **EMC**, **schematic**. # ## Imports # diff --git a/examples/03-high_frequency/index.rst b/examples/03-high_frequency/index.rst new file mode 100644 index 000000000..218e0dfde --- /dev/null +++ b/examples/03-high_frequency/index.rst @@ -0,0 +1,94 @@ +High Frequency +============== + +These end-to-end examples show how you can use PyAEDT for high frequency applications. + + +.. grid:: 2 + + .. grid-item-card:: Antenna + :padding: 2 2 2 2 + :link: antenna/index + :link-type: doc + + .. image:: ./_static/array.png + :alt: Antenna + :width: 250px + :height: 200px + :align: center + + This section shows some Antenna workflows + + .. grid-item-card:: IC-Package-PCB + :padding: 2 2 2 2 + :link: layout/index + :link-type: doc + + .. image:: ./_static/layout.png + :alt: PCB + :width: 250px + :height: 200px + :align: center + + This section shows some layout automation examples + + .. grid-item-card:: Radio frequency and millimeter wave + :padding: 2 2 2 2 + :link: radiofrequency_mmwave/index + :link-type: doc + + .. image:: ./_static/wgf.png + :alt: Filter + :width: 250px + :height: 200px + :align: center + + This section shows some RF and millimeter wave workflows + + .. grid-item-card:: EMC + :padding: 2 2 2 2 + :link: emc/index + :link-type: doc + + .. image:: ./_static/emc.png + :alt: Busbar + :width: 250px + :height: 200px + :align: center + + This section shows some EMC examples + + .. grid-item-card:: Multiphysics + :padding: 2 2 2 2 + :link: multiphysics/index + :link-type: doc + + .. image:: ./_static/pcb_stress.png + :alt: Stress PCB + :width: 250px + :height: 200px + :align: center + + This section shows some multiphysics examples + + .. grid-item-card:: Report + :padding: 2 2 2 2 + :link: ref_report + :link-type: ref + + .. image:: _static/touchstone.png + :alt: Touchstone + :width: 250px + :height: 200px + :align: center + + This section shows report examples + + .. toctree:: + :hidden: + + antenna/index + radiofrequency_mmwave/index + layout/index + emc/index + multiphysics/index diff --git a/examples/03-high_frequency/layout/_static/power_integrity.png b/examples/03-high_frequency/layout/_static/power_integrity.png new file mode 100644 index 000000000..7ee1c35d3 Binary files /dev/null and b/examples/03-high_frequency/layout/_static/power_integrity.png differ diff --git a/examples/03-high_frequency/layout/_static/pyedb.png b/examples/03-high_frequency/layout/_static/pyedb.png new file mode 100644 index 000000000..d444d1ccb Binary files /dev/null and b/examples/03-high_frequency/layout/_static/pyedb.png differ diff --git a/examples/03-high_frequency/layout/_static/pyedb2.png b/examples/03-high_frequency/layout/_static/pyedb2.png new file mode 100644 index 000000000..99187454a Binary files /dev/null and b/examples/03-high_frequency/layout/_static/pyedb2.png differ diff --git a/examples/03-high_frequency/layout/_static/signal_integrity.png b/examples/03-high_frequency/layout/_static/signal_integrity.png new file mode 100644 index 000000000..08a183b18 Binary files /dev/null and b/examples/03-high_frequency/layout/_static/signal_integrity.png differ diff --git a/doc/source/_static/thumbnails/user_interface.png b/examples/03-high_frequency/layout/_static/user_interface.png similarity index 100% rename from doc/source/_static/thumbnails/user_interface.png rename to examples/03-high_frequency/layout/_static/user_interface.png diff --git a/examples/04-Layout/hfss_3d_layout/03_gui_manipulation.py b/examples/03-high_frequency/layout/gui_manipulation.py similarity index 100% rename from examples/04-Layout/hfss_3d_layout/03_gui_manipulation.py rename to examples/03-high_frequency/layout/gui_manipulation.py diff --git a/examples/03-high_frequency/layout/index.rst b/examples/03-high_frequency/layout/index.rst new file mode 100644 index 000000000..75c3bea60 --- /dev/null +++ b/examples/03-high_frequency/layout/index.rst @@ -0,0 +1,72 @@ +IC-Package-PCB +============== + +These examples use PyAEDT to show some layout examples + + +.. grid:: 3 + + .. grid-item-card:: Layout pre-processing + :padding: 2 2 2 2 + :link: https://edb.docs.pyansys.com/version/stable/examples/legacy_standalone/index.html + :link-type: url + + .. image:: ./_static/pyedb.png + :alt: PyEDB + :width: 200px + :height: 150px + :align: center + + End-to-end examples show how you can use PyEDB. + + .. grid-item-card:: Power integrity + :padding: 2 2 2 2 + :link: power_integrity/index + :link-type: doc + + .. image:: ./_static/power_integrity.png + :alt: Power + :width: 200px + :height: 150px + :align: center + + Power integrity examples. + + .. grid-item-card:: Signal integrity + :padding: 2 2 2 2 + :link: signal_integrity/index + :link-type: doc + + .. image:: ./_static/signal_integrity.png + :alt: Signal + :width: 200px + :height: 150px + :align: center + + Signal integrity examples. + + .. grid-item-card:: Layout user interface + :padding: 2 2 2 2 + :link: gui_manipulation + :link-type: doc + + .. image:: ./_static/user_interface.png + :alt: UI 3D Layout + :width: 200px + :height: 150px + :align: center + + HFSS 3D Layout Gui manipulation. + + .. grid-item-card:: Configuration files + :padding: 2 2 2 2 + :link: https://edb.docs.pyansys.com/version/stable/examples/use_configuration/index.html + :link-type: url + + .. image:: ./_static/pyedb2.png + :alt: PyEDB2 + :width: 200px + :height: 150px + :align: center + + PyEDB configuration file examples. \ No newline at end of file diff --git a/examples/06-Q3D/Q3D_from_EDB.py b/examples/03-high_frequency/layout/power_integrity/ac_q3d.py similarity index 99% rename from examples/06-Q3D/Q3D_from_EDB.py rename to examples/03-high_frequency/layout/power_integrity/ac_q3d.py index f8efb517f..c5cdff014 100644 --- a/examples/06-Q3D/Q3D_from_EDB.py +++ b/examples/03-high_frequency/layout/power_integrity/ac_q3d.py @@ -1,4 +1,4 @@ -# # PCB analysis +# # PCB AC analysis # This example shows how you can use PyAEDT to create a design in # Q3D Extractor and run a simulation starting from an EDB Project. @@ -116,6 +116,7 @@ setup = h3d.create_setup() setup.export_to_q3d(output_q3d, keep_net_name=True) h3d.close_project() +time.sleep(3) # Open the newly created Q3D project and display the layout. diff --git a/examples/04-Layout/hfss_3d_layout/02_dc_ir_analysis.py b/examples/03-high_frequency/layout/power_integrity/dcir.py similarity index 100% rename from examples/04-Layout/hfss_3d_layout/02_dc_ir_analysis.py rename to examples/03-high_frequency/layout/power_integrity/dcir.py diff --git a/examples/06-Q3D/Q3D_DC_IR.py b/examples/03-high_frequency/layout/power_integrity/dcir_q3d.py similarity index 99% rename from examples/06-Q3D/Q3D_DC_IR.py rename to examples/03-high_frequency/layout/power_integrity/dcir_q3d.py index 9969dd9fa..4b866cad2 100644 --- a/examples/06-Q3D/Q3D_DC_IR.py +++ b/examples/03-high_frequency/layout/power_integrity/dcir_q3d.py @@ -3,7 +3,7 @@ # This example shows how you can use PyAEDT to create a design in # Q3D Extractor and run a DC IR Drop simulation starting from an EDB Project. # -# Keywords: **Q3D**, **DCIR**. +# Keywords: **Q3D**, **layout**, **DCIR**. # ## Perform required imports # @@ -116,6 +116,7 @@ # + edb.save_edb() edb.close_edb() +time.sleep(3) h3d = ansys.aedt.core.Hfss3dLayout( output_edb, version=AEDT_VERSION, non_graphical=NG_MODE, new_desktop=True @@ -130,6 +131,7 @@ setup = h3d.create_setup() setup.export_to_q3d(output_q3d, keep_net_name=True) h3d.close_project() +time.sleep(3) # ## Open Q3D # diff --git a/examples/03-high_frequency/layout/power_integrity/index.rst b/examples/03-high_frequency/layout/power_integrity/index.rst new file mode 100644 index 000000000..92db57ad3 --- /dev/null +++ b/examples/03-high_frequency/layout/power_integrity/index.rst @@ -0,0 +1,14 @@ +Power integrity +~~~~~~~~~~~~~~~ + +These examples use PyAEDT to show power integrity examples + +.. nbgallery:: + + power_integrity.py + dcir.py + dcir_q3d.py + ac_q3d.py + ../../../02-aedt_general/modeler/circuit_schematic.py + ../../../02-aedt_general/modeler/netlist_to_schematic.py + ../../../02-aedt_general/report/touchstone_file.py diff --git a/examples/04-Layout/hfss_3d_layout/01_power_integrity.py b/examples/03-high_frequency/layout/power_integrity/power_integrity.py similarity index 100% rename from examples/04-Layout/hfss_3d_layout/01_power_integrity.py rename to examples/03-high_frequency/layout/power_integrity/power_integrity.py diff --git a/examples/12-general/_static/com_eye.png b/examples/03-high_frequency/layout/signal_integrity/_static/com_eye.png similarity index 100% rename from examples/12-general/_static/com_eye.png rename to examples/03-high_frequency/layout/signal_integrity/_static/com_eye.png diff --git a/examples/12-general/_static/com_report.png b/examples/03-high_frequency/layout/signal_integrity/_static/com_report.png similarity index 100% rename from examples/12-general/_static/com_report.png rename to examples/03-high_frequency/layout/signal_integrity/_static/com_report.png diff --git a/examples/04-Layout/hfss_3d_layout/_static/pre_layout_parameterized_pcb.png b/examples/03-high_frequency/layout/signal_integrity/_static/pre_layout_parameterized_pcb.png similarity index 100% rename from examples/04-Layout/hfss_3d_layout/_static/pre_layout_parameterized_pcb.png rename to examples/03-high_frequency/layout/signal_integrity/_static/pre_layout_parameterized_pcb.png diff --git a/examples/04-Layout/hfss_3d_layout/_static/pre_layout_sma_connector_on_pcb.png b/examples/03-high_frequency/layout/signal_integrity/_static/pre_layout_sma_connector_on_pcb.png similarity index 100% rename from examples/04-Layout/hfss_3d_layout/_static/pre_layout_sma_connector_on_pcb.png rename to examples/03-high_frequency/layout/signal_integrity/_static/pre_layout_sma_connector_on_pcb.png diff --git a/examples/08-Circuit/_static/spectrum_plot.png b/examples/03-high_frequency/layout/signal_integrity/_static/spectrum_plot.png similarity index 100% rename from examples/08-Circuit/_static/spectrum_plot.png rename to examples/03-high_frequency/layout/signal_integrity/_static/spectrum_plot.png diff --git a/examples/08-Circuit/Circuit_AMI.py b/examples/03-high_frequency/layout/signal_integrity/ami.py similarity index 100% rename from examples/08-Circuit/Circuit_AMI.py rename to examples/03-high_frequency/layout/signal_integrity/ami.py diff --git a/examples/08-Circuit/Circuit_Transient.py b/examples/03-high_frequency/layout/signal_integrity/circuit_transient.py similarity index 100% rename from examples/08-Circuit/Circuit_Transient.py rename to examples/03-high_frequency/layout/signal_integrity/circuit_transient.py diff --git a/examples/12-general/com_analysis.py b/examples/03-high_frequency/layout/signal_integrity/com_analysis.py similarity index 100% rename from examples/12-general/com_analysis.py rename to examples/03-high_frequency/layout/signal_integrity/com_analysis.py diff --git a/examples/03-high_frequency/layout/signal_integrity/index.rst b/examples/03-high_frequency/layout/signal_integrity/index.rst new file mode 100644 index 000000000..830111738 --- /dev/null +++ b/examples/03-high_frequency/layout/signal_integrity/index.rst @@ -0,0 +1,17 @@ +Signal integrity +~~~~~~~~~~~~~~~~ + +These examples use PyAEDT to show signal integrity examples + +.. nbgallery:: + + com_analysis.py + pre_layout.py + pre_layout_parametrized.py + ami.py + multizone.py + circuit_transient.py + ../../../02-aedt_general/modeler/circuit_schematic.py + ../../../02-aedt_general/modeler/netlist_to_schematic.py + ../../emc/subcircuit.py + ../../../02-aedt_general/report/touchstone_file.py \ No newline at end of file diff --git a/examples/08-Circuit/Circuit_Siwave_Multizones.py b/examples/03-high_frequency/layout/signal_integrity/multizone.py similarity index 97% rename from examples/08-Circuit/Circuit_Siwave_Multizones.py rename to examples/03-high_frequency/layout/signal_integrity/multizone.py index 4a7103c7b..58fa89559 100644 --- a/examples/08-Circuit/Circuit_Siwave_Multizones.py +++ b/examples/03-high_frequency/layout/signal_integrity/multizone.py @@ -136,8 +136,8 @@ circuit.save_project() circuit.release_desktop() -# Wait 5 seconds to allow Electronics Desktop to shut down before cleaning the temporary directory. -time.sleep(5) +# Wait 3 seconds to allow Electronics Desktop to shut down before cleaning the temporary directory. +time.sleep(3) # ## Cleanup # diff --git a/examples/04-Layout/hfss_3d_layout/04_pre_layout_sma_connector_on_pcb.py b/examples/03-high_frequency/layout/signal_integrity/pre_layout.py similarity index 98% rename from examples/04-Layout/hfss_3d_layout/04_pre_layout_sma_connector_on_pcb.py rename to examples/03-high_frequency/layout/signal_integrity/pre_layout.py index 39c94a2f5..318e10bc1 100644 --- a/examples/04-Layout/hfss_3d_layout/04_pre_layout_sma_connector_on_pcb.py +++ b/examples/03-high_frequency/layout/signal_integrity/pre_layout.py @@ -1,6 +1,6 @@ # # Pre-layout Signal Integrity -# This example shows how to create a parameterized layout design, and load the layout into HFSS 3D Layout for analysis and -# post-processing. +# This example shows how to create a parameterized layout design, +# and load the layout into HFSS 3D Layout for analysis and post-processing. # # - Create EDB # @@ -317,7 +317,6 @@ # ## Load edb into HFSS 3D Layout. -NG_MODE = False # Open the UI to view the layout. h3d = Hfss3dLayout(aedb, version=AEDT_VERSION, non_graphical=NG_MODE, new_desktop=True) # ## Place SMA RF connector diff --git a/examples/04-Layout/hfss_3d_layout/08_pre_layout_parametrized_pcb.py b/examples/03-high_frequency/layout/signal_integrity/pre_layout_parametrized.py similarity index 99% rename from examples/04-Layout/hfss_3d_layout/08_pre_layout_parametrized_pcb.py rename to examples/03-high_frequency/layout/signal_integrity/pre_layout_parametrized.py index 69ecd8dd6..3a41abcde 100644 --- a/examples/04-Layout/hfss_3d_layout/08_pre_layout_parametrized_pcb.py +++ b/examples/03-high_frequency/layout/signal_integrity/pre_layout_parametrized.py @@ -1,4 +1,4 @@ -# # HFSS 3D Layout: Pre-layout Parameterized PCB +# # Pre-layout Parameterized PCB # # This example shows how to use the EDB interface along with HFSS 3D Layout to create and solve a # parameterized layout. The layout shows a differential via transition on a printed circuit board diff --git a/examples/09-Multiphysics/Hfss_Mechanical.py b/examples/03-high_frequency/multiphysics/hfss_mechanical.py similarity index 100% rename from examples/09-Multiphysics/Hfss_Mechanical.py rename to examples/03-high_frequency/multiphysics/hfss_mechanical.py diff --git a/examples/03-high_frequency/multiphysics/index.rst b/examples/03-high_frequency/multiphysics/index.rst new file mode 100644 index 000000000..0ca8d6355 --- /dev/null +++ b/examples/03-high_frequency/multiphysics/index.rst @@ -0,0 +1,13 @@ +Multiphysics +~~~~~~~~~~~~ + +These examples use PyAEDT to show some multiphysics examples + +.. nbgallery:: + + mri.py + hfss_mechanical.py + ../../05-electrothermal/ecad_import.py + ../../05-electrothermal/coaxial_hfss_icepak.py + ../../05-electrothermal/electrothermal.py + ../../05-electrothermal/icepak_circuit_hfss_coupling.py diff --git a/examples/09-Multiphysics/MRI.py b/examples/03-high_frequency/multiphysics/mri.py similarity index 99% rename from examples/09-Multiphysics/MRI.py rename to examples/03-high_frequency/multiphysics/mri.py index 82089dc70..cc9de8fe4 100644 --- a/examples/09-Multiphysics/MRI.py +++ b/examples/03-high_frequency/multiphysics/mri.py @@ -12,7 +12,7 @@ # Step 3: Thermal simulation: # Link HFSS to transient thermal solver to find temperature rise in tissue near implant vs. time. # -# Keywords: **Multiphysics**, **HFSS**, **Mechanica AEDTl**, **Circuit**. +# Keywords: **Multiphysics**, **HFSS**, **Mechanical AEDT**, **Circuit**. # ## Perform required imports # Perform required imports. diff --git a/examples/03-high_frequency/radiofrequency_mmwave/_static/wgf.png b/examples/03-high_frequency/radiofrequency_mmwave/_static/wgf.png new file mode 100644 index 000000000..0f3d78bf9 Binary files /dev/null and b/examples/03-high_frequency/radiofrequency_mmwave/_static/wgf.png differ diff --git a/examples/06-Q3D/Q2D_Example_CPWG.py b/examples/03-high_frequency/radiofrequency_mmwave/coplanar_waveguide.py similarity index 100% rename from examples/06-Q3D/Q2D_Example_CPWG.py rename to examples/03-high_frequency/radiofrequency_mmwave/coplanar_waveguide.py diff --git a/examples/03-high_frequency/radiofrequency_mmwave/index.rst b/examples/03-high_frequency/radiofrequency_mmwave/index.rst new file mode 100644 index 000000000..f6391e503 --- /dev/null +++ b/examples/03-high_frequency/radiofrequency_mmwave/index.rst @@ -0,0 +1,16 @@ +Radio frequency and millimeter wave +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These examples use PyAEDT to show some general capabilities of AEDT for radio frequency and millimeter wave applications + +.. nbgallery:: + + iris_filter.py + spiral.py + coplanar_waveguide.py + stripline.py + lumped_element.py + ../emc/flex_cable.py + ../emc/eigenmode.py + ../antenna/fss_unitcell.py + ../antenna/interferences/index diff --git a/examples/02-HFSS/Waveguide_Filter.py b/examples/03-high_frequency/radiofrequency_mmwave/iris_filter.py similarity index 98% rename from examples/02-HFSS/Waveguide_Filter.py rename to examples/03-high_frequency/radiofrequency_mmwave/iris_filter.py index 203ad453b..5e0b65de7 100644 --- a/examples/02-HFSS/Waveguide_Filter.py +++ b/examples/03-high_frequency/radiofrequency_mmwave/iris_filter.py @@ -1,9 +1,9 @@ -# # Inductive Iris waveguide filter +# # Inductive iris waveguide filter # # This example shows how to build and analyze a 4-pole # X-Band waveguide filter using inductive irises. # -# Keywords: **HFSS**, **Waveguide filter**. +# Keywords: **HFSS**, **modal**, **waveguide filter**. # diff --git a/examples/12-general/Lumped_Element_Response.py b/examples/03-high_frequency/radiofrequency_mmwave/lumped_element.py similarity index 94% rename from examples/12-general/Lumped_Element_Response.py rename to examples/03-high_frequency/radiofrequency_mmwave/lumped_element.py index 94047a6ee..e8764d67d 100644 --- a/examples/12-general/Lumped_Element_Response.py +++ b/examples/03-high_frequency/radiofrequency_mmwave/lumped_element.py @@ -10,12 +10,13 @@ # Perform required imports. import ansys.aedt.core -import ansys.aedt.core.filtersolutions_core.attributes import matplotlib.pyplot as plt from ansys.aedt.core.filtersolutions_core.attributes import ( - FilterClass, FilterImplementation, FilterType) -from ansys.aedt.core.filtersolutions_core.ideal_response import \ - FrequencyResponseColumn + FilterClass, + FilterImplementation, + FilterType, +) +from ansys.aedt.core.filtersolutions_core.ideal_response import FrequencyResponseColumn # ## Define constants # diff --git a/examples/02-HFSS/HFSS_Spiral.py b/examples/03-high_frequency/radiofrequency_mmwave/spiral.py similarity index 98% rename from examples/02-HFSS/HFSS_Spiral.py rename to examples/03-high_frequency/radiofrequency_mmwave/spiral.py index 34d90ef6c..8dfd3b407 100644 --- a/examples/02-HFSS/HFSS_Spiral.py +++ b/examples/03-high_frequency/radiofrequency_mmwave/spiral.py @@ -2,7 +2,7 @@ # # This example shows how you can use PyAEDT to create a spiral inductor, solve it, and plot results. # -# Keywords: **HFSS**, **Spiral**, **Inductance**, **Output variable**. +# Keywords: **HFSS**, **spiral**, **inductance**, **output variable**. # ## Perform required imports # diff --git a/examples/06-Q3D/Q2D_Example_Stripline.py b/examples/03-high_frequency/radiofrequency_mmwave/stripline.py similarity index 100% rename from examples/06-Q3D/Q2D_Example_Stripline.py rename to examples/03-high_frequency/radiofrequency_mmwave/stripline.py diff --git a/examples/04-Layout/edb/_static/stackup.png b/examples/04-Layout/edb/_static/stackup.png deleted file mode 100644 index 912fc9cd7..000000000 Binary files a/examples/04-Layout/edb/_static/stackup.png and /dev/null differ diff --git a/examples/04-Layout/edb/index.rst b/examples/04-Layout/edb/index.rst deleted file mode 100644 index 2f4f0c8ae..000000000 --- a/examples/04-Layout/edb/index.rst +++ /dev/null @@ -1,22 +0,0 @@ -EDB examples -~~~~~~~~~~~~ -EDB is a powerful API for efficiently controlling PCB data. -You can either use EDB standalone or embedded in HFSS 3D Layout in AEDT. -The ``EDB`` class in now part of the PyEDB package, which is currently installed with PyAEDT and backward-compatible with PyAEDT. -All EDB related examples have been moved -to the `Examples page `_ in the PyEDB -documentation. -These examples use EDB (Electronics Database) with PyAEDT. - -.. code:: python - - # Launch the latest installed version of AEDB. - import ansys.aedt.core - - edb = ansys.aedt.core.Edb("mylayout.aedb") - - # You can also launch EDB directly from PyEDB. - - import pyedb - - edb = pyedb.Edb("mylayout.aedb") diff --git a/examples/04-Layout/hfss_3d_layout/06_ipc2581_export.py b/examples/04-Layout/hfss_3d_layout/06_ipc2581_export.py deleted file mode 100644 index 76a329061..000000000 --- a/examples/04-Layout/hfss_3d_layout/06_ipc2581_export.py +++ /dev/null @@ -1,60 +0,0 @@ -# # IPC2581 export -# -# This example shows how to use the electronics database (EDB) to export an IPC2581 file. -# -# Keywords: **HFSS 3D Layout**, **IPC2581**. - -# ## Preparation -# Import the required packages - -import os -import tempfile -import time - -from ansys.aedt.core import Edb -from ansys.aedt.core.downloads import download_file - -AEDT_VERSION = "2024.2" -NUM_CORES = 4 -NG_MODE = False # Open Electronics UI when the application is launched. - - -# Download the example PCB data. - -temp_folder = tempfile.TemporaryDirectory(suffix=".ansys") -aedb = download_file(source="edb/ANSYS-HSD_V1.aedb", destination=temp_folder.name) - -# ## Launch EDB - -edbapp = Edb(edbpath=aedb, edbversion=AEDT_VERSION) - -# ## Create a cutout -# The following assignments will define the region of the PCB to be cut out for analysis. - -edbapp.cutout( - signal_list=["PCIe_Gen4_TX1_N", "PCIe_Gen4_TX1_P"], - reference_list=["GND"], - extent_type="ConvexHull", - expansion_size=0.002, - use_round_corner=False, - number_of_threads=4, - remove_single_pin_components=True, - use_pyaedt_extent_computing=True, - extent_defeature=0, -) -edbapp.nets.plot(None, None, color_by_net=True) - -# ## Export layout as a IPC2581 file. - -edbapp.export_to_ipc2581( - ipc_path=os.path.join(temp_folder.name, "ANSYS-HSD_V1.xml"), units="inch" -) - -# ## Close EDB - -edbapp.close_edb() - -# ## Clean up the temporary directory - -time.sleep(3) -temp_folder.cleanup() diff --git a/examples/04-Layout/hfss_3d_layout/07_import_gds.py b/examples/04-Layout/hfss_3d_layout/07_import_gds.py deleted file mode 100644 index 447cf7289..000000000 --- a/examples/04-Layout/hfss_3d_layout/07_import_gds.py +++ /dev/null @@ -1,132 +0,0 @@ -# # Import GDS -# -# This example demonstrates how to import a gds layout for subsequent simulation with HFSS. -# - Create control file -# - Add HFSS analysis setups -# - Create via group -# - Add ports -# - Add components -# - Import layout as EDB -# - Plot stackup -# -# Keywords: **HFSS 3D Layout**, **GDS**. - -# ## Preparation -# Import the required packages - -# + -import os -import tempfile - -from ansys.aedt.core.downloads import download_file -from pyedb import Edb -from pyedb.dotnet.edb_core.edb_data.control_file import ControlFile - -# - - -# ## Define constants - -AEDT_VERSION = "2024.2" -NUM_CORES = 4 -NG_MODE = False # Open Electronics UI when the application is launched. - -# ## Create temporary directory -# -# Create temporary directory. -# If you'd like to retrieve the project data for subsequent use, -# the temporary folder name is given by ``temp_folder.name``. - -temp_folder = tempfile.TemporaryDirectory(suffix=".ansys") - -control_fn = download_file( - source="gds", - name="sky130_fictitious_dtc_example_control_no_map.xml", - destination=temp_folder.name, -) -gds_fn = download_file( - source="gds", name="sky130_fictitious_dtc_example.gds", destination=temp_folder.name -) -layer_map = download_file( - source="gds", name="dummy_layermap.map", destination=temp_folder.name -) - -# - - -# ## Control file -# -# A Control file is an xml file which purpose if to provide additional information during -# import phase. It can include, materials, stackup, setup, boundaries and settings. -# In this example we will import an existing xml, integrate it with a layer mapping file of gds -# and then adding setup and boundaries. - -c = ControlFile(xml_input=control_fn, layer_map=layer_map) - -# ## Set up simulation -# -# This code sets up a simulation with HFSS and adds a frequency sweep. - -setup = c.setups.add_setup("Setup1", "1GHz") -setup.add_sweep("Sweep1", "0.01GHz", "5GHz", "0.1GHz") - -# ## Provide additional stackup settings -# -# After import, you can change the stackup settings and add or remove layers or materials. - -c.stackup.units = "um" -c.stackup.dielectrics_base_elevation = -100 -c.stackup.metal_layer_snapping_tolerance = "10nm" -for via in c.stackup.vias: - via.create_via_group = True - via.snap_via_group = True - -# ## Define boundary settings -# -# Boundaries can include ports, components and boundary extent. - -c.boundaries.units = "um" -c.boundaries.add_port( - "P1", x1=223.7, y1=222.6, layer1="Metal6", x2=223.7, y2=100, layer2="Metal6" -) -c.boundaries.add_extent() -comp = c.components.add_component("B1", "BGA", "IC", "Flip chip", "Cylinder") -comp.solder_diameter = "65um" -comp.add_pin("1", "81.28", "84.6", "met2") -comp.add_pin("2", "211.28", "84.6", "met2") -comp.add_pin("3", "211.28", "214.6", "met2") -comp.add_pin("4", "81.28", "214.6", "met2") -c.import_options.import_dummy_nets = True - -# ## Write XML file -# -# After all settings are ready, you can write an XML file. - -c.write_xml(os.path.join(temp_folder.name, "output.xml")) - -# ## Open EDB -# -# Import the gds and open the edb. - -# + - -edbapp = Edb( - gds_fn, - edbversion=AEDT_VERSION, - technology_file=os.path.join(temp_folder.name, "output.xml"), -) -# - - -# ## Plot stackup -# -# Plot the stackup. - -edbapp.stackup.plot(first_layer="met1") - -# ## Close EDB -# -# Close the project. - -edbapp.close_edb() - -# Clean up the temporary folder. - -temp_folder.cleanup() diff --git a/examples/04-Layout/hfss_3d_layout/_static/HFSS_3DL.png b/examples/04-Layout/hfss_3d_layout/_static/HFSS_3DL.png deleted file mode 100644 index c8559c7c2..000000000 Binary files a/examples/04-Layout/hfss_3d_layout/_static/HFSS_3DL.png and /dev/null differ diff --git a/examples/04-Layout/hfss_3d_layout/_static/user_interface.png b/examples/04-Layout/hfss_3d_layout/_static/user_interface.png deleted file mode 100644 index 2b35e10e4..000000000 Binary files a/examples/04-Layout/hfss_3d_layout/_static/user_interface.png and /dev/null differ diff --git a/examples/04-Layout/hfss_3d_layout/index.rst b/examples/04-Layout/hfss_3d_layout/index.rst deleted file mode 100644 index ddbacb812..000000000 --- a/examples/04-Layout/hfss_3d_layout/index.rst +++ /dev/null @@ -1,16 +0,0 @@ -HFSS 3D Layout examples -~~~~~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT and PyEDB to show some end-to-end workflows for HFSS 3D Layout and SIwave. -This includes layout import, layout editing, S-parameter assignment, Spice model assignment, parameterized -pre-layout design creation. - -.. nbgallery:: - - 01_power_integrity - 02_dc_ir_analysis - 03_gui_manipulation.py - 04_pre_layout_sma_connector_on_pcb.py - 05_electrothermal.py - 06_ipc2581_export.py - 07_import_gds.py - 08_pre_layout_parametrized_pcb.py diff --git a/examples/04-Layout/index.rst b/examples/04-Layout/index.rst deleted file mode 100644 index d69a6685d..000000000 --- a/examples/04-Layout/index.rst +++ /dev/null @@ -1,33 +0,0 @@ -Layout examples -=============== - -These examples use PyAEDT and PyEDB to show some end-to-end workflows for HFSS 3D Layout and SIwave. - -.. grid:: 3 - - .. grid-item-card:: HFSS 3D Layout - :padding: 2 2 2 2 - :link: hfss_3d_layout/index - :link-type: doc - - .. image:: hfss_3d_layout/_static/pre_layout_parameterized_pcb.png - :alt: HFSS 3D Layout example - :width: 200px - :height: 150px - - Explore HFSS 3D Layout workflows - - .. grid-item-card:: EDB - :padding: 2 2 2 2 - :link: edb/index - :link-type: doc - - .. image:: edb/_static/stackup.png - :alt: Stackup - :width: 200px - :height: 150px - - Discover layout workflows with PyEDB - -.. toctree:: - :hidden: diff --git a/examples/04-low_frequency/_static/general.png b/examples/04-low_frequency/_static/general.png new file mode 100644 index 000000000..24c90dd9c Binary files /dev/null and b/examples/04-low_frequency/_static/general.png differ diff --git a/examples/04-low_frequency/_static/magnetic.png b/examples/04-low_frequency/_static/magnetic.png new file mode 100644 index 000000000..f812ba0b2 Binary files /dev/null and b/examples/04-low_frequency/_static/magnetic.png differ diff --git a/examples/04-low_frequency/_static/motor_maxwell.png b/examples/04-low_frequency/_static/motor_maxwell.png new file mode 100644 index 000000000..b0f49570a Binary files /dev/null and b/examples/04-low_frequency/_static/motor_maxwell.png differ diff --git a/examples/04-low_frequency/_static/pcb_stress.png b/examples/04-low_frequency/_static/pcb_stress.png new file mode 100644 index 000000000..5b1e260c4 Binary files /dev/null and b/examples/04-low_frequency/_static/pcb_stress.png differ diff --git a/examples/04-low_frequency/_static/touchstone.png b/examples/04-low_frequency/_static/touchstone.png new file mode 100644 index 000000000..800e5d685 Binary files /dev/null and b/examples/04-low_frequency/_static/touchstone.png differ diff --git a/examples/03-Maxwell2D/Maxwell2D_Control_Program.py b/examples/04-low_frequency/general/control_program.py similarity index 100% rename from examples/03-Maxwell2D/Maxwell2D_Control_Program.py rename to examples/04-low_frequency/general/control_program.py diff --git a/examples/03-Maxwell3D/Maxwell3D_Conductor.py b/examples/04-low_frequency/general/dc_analysis.py similarity index 100% rename from examples/03-Maxwell3D/Maxwell3D_Conductor.py rename to examples/04-low_frequency/general/dc_analysis.py diff --git a/examples/03-Maxwell2D/Maxwell2D_EC_Reduced_Matrix.py b/examples/04-low_frequency/general/eddy_current.py similarity index 98% rename from examples/03-Maxwell2D/Maxwell2D_EC_Reduced_Matrix.py rename to examples/04-low_frequency/general/eddy_current.py index e1759682c..0c11b18b5 100644 --- a/examples/03-Maxwell2D/Maxwell2D_EC_Reduced_Matrix.py +++ b/examples/04-low_frequency/general/eddy_current.py @@ -3,7 +3,7 @@ # This example shows how to leverage PyAEDT to assign matrix # and perform series or parallel connections in a Maxwell 2D design. # -# Keywords: **HFSS**, **antenna array**, **far field**. +# Keywords: **Maxwell 2D**, **eddy current**, *matrix**. # ## Perform required imports # diff --git a/examples/03-Maxwell2D/Maxwell2D_Electrostatic.py b/examples/04-low_frequency/general/electrostatic.py similarity index 100% rename from examples/03-Maxwell2D/Maxwell2D_Electrostatic.py rename to examples/04-low_frequency/general/electrostatic.py diff --git a/examples/03-Maxwell2D/Maxwell2D_external_circuit.py b/examples/04-low_frequency/general/external_circuit.py similarity index 100% rename from examples/03-Maxwell2D/Maxwell2D_external_circuit.py rename to examples/04-low_frequency/general/external_circuit.py diff --git a/examples/03-Maxwell3D/Maxwell3D_Transient_Fields_Export.py b/examples/04-low_frequency/general/field_export.py similarity index 100% rename from examples/03-Maxwell3D/Maxwell3D_Transient_Fields_Export.py rename to examples/04-low_frequency/general/field_export.py diff --git a/examples/04-low_frequency/general/index.rst b/examples/04-low_frequency/general/index.rst new file mode 100644 index 000000000..16bf3d043 --- /dev/null +++ b/examples/04-low_frequency/general/index.rst @@ -0,0 +1,15 @@ +General +~~~~~~~ + +These examples use PyAEDT to show some general examples + +.. nbgallery:: + + control_program.py + resistance.py + eddy_current.py + electrostatic.py + external_circuit.py + dc_analysis.py + field_export.py + twin_builder/index diff --git a/examples/03-Maxwell2D/Maxwell2D_DCConduction.py b/examples/04-low_frequency/general/resistance.py similarity index 100% rename from examples/03-Maxwell2D/Maxwell2D_DCConduction.py rename to examples/04-low_frequency/general/resistance.py diff --git a/examples/04-low_frequency/general/twin_builder/_static/rectifier.png b/examples/04-low_frequency/general/twin_builder/_static/rectifier.png new file mode 100644 index 000000000..eebc301bb Binary files /dev/null and b/examples/04-low_frequency/general/twin_builder/_static/rectifier.png differ diff --git a/examples/11-twin_builder/dynamic_rom_creation_and_visualization.py b/examples/04-low_frequency/general/twin_builder/dynamic_rom.py similarity index 100% rename from examples/11-twin_builder/dynamic_rom_creation_and_visualization.py rename to examples/04-low_frequency/general/twin_builder/dynamic_rom.py diff --git a/examples/04-low_frequency/general/twin_builder/index.rst b/examples/04-low_frequency/general/twin_builder/index.rst new file mode 100644 index 000000000..affc9179b --- /dev/null +++ b/examples/04-low_frequency/general/twin_builder/index.rst @@ -0,0 +1,11 @@ +Twin Builder +~~~~~~~~~~~~ + +These examples use PyAEDT to show some Twin Builder examples + +.. nbgallery:: + + rc_circuit.py + rectifier.py + static_rom.py + dynamic_rom.py diff --git a/examples/11-twin_builder/rc_circuit.py b/examples/04-low_frequency/general/twin_builder/rc_circuit.py similarity index 100% rename from examples/11-twin_builder/rc_circuit.py rename to examples/04-low_frequency/general/twin_builder/rc_circuit.py diff --git a/examples/11-twin_builder/wiring_rectifier.py b/examples/04-low_frequency/general/twin_builder/rectifier.py similarity index 100% rename from examples/11-twin_builder/wiring_rectifier.py rename to examples/04-low_frequency/general/twin_builder/rectifier.py diff --git a/examples/11-twin_builder/static_rom_creation_and_visualization.py b/examples/04-low_frequency/general/twin_builder/static_rom.py similarity index 100% rename from examples/11-twin_builder/static_rom_creation_and_visualization.py rename to examples/04-low_frequency/general/twin_builder/static_rom.py diff --git a/examples/04-low_frequency/index.rst b/examples/04-low_frequency/index.rst new file mode 100644 index 000000000..edb4354f6 --- /dev/null +++ b/examples/04-low_frequency/index.rst @@ -0,0 +1,88 @@ +Low Frequency +============= + +These end-to-end examples show how you can use PyAEDT for low frequency applications. + + +.. grid:: 2 + + .. grid-item-card:: General + :padding: 2 2 2 2 + :link: general/index + :link-type: doc + + .. image:: _static/general.png + :alt: Antenna + :width: 250px + :height: 200px + :align: center + + This section shows some general workflows + + .. grid-item-card:: Motor + :padding: 2 2 2 2 + :link: motor/index + :link-type: doc + + .. image:: _static/motor_maxwell.png + :alt: PCB + :width: 250px + :height: 200px + :align: center + + This section shows some layout automation examples + + .. grid-item-card:: Magnetics + :padding: 2 2 2 2 + :link: magnetic/index + :link-type: doc + + .. image:: _static/magnetic.png + :alt: Filter + :width: 250px + :height: 200px + :align: center + + This section shows some RF and millimeter wave workflows + + .. grid-item-card:: TEAM problems + :padding: 2 2 2 2 + :link: team_problem/index + :link-type: doc + + This section shows some T.E.A.M. examples + + .. grid-item-card:: Multiphysics + :padding: 2 2 2 2 + :link: multiphysics/index + :link-type: doc + + .. image:: _static/pcb_stress.png + :alt: Stress PCB + :width: 250px + :height: 200px + :align: center + + This section shows some multiphysics examples + + .. grid-item-card:: Report + :padding: 2 2 2 2 + :link: ref_report + :link-type: ref + + .. image:: _static/touchstone.png + :alt: Touchstone + :width: 250px + :height: 200px + :align: center + + This section shows report examples + + .. toctree:: + :hidden: + + general/index + motor/index + magnetic/index + team_problem/index + multiphysics/index diff --git a/examples/03-Maxwell3D/Maxwell3D_Choke.py b/examples/04-low_frequency/magnetic/choke.py similarity index 100% rename from examples/03-Maxwell3D/Maxwell3D_Choke.py rename to examples/04-low_frequency/magnetic/choke.py diff --git a/examples/04-low_frequency/magnetic/index.rst b/examples/04-low_frequency/magnetic/index.rst new file mode 100644 index 000000000..0053f7a90 --- /dev/null +++ b/examples/04-low_frequency/magnetic/index.rst @@ -0,0 +1,12 @@ +Magnetics +~~~~~~~~~ + +These examples use PyAEDT to show some magnetics examples + +.. nbgallery:: + + transient_winding.py + choke.py + magneto_motive_contour.py + magneto_motive_line.py + lorentz_actuator.py diff --git a/examples/04-low_frequency/magnetic/lorentz_actuator.py b/examples/04-low_frequency/magnetic/lorentz_actuator.py new file mode 100644 index 000000000..905cec326 --- /dev/null +++ b/examples/04-low_frequency/magnetic/lorentz_actuator.py @@ -0,0 +1,324 @@ +# # Lorentz actuator +# +# This example uses PyAEDT to set up a Lorentz actuator +# and solve it using the Maxwell 2D transient solver. +# +# Keywords: **Maxwell2D**, **Transient**, **translational motion**, **mechanical transient** + +# ## Perform required imports +# +# Perform required imports. + +import os +import tempfile +import time + +import ansys.aedt.core + +# ## Define constants + +AEDT_VERSION = "2024.2" +NUM_CORES = 4 +NG_MODE = False # Open Electronics UI when the application is launched. + +# ## Create temporary directory +# +# Create temporary directory. +# If you'd like to retrieve the project data for subsequent use, +# the temporary folder name is given by ``temp_folder.name``. + +temp_folder = tempfile.TemporaryDirectory(suffix=".ansys") + +# ## Initialize dictionaries +# +# Initialize electric and geometric parameters for the actuator. +# Initialize simulation specification. +# Initialize materials for the actuator component. + +dimensions = { + "Core_outer_x": "100mm", + "Core_outer_y": "80mm", + "Core_thickness": "10mm", + "Magnet_thickness": "10mm", + "Coil_width": "30mm", + "Coil_thickness": "5mm", + "Coil_inner_diameter": "20mm", + "Coil_magnet_distance": "5mm", + "Coil_start_position": "3mm", + "Band_clearance": "1mm", +} + +coil_specifications = { + "Winding_current": "5A", + "No_of_turns": "100", + "Coil_mass": "0.2kg", +} + +simulation_specifications = { + "Mesh_bands": "0.5mm", + "Mesh_other_objects": "2mm", + "Stop_time": "10ms", + "Time_step": "0.5ms", + "Save_fields_interval": "1", +} + +materials = { + "Coil_material": "copper", + "Core_material": "steel_1008", + "Magnet_material": "NdFe30", +} + +# ## Launch AEDT and Maxwell 2D +# +# Launch AEDT and Maxwell 2D after first setting up the project name. +# The following code also creates an instance of the +# ``Maxwell2d`` class named ``m2d`` by providing +# the project name, the design name, the solver, the version and the graphical mode. + +project_name = os.path.join(temp_folder.name, "Lorentz_actuator.aedt") +m2d = ansys.aedt.core.Maxwell2d( + project=project_name, + design="1 transient 2D", + solution_type="TransientXY", + version=AEDT_VERSION, + non_graphical=NG_MODE, +) + +# ## Define variables from dictionaries +# +# Define design variables from the created dictionaries. + +m2d.variable_manager.set_variable(name="Dimensions") +for k, v in dimensions.items(): + m2d[k] = v + +m2d.variable_manager.set_variable(name="Winding data") +for k, v in coil_specifications.items(): + m2d[k] = v + +m2d.variable_manager.set_variable(name="Simulation data") +for k, v in simulation_specifications.items(): + m2d[k] = v + +# Materials. + +m2d.variable_manager.set_variable(name="Material data") +m2d.logger.clear_messages() +for i, key in enumerate(materials.keys()): + if key == "Coil_material": + coil_mat_index = i + elif key == "Core_material": + core_mat_index = i + elif key == "Magnet_material": + magnet_mat_index = i +material_array = [] +for k, v in materials.items(): + material_array.append('"' + v + '"') +s = ", ".join(material_array) +m2d["Materials"] = "[{}]".format(s) + +# ## Create geometry +# +# Create magnetic core, coils, and magnets. Assign materials and create a new coordinate system to +# define the magnet orientation. + +core_id = m2d.modeler.create_rectangle( + origin=[0, 0, 0], + sizes=["Core_outer_x", "Core_outer_y"], + name="Core", + material="Materials[" + str(core_mat_index) + "]", +) + +hole_id = m2d.modeler.create_rectangle( + origin=["Core_thickness", "Core_thickness", 0], + sizes=["Core_outer_x-2*Core_thickness", "Core_outer_y-2*Core_thickness"], + name="hole", +) +m2d.modeler.subtract(blank_list=[core_id], tool_list=[hole_id]) + +magnet_n_id = m2d.modeler.create_rectangle( + origin=["Core_thickness", "Core_outer_y-2*Core_thickness", 0], + sizes=["Core_outer_x-2*Core_thickness", "Magnet_thickness"], + name="magnet_n", + material="Materials[" + str(magnet_mat_index) + "]", +) +magnet_s_id = m2d.modeler.create_rectangle( + origin=["Core_thickness", "Core_thickness", 0], + sizes=["Core_outer_x-2*Core_thickness", "Magnet_thickness"], + name="magnet_s", + material="Materials[" + str(magnet_mat_index) + "]", +) + +m2d.modeler.create_coordinate_system( + origin=[0, 0, 0], x_pointing=[0, 1, 0], y_pointing=[1, 0, 0], name="cs_x_positive" +) +m2d.modeler.create_coordinate_system( + origin=[0, 0, 0], x_pointing=[0, -1, 0], y_pointing=[1, 0, 0], name="cs_x_negative" +) +magnet_s_id.part_coordinate_system = "cs_x_positive" +magnet_n_id.part_coordinate_system = "cs_x_negative" +m2d.modeler.set_working_coordinate_system("Global") + +# ## Assign current +# +# Create coil terminals with 100 turns and winding with 5A current. + +coil_in_id = m2d.modeler.create_rectangle( + origin=[ + "Core_thickness+Coil_start_position", + "Core_thickness+Magnet_thickness+Coil_magnet_distance", + 0, + ], + sizes=["Coil_width", "Coil_thickness"], + name="coil_in", + material="Materials[" + str(coil_mat_index) + "]", +) +coil_out_id = m2d.modeler.create_rectangle( + origin=[ + "Core_thickness+Coil_start_position", + "Core_thickness+Magnet_thickness+Coil_magnet_distance+Coil_inner_diameter+Coil_thickness", + 0, + ], + sizes=["Coil_width", "Coil_thickness"], + name="coil_out", + material="Materials[" + str(coil_mat_index) + "]", +) + +m2d.assign_coil( + assignment=[coil_in_id], + conductors_number="No_of_turns", + name="coil_terminal_in", + polarity="Negative", +) +m2d.assign_coil( + assignment=[coil_out_id], + conductors_number="No_of_turns", + name="coil_terminal_out", + polarity="Positive", +) +m2d.assign_winding(is_solid=False, current="Winding_current", name="Winding1") +m2d.add_winding_coils( + assignment="Winding1", coils=["coil_terminal_in", "coil_terminal_out"] +) + +# ## Assign motion +# +# Create band objects: all the objects within the band move. Inner band ensures that the mesh is good, +# and additionally it is required when there more than 1 moving objects. +# Assign linear motion with mechanical transient. + +band_id = m2d.modeler.create_rectangle( + origin=[ + "Core_thickness + Band_clearance", + "Core_thickness+Magnet_thickness+Band_clearance", + 0, + ], + sizes=[ + "Core_outer_x-2*(Core_thickness+Band_clearance)", + "Core_outer_y-2*(Core_thickness+Band_clearance+Magnet_thickness)", + ], + name="Motion_band", +) +inner_band_id = m2d.modeler.create_rectangle( + origin=[ + "Core_thickness+Coil_start_position-Band_clearance", + "Core_thickness+Magnet_thickness+Coil_magnet_distance-Band_clearance", + 0, + ], + sizes=[ + "Coil_width + 2*Band_clearance", + "Coil_inner_diameter+2*(Coil_thickness+Band_clearance)", + ], + name="Motion_band_inner", +) +motion_limit = "Core_outer_x-2*(Core_thickness+Band_clearance)-(Coil_width + 2*Band_clearance)-2*Band_clearance" +m2d.assign_translate_motion( + assignment="Motion_band", + axis="X", + periodic_translate=None, + mechanical_transient=True, + mass="Coil_mass", + start_position=0, + negative_limit=0, + positive_limit=motion_limit, +) + +# ## Create simulation domain +# +# Create region and assign zero vector potential on the region edges. + +region_id = m2d.modeler.create_region(pad_percent=2) +m2d.assign_vector_potential(assignment=region_id.edges, boundary="VectorPotential1") + +# ## Assign mesh operations +# +# Transient solver does not have adaptive mesh refinement, so the mesh operations have to be assigned. + +m2d.mesh.assign_length_mesh( + assignment=[band_id, inner_band_id], + maximum_length="Mesh_bands", + maximum_elements=None, + name="Bands", +) +m2d.mesh.assign_length_mesh( + assignment=[coil_in_id, coil_in_id, core_id, magnet_n_id, magnet_s_id, region_id], + maximum_length="Mesh_other_objects", + maximum_elements=None, + name="Coils_core_magnets", +) + +# ## Turn on eddy effects +# +# Assign eddy effects to magnets. + +m2d.eddy_effects_on(assignment=["magnet_n", "magnet_s"]) + +# ## Turn on core loss +# +# Enable core loss for core. + +m2d.set_core_losses(assignment="Core") + +# ## Create setup +# +# Create the simulation setup. + +setup = m2d.create_setup(name="Setup1") +setup.props["StopTime"] = "Stop_time" +setup.props["TimeStep"] = "Time_step" +setup.props["SaveFieldsType"] = "Every N Steps" +setup.props["N Steps"] = "Save_fields_interval" +setup.props["Steps From"] = "0ms" +setup.props["Steps To"] = "Stop_time" + +# ## Create report +# +# Create a XY-report with force on coil and the position of the coil on Y-axis, time on X-axis. + +m2d.post.create_report( + expressions=["Moving1.Force_x", "Moving1.Position"], + plot_name="Force on Coil and Position of Coil", + primary_sweep_variable="Time", +) + +# ## Analyze project +# +# Analyze the project. + +setup.analyze(cores=NUM_CORES, use_auto_settings=False) + +# ## Release AEDT + +m2d.save_project() +m2d.release_desktop() +# Wait 3 seconds to allow Electronics Desktop to shut down before cleaning the temporary directory. +time.sleep(3) + +# ## Cleanup +# +# All project files are saved in the folder ``temp_dir.name``. +# If you've run this example as a Jupyter notebook you +# can retrieve those project files. The following cell +# removes all temporary files, including the project folder. + +temp_folder.cleanup() diff --git a/examples/03-Maxwell2D/Maxwell2D_H_contour_opt1.py b/examples/04-low_frequency/magnetic/magneto_motive_contour.py similarity index 98% rename from examples/03-Maxwell2D/Maxwell2D_H_contour_opt1.py rename to examples/04-low_frequency/magnetic/magneto_motive_contour.py index 402c48f74..72d449176 100644 --- a/examples/03-Maxwell2D/Maxwell2D_H_contour_opt1.py +++ b/examples/04-low_frequency/magnetic/magneto_motive_contour.py @@ -1,4 +1,4 @@ -# # Magnetomotive force calculation along a contour +# # Magnetomotive force along several lines # # This example shows how to use PyAEDT to calculate # the magnetomotive force along several lines. diff --git a/examples/03-Maxwell2D/Maxwell2D_H_contour_opt2.py b/examples/04-low_frequency/magnetic/magneto_motive_line.py similarity index 98% rename from examples/03-Maxwell2D/Maxwell2D_H_contour_opt2.py rename to examples/04-low_frequency/magnetic/magneto_motive_line.py index 66fc15af1..b18eca1cf 100644 --- a/examples/03-Maxwell2D/Maxwell2D_H_contour_opt2.py +++ b/examples/04-low_frequency/magnetic/magneto_motive_line.py @@ -1,4 +1,4 @@ -# # Magnetomotive force calculation along a contour +# # Magnetomotive force along a line # # This example shows how to use PyAEDT to calculate # the magnetomotive force along a line that changes position. diff --git a/examples/03-Maxwell2D/Maxwell2D_Transient.py b/examples/04-low_frequency/magnetic/transient_winding.py similarity index 100% rename from examples/03-Maxwell2D/Maxwell2D_Transient.py rename to examples/04-low_frequency/magnetic/transient_winding.py diff --git a/examples/03-Maxwell2D/_static/motor.png b/examples/04-low_frequency/motor/_static/motor.png similarity index 100% rename from examples/03-Maxwell2D/_static/motor.png rename to examples/04-low_frequency/motor/_static/motor.png diff --git a/examples/04-low_frequency/motor/_static/motorcad.png b/examples/04-low_frequency/motor/_static/motorcad.png new file mode 100644 index 000000000..b835d8fbc Binary files /dev/null and b/examples/04-low_frequency/motor/_static/motorcad.png differ diff --git a/examples/04-low_frequency/motor/aedt_motor/index.rst b/examples/04-low_frequency/motor/aedt_motor/index.rst new file mode 100644 index 000000000..1b3ae8b58 --- /dev/null +++ b/examples/04-low_frequency/motor/aedt_motor/index.rst @@ -0,0 +1,12 @@ +AEDT Motor +~~~~~~~~~~ + +These examples use PyAEDT to show some motor examples in AEDT + +.. nbgallery:: + + pm_synchronous.py + magnet_segmentation.py + transformer.py + transformer_inductance.py + rmxpert.py diff --git a/examples/03-Maxwell3D/Maxwell3D_Segmentation.py b/examples/04-low_frequency/motor/aedt_motor/magnet_segmentation.py similarity index 100% rename from examples/03-Maxwell3D/Maxwell3D_Segmentation.py rename to examples/04-low_frequency/motor/aedt_motor/magnet_segmentation.py diff --git a/examples/03-Maxwell2D/Maxwell2D_PMSynchronousMotor.py b/examples/04-low_frequency/motor/aedt_motor/pm_synchronous.py similarity index 100% rename from examples/03-Maxwell2D/Maxwell2D_PMSynchronousMotor.py rename to examples/04-low_frequency/motor/aedt_motor/pm_synchronous.py diff --git a/examples/12-general/Maxwell_RMxprt.py b/examples/04-low_frequency/motor/aedt_motor/rmxpert.py similarity index 99% rename from examples/12-general/Maxwell_RMxprt.py rename to examples/04-low_frequency/motor/aedt_motor/rmxpert.py index 0bcb98e32..602ae629f 100644 --- a/examples/12-general/Maxwell_RMxprt.py +++ b/examples/04-low_frequency/motor/aedt_motor/rmxpert.py @@ -47,7 +47,7 @@ close_on_exit=True, solution_type="ASSM", project=project_name, - non_graphical=NG_MODE + non_graphical=NG_MODE, ) # ## Define Machine settings diff --git a/examples/03-Maxwell3D/Maxwell3D_Transformer_Coreloss.py b/examples/04-low_frequency/motor/aedt_motor/transformer.py similarity index 100% rename from examples/03-Maxwell3D/Maxwell3D_Transformer_Coreloss.py rename to examples/04-low_frequency/motor/aedt_motor/transformer.py diff --git a/examples/03-Maxwell2D/Maxwell2D_transformer_LL.py b/examples/04-low_frequency/motor/aedt_motor/transformer_inductance.py similarity index 99% rename from examples/03-Maxwell2D/Maxwell2D_transformer_LL.py rename to examples/04-low_frequency/motor/aedt_motor/transformer_inductance.py index e55327602..b80f51b25 100644 --- a/examples/03-Maxwell2D/Maxwell2D_transformer_LL.py +++ b/examples/04-low_frequency/motor/aedt_motor/transformer_inductance.py @@ -1,6 +1,6 @@ # # Transformer leakage inductance calculation # -# This example shows how you can use pyAEDT to create a Maxwell 2D +# This example shows how you can use PyAEDT to create a Maxwell 2D # magnetostatic analysis to calculate transformer leakage # inductance and reactance. # The analysis based on this document form page 8 on: diff --git a/examples/04-low_frequency/motor/index.rst b/examples/04-low_frequency/motor/index.rst new file mode 100644 index 000000000..3663603e6 --- /dev/null +++ b/examples/04-low_frequency/motor/index.rst @@ -0,0 +1,33 @@ +Motor +===== + +These examples use PyAEDT to show some motor examples + + +.. grid:: 2 + + .. grid-item-card:: MotorCAD + :padding: 2 2 2 2 + :link: https://motorcad.docs.pyansys.com/version/stable/examples/index.html + :link-type: url + + .. image:: ./_static/motorcad.png + :alt: MotorCAD + :width: 200px + :height: 150px + :align: center + + End-to-end examples show how you can use PyMotorCAD. + + .. grid-item-card:: Motor + :padding: 2 2 2 2 + :link: aedt_motor/index + :link-type: doc + + .. image:: ./_static/motor.png + :alt: Motor + :width: 200px + :height: 150px + :align: center + + Motor workflows using PyAEDT. \ No newline at end of file diff --git a/examples/04-low_frequency/multiphysics/index.rst b/examples/04-low_frequency/multiphysics/index.rst new file mode 100644 index 000000000..369e056df --- /dev/null +++ b/examples/04-low_frequency/multiphysics/index.rst @@ -0,0 +1,8 @@ +Multiphysics +~~~~~~~~~~~~ + +These examples use PyAEDT to show some multiphysics examples + +.. nbgallery:: + + maxwell_icepak.py diff --git a/examples/09-Multiphysics/Maxwell_Icepak_Wireless_Charging.py b/examples/04-low_frequency/multiphysics/maxwell_icepak.py similarity index 99% rename from examples/09-Multiphysics/Maxwell_Icepak_Wireless_Charging.py rename to examples/04-low_frequency/multiphysics/maxwell_icepak.py index ca65f2250..3902e47d0 100644 --- a/examples/09-Multiphysics/Maxwell_Icepak_Wireless_Charging.py +++ b/examples/04-low_frequency/multiphysics/maxwell_icepak.py @@ -6,7 +6,7 @@ # Icepak calculates a temperature distribution, and it is mapped back to Maxwell (2-way coupling). # Coil resistance and ohmic loss are analyzed again in Maxwell. Results are printed in AEDT Message Manager. # -# Keywords: **Multiphysics**, **Maxwell**, **Icepak**, **Wirless Charging**. +# Keywords: **Multiphysics**, **Maxwell**, **Icepak**, **Wireless Charging**. # # ## Set up project # diff --git a/examples/03-Maxwell3D/Maxwell3DTeam7.py b/examples/04-low_frequency/team_problem/asymmetric_conductor.py similarity index 99% rename from examples/03-Maxwell3D/Maxwell3DTeam7.py rename to examples/04-low_frequency/team_problem/asymmetric_conductor.py index 93d971be4..62c10a672 100644 --- a/examples/03-Maxwell3D/Maxwell3DTeam7.py +++ b/examples/04-low_frequency/team_problem/asymmetric_conductor.py @@ -22,7 +22,7 @@ AEDT_VERSION = "2024.2" NUM_CORES = 4 -NG_MODE = True # Open Electronics UI when the application is launched. +NG_MODE = False # Open Electronics UI when the application is launched. # ## Create temporary directory # diff --git a/examples/03-Maxwell3D/Maxwell3D_Team3_bath_plate.py b/examples/04-low_frequency/team_problem/bath_plate.py similarity index 97% rename from examples/03-Maxwell3D/Maxwell3D_Team3_bath_plate.py rename to examples/04-low_frequency/team_problem/bath_plate.py index 76321657b..fb7052235 100644 --- a/examples/03-Maxwell3D/Maxwell3D_Team3_bath_plate.py +++ b/examples/04-low_frequency/team_problem/bath_plate.py @@ -20,7 +20,7 @@ AEDT_VERSION = "2024.2" NUM_CORES = 4 -NG_MODE = False # Open Electronics UI when the application is launched. +NG_MODE = True # Open Electronics UI when the application is launched. # ## Create temporary directory # @@ -92,12 +92,12 @@ # # Add a mesh refinement to the ladder plate. -m3d.mesh.assign_length_mesh( - assignment="LadderPlate", - maximum_length=3, - maximum_elements=None, - name="Ladder_Mesh", -) +# m3d.mesh.assign_length_mesh( +# assignment="LadderPlate", +# maximum_length=3, +# maximum_elements=None, +# name="Ladder_Mesh", +# ) # ## Draw search coil and assign excitation # diff --git a/examples/04-low_frequency/team_problem/index.rst b/examples/04-low_frequency/team_problem/index.rst new file mode 100644 index 000000000..ceb826b3c --- /dev/null +++ b/examples/04-low_frequency/team_problem/index.rst @@ -0,0 +1,9 @@ +T.E.A.M. +~~~~~~~~ + +These examples use PyAEDT to show some T.E.A.M. examples + +.. nbgallery:: + + asymmetric_conductor.py + bath_plate.py diff --git a/examples/05-Icepak/_static/pcb_icepak.png b/examples/05-Icepak/_static/pcb_icepak.png deleted file mode 100644 index 8e28239f5..000000000 Binary files a/examples/05-Icepak/_static/pcb_icepak.png and /dev/null differ diff --git a/examples/05-Icepak/index.rst b/examples/05-Icepak/index.rst deleted file mode 100644 index ca3a59f05..000000000 --- a/examples/05-Icepak/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -Icepak examples -~~~~~~~~~~~~~~~ -These examples use PyAEDT to show end-to-end workflows for Icepak. This includes -schematic generation, setup, and thermal postprocessing. - -.. nbgallery:: - - icepak_3d_components_example.py - icepak_csv_import.py - icepak_ecad_import.py - icepak_graphic_card_example.py - icepak_sherlock_example.py diff --git a/examples/05-Icepak/_static/bdf.png b/examples/05-electrothermal/_static/bdf.png similarity index 100% rename from examples/05-Icepak/_static/bdf.png rename to examples/05-electrothermal/_static/bdf.png diff --git a/examples/05-electrothermal/_static/icepak_logo.png b/examples/05-electrothermal/_static/icepak_logo.png new file mode 100644 index 000000000..3ccf55fd1 Binary files /dev/null and b/examples/05-electrothermal/_static/icepak_logo.png differ diff --git a/examples/05-Icepak/_static/ldf.png b/examples/05-electrothermal/_static/ldf.png similarity index 100% rename from examples/05-Icepak/_static/ldf.png rename to examples/05-electrothermal/_static/ldf.png diff --git a/examples/09-Multiphysics/Hfss_Icepak_Coupling.py b/examples/05-electrothermal/coaxial_hfss_icepak.py similarity index 99% rename from examples/09-Multiphysics/Hfss_Icepak_Coupling.py rename to examples/05-electrothermal/coaxial_hfss_icepak.py index fe84415a9..5ad1eb1da 100644 --- a/examples/09-Multiphysics/Hfss_Icepak_Coupling.py +++ b/examples/05-electrothermal/coaxial_hfss_icepak.py @@ -1,4 +1,4 @@ -# # HFSS-Icepak coupling workflow +# # Coaxial # # This example shows how you can create a project from scratch in HFSS and Icepak. # This includes creating a setup, solving it, and creating postprocessing outputs. diff --git a/examples/05-Icepak/icepak_3d_components_example.py b/examples/05-electrothermal/component_3d.py similarity index 100% rename from examples/05-Icepak/icepak_3d_components_example.py rename to examples/05-electrothermal/component_3d.py diff --git a/examples/05-Icepak/icepak_csv_import.py b/examples/05-electrothermal/components_csv.py similarity index 100% rename from examples/05-Icepak/icepak_csv_import.py rename to examples/05-electrothermal/components_csv.py diff --git a/examples/05-Icepak/icepak_ecad_import.py b/examples/05-electrothermal/ecad_import.py similarity index 100% rename from examples/05-Icepak/icepak_ecad_import.py rename to examples/05-electrothermal/ecad_import.py diff --git a/examples/04-Layout/hfss_3d_layout/05_electrothermal.py b/examples/05-electrothermal/electrothermal.py similarity index 98% rename from examples/04-Layout/hfss_3d_layout/05_electrothermal.py rename to examples/05-electrothermal/electrothermal.py index c64108c34..20a80105a 100644 --- a/examples/04-Layout/hfss_3d_layout/05_electrothermal.py +++ b/examples/05-electrothermal/electrothermal.py @@ -1,7 +1,7 @@ # # Electrothermal Analysis # # This example shows how to use the electronics database (EDB) for DC IR analysis and -# electrotermal analysis. The EDB will be loaded into SIwave for analysis and post-processing. +# electrothermal analysis. The EDB will be loaded into SIwave for analysis and post-processing. # In the end, an Icepak project is exported from SIwave. # - Set up EDB # - Assign package and heatsink model to components diff --git a/examples/05-Icepak/icepak_graphic_card_example.py b/examples/05-electrothermal/graphic_card.py similarity index 100% rename from examples/05-Icepak/icepak_graphic_card_example.py rename to examples/05-electrothermal/graphic_card.py diff --git a/examples/09-Multiphysics/Circuit_Hfss_Icepak_Coupling.py b/examples/05-electrothermal/icepak_circuit_hfss_coupling.py similarity index 100% rename from examples/09-Multiphysics/Circuit_Hfss_Icepak_Coupling.py rename to examples/05-electrothermal/icepak_circuit_hfss_coupling.py diff --git a/examples/05-electrothermal/index.rst b/examples/05-electrothermal/index.rst new file mode 100644 index 000000000..0a5792318 --- /dev/null +++ b/examples/05-electrothermal/index.rst @@ -0,0 +1,18 @@ +Electrothermal +~~~~~~~~~~~~~~ + +These examples use PyAEDT to show electrothermal capabilities of AEDT + +.. nbgallery:: + + components_csv.py + ecad_import.py + assign_boundaries.py + component_3d.py + graphic_card.py + coaxial_hfss_icepak.py + sherlock.py + icepak_circuit_hfss_coupling.py + electrothermal.py + ../04-low_frequency/multiphysics/maxwell_icepak.py + ../02-aedt_general/report/virtual_compliance.py \ No newline at end of file diff --git a/examples/05-Icepak/icepak_sherlock_example.py b/examples/05-electrothermal/sherlock.py similarity index 100% rename from examples/05-Icepak/icepak_sherlock_example.py rename to examples/05-electrothermal/sherlock.py diff --git a/examples/06-AEDT/_static/aedt.png b/examples/06-AEDT/_static/aedt.png new file mode 100644 index 000000000..e69de29bb diff --git a/examples/06-AEDT/circuit/index.rst b/examples/06-AEDT/circuit/index.rst new file mode 100644 index 000000000..16b06fc4b --- /dev/null +++ b/examples/06-AEDT/circuit/index.rst @@ -0,0 +1,15 @@ +Circuit +~~~~~~~ + +These examples use PyAEDT to show Circuit capabilities + +.. nbgallery:: + + ../../02-aedt_general/modeler/circuit_schematic.py + ../../02-aedt_general/modeler/netlist_to_schematic.py + ../../02-aedt_general/report/automatic_report.py + ../../02-aedt_general/report/virtual_compliance.py + ../../03-high_frequency/emc/subcircuit.py + ../../03-high_frequency/layout/signal_integrity/ami.py + ../../03-high_frequency/layout/signal_integrity/circuit_transient.py + ../../03-high_frequency/layout/signal_integrity/multizone.py \ No newline at end of file diff --git a/examples/06-AEDT/emit/index.rst b/examples/06-AEDT/emit/index.rst new file mode 100644 index 000000000..9a630441e --- /dev/null +++ b/examples/06-AEDT/emit/index.rst @@ -0,0 +1,12 @@ +EMIT +~~~~ + +These examples use PyAEDT to show EMIT capabilities + +.. nbgallery:: + + ../../03-high_frequency/antenna/interferences/antenna.py + ../../03-high_frequency/antenna/interferences/hfss_emit.py + ../../03-high_frequency/antenna/interferences/interference.py + ../../03-high_frequency/antenna/interferences/interference_type.py + ../../03-high_frequency/antenna/interferences/protection.py \ No newline at end of file diff --git a/examples/06-AEDT/hfss/index.rst b/examples/06-AEDT/hfss/index.rst new file mode 100644 index 000000000..828f4921b --- /dev/null +++ b/examples/06-AEDT/hfss/index.rst @@ -0,0 +1,24 @@ +HFSS +~~~~ + +These examples use PyAEDT to show HFSS capabilities + +.. nbgallery:: + + ../../03-high_frequency/antenna/array.py + ../../03-high_frequency/antenna/dipole.py + ../../03-high_frequency/antenna/fss_unitcell.py + ../../03-high_frequency/antenna/patch.py + ../../03-high_frequency/antenna/large_scenarios/city.py + ../../03-high_frequency/antenna/large_scenarios/doppler.py + ../../03-high_frequency/antenna/large_scenarios/reflector.py + ../../03-high_frequency/antenna/large_scenarios/time_domain.py + ../../03-high_frequency/emc/choke.py + ../../03-high_frequency/emc/eigenmode.py + ../../03-high_frequency/emc/flex_cable.py + ../../03-high_frequency/multiphysics/hfss_mechanical.py + ../../03-high_frequency/multiphysics/mri.py + ../../03-high_frequency/radiofrequency_mmwave/iris_filter.py + ../../03-high_frequency/radiofrequency_mmwave/spiral.py + ../../05-electrothermal/coaxial_hfss_icepak.py + ../../05-electrothermal/icepak_circuit_hfss_coupling.py \ No newline at end of file diff --git a/examples/06-AEDT/hfss_3d_layout/index.rst b/examples/06-AEDT/hfss_3d_layout/index.rst new file mode 100644 index 000000000..0fd5dc7b7 --- /dev/null +++ b/examples/06-AEDT/hfss_3d_layout/index.rst @@ -0,0 +1,12 @@ +HFSS 3D Layout +~~~~~~~~~~~~~~ + +These examples use PyAEDT to show HFSS 3D Layout capabilities + +.. nbgallery:: + + ../../03-high_frequency/layout/power_integrity/dcir.py + ../../03-high_frequency/layout/power_integrity/power_integrity.py + ../../03-high_frequency/layout/signal_integrity/pre_layout.py + ../../03-high_frequency/layout/signal_integrity/pre_layout_parametrized.py + ../../03-high_frequency/layout/gui_manipulation.py \ No newline at end of file diff --git a/examples/06-AEDT/icepak/index.rst b/examples/06-AEDT/icepak/index.rst new file mode 100644 index 000000000..25c4a9f78 --- /dev/null +++ b/examples/06-AEDT/icepak/index.rst @@ -0,0 +1,15 @@ +Icepak +~~~~~~ + +These examples use PyAEDT to show Icepak capabilities + +.. nbgallery:: + + ../../05-electrothermal/coaxial_hfss_icepak.py + ../../05-electrothermal/component_3d.py + ../../05-electrothermal/component_csv.py + ../../05-electrothermal/ecad_import.py + ../../05-electrothermal/electrothermal.py + ../../05-electrothermal/graphic_card.py + ../../05-electrothermal/icepak_circuit_hfss_coupling.py + ../../05-electrothermal/sherlock.py \ No newline at end of file diff --git a/examples/06-AEDT/index.rst b/examples/06-AEDT/index.rst new file mode 100644 index 000000000..47ae4c109 --- /dev/null +++ b/examples/06-AEDT/index.rst @@ -0,0 +1,77 @@ +Examples by AEDT application +=========================== + +Examples divided by AEDT application. + + +.. grid:: 2 + + .. grid-item-card:: HFSS + :padding: 2 2 2 2 + :link: hfss/index + :link-type: doc + + This section shows HFSS examples + + .. grid-item-card:: Maxwell 3D + :padding: 2 2 2 2 + :link: maxwell_3d/index + :link-type: doc + + This section shows Maxwell 3D examples + + .. grid-item-card:: Maxwell 2D + :padding: 2 2 2 2 + :link: maxwell_2d/index + :link-type: doc + + This section shows Maxwell 2D examples + + .. grid-item-card:: Icepak + :padding: 2 2 2 2 + :link: icepak/index + :link-type: doc + + This section shows Icepak examples + + .. grid-item-card:: HFSS 3D Layout + :padding: 2 2 2 2 + :link: hfss_3d_layout/index + :link-type: doc + + This section shows HFSS 3D Layout examples + + .. grid-item-card:: Q3D and 2D Extractor + :padding: 2 2 2 2 + :link: q3d_q2d/index + :link-type: doc + + This section shows Q3D and 2D Extractor examples + + .. grid-item-card:: Circuit + :padding: 2 2 2 2 + :link: circuit/index + :link-type: doc + + This section shows Circuit examples + + .. grid-item-card:: EMIT + :padding: 2 2 2 2 + :link: emit/index + :link-type: doc + + This section shows EMIT examples + + .. grid-item-card:: Twin Builder + :padding: 2 2 2 2 + :link: twin_builder/index + :link-type: doc + + This section shows Twin Builder examples + + .. grid-item-card:: Miscellaneous + :padding: 2 2 2 2 + :link: misc/index + :link-type: doc + + This section shows miscellaneous examples \ No newline at end of file diff --git a/examples/06-AEDT/maxwell_2d/index.rst b/examples/06-AEDT/maxwell_2d/index.rst new file mode 100644 index 000000000..d515e6bbf --- /dev/null +++ b/examples/06-AEDT/maxwell_2d/index.rst @@ -0,0 +1,19 @@ +Maxwell 2D +~~~~~~~~~~ + +These examples use PyAEDT to show Maxwell 2D capabilities + +.. nbgallery:: + + ../../04-low_frequency/general/control_program.py + ../../04-low_frequency/general/eddy_current.py + ../../04-low_frequency/general/electrostatic.py + ../../04-low_frequency/general/external_circuit.py + ../../04-low_frequency/general/resistance.py + ../../04-low_frequency/magnetic/magneto_motive_contour.py + ../../04-low_frequency/magnetic/magneto_motive_line.py + ../../04-low_frequency/magnetic/transient_winding.py + ../../04-low_frequency/magnetic/lorentz_actuator.py + ../../04-low_frequency/motor/aedt_motor/pm_synchronous.py + ../../04-low_frequency/motor/aedt_motor/rmxpert.py + ../../04-low_frequency/motor/aedt_motor/transformer_inductance.py \ No newline at end of file diff --git a/examples/06-AEDT/maxwell_3d/index.rst b/examples/06-AEDT/maxwell_3d/index.rst new file mode 100644 index 000000000..c707ff138 --- /dev/null +++ b/examples/06-AEDT/maxwell_3d/index.rst @@ -0,0 +1,15 @@ +Maxwell 3D +~~~~~~~~~~ + +These examples use PyAEDT to show Maxwell 3D capabilities + +.. nbgallery:: + + ../../04-low_frequency/general/dc_analysis.py + ../../04-low_frequency/general/field_export.py + ../../04-low_frequency/magnetic/choke.py + ../../04-low_frequency/motor/aedt_motor/magnet_segmentation.py + ../../04-low_frequency/motor/aedt_motor/transformer.py + ../../04-low_frequency/multiphysics/maxwell_icepak.py + ../../04-low_frequency/team_problem/asymmetric_conductor.py + ../../04-low_frequency/team_problem/bath_plate.py \ No newline at end of file diff --git a/examples/06-AEDT/misc/index.rst b/examples/06-AEDT/misc/index.rst new file mode 100644 index 000000000..4e073cccc --- /dev/null +++ b/examples/06-AEDT/misc/index.rst @@ -0,0 +1,10 @@ +Miscellaneous +~~~~~~~~~~~~~ + +These examples use PyAEDT to show miscellaneous capabilities + +.. nbgallery:: + + ../../02-aedt_general/report/touchstone_file.py + ../../03-high_frequency/layout/signal_integrity/com_analysis.py + ../../03-high_frequency/radiofrequency_mmwave/lumped_element.py \ No newline at end of file diff --git a/examples/06-AEDT/q3d_q2d/index.rst b/examples/06-AEDT/q3d_q2d/index.rst new file mode 100644 index 000000000..a1f1caa08 --- /dev/null +++ b/examples/06-AEDT/q3d_q2d/index.rst @@ -0,0 +1,13 @@ +Q2D-Q3D +~~~~~~~ + +These examples use PyAEDT to show Q3D and 2D Extractor capabilities + +.. nbgallery:: + + ../../03-high_frequency/emc/armoured_cable.py + ../../03-high_frequency/emc/busbar.py + ../../03-high_frequency/layout/ac_q3d.py + ../../03-high_frequency/layout/dcir_q3d.py + ../../03-high_frequency/radiofrequency_mmwave/coplanar_waveguide.py + ../../03-high_frequency/radiofrequency_mmwave/stripline.py \ No newline at end of file diff --git a/examples/06-AEDT/twin_builder/index.rst b/examples/06-AEDT/twin_builder/index.rst new file mode 100644 index 000000000..b7598bac9 --- /dev/null +++ b/examples/06-AEDT/twin_builder/index.rst @@ -0,0 +1,11 @@ +Twin Builder +~~~~~~~~~~~~ + +These examples use PyAEDT to show Twin Builder capabilities + +.. nbgallery:: + + ../../04-low_frequency/general/twin_builder/dynamic_rom.py + ../../04-low_frequency/general/twin_builder/rc_circuit.py + ../../04-low_frequency/general/twin_builder/rectifier.py + ../../04-low_frequency/general/twin_builder/static_rom.py \ No newline at end of file diff --git a/examples/06-Q3D/_static/busbar.png b/examples/06-Q3D/_static/busbar.png deleted file mode 100644 index d75ee664b..000000000 Binary files a/examples/06-Q3D/_static/busbar.png and /dev/null differ diff --git a/examples/06-Q3D/index.rst b/examples/06-Q3D/index.rst deleted file mode 100644 index 7af9a0b2c..000000000 --- a/examples/06-Q3D/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -2D Extractor and Q3D Extractor examples -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for 2D Extractor and -Q3D Extractor. This includes model generation, setup, and thermal postprocessing. - -.. nbgallery:: - - Q2D_Armoured_Cable.py - Q2D_Example_CPWG.py - Q2D_Example_Stripline.py - Q3D_DC_IR.py - Q3D_Example_Busbars.py - Q3D_from_EDB.py \ No newline at end of file diff --git a/examples/07-SBR+/index.rst b/examples/07-SBR+/index.rst deleted file mode 100644 index ca2a3ca0d..000000000 --- a/examples/07-SBR+/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -SBR+ examples -~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for HFSS SBR+. -This includes model generation, setup, meshing, and postprocessing. - -.. nbgallery:: - - SBR_City_Import.py - SBR_Doppler_Example.py - SBR_Example.py - SBR_Time_Plot.py - diff --git a/examples/08-Circuit/index.rst b/examples/08-Circuit/index.rst deleted file mode 100644 index 74bf15bc2..000000000 --- a/examples/08-Circuit/index.rst +++ /dev/null @@ -1,15 +0,0 @@ -Circuit examples -~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for Circuit. -This includes schematic generation, setup, and postprocessing. - -.. nbgallery:: - - Circuit_AMI.py - Circuit_Example.py - Circuit_Siwave_Multizones.py - Circuit_Subcircuit_Example.py - Circuit_Transient.py - Create_Netlist.py - Results.py - Touchstone_Management.py \ No newline at end of file diff --git a/examples/09-Multiphysics/index.rst b/examples/09-Multiphysics/index.rst deleted file mode 100644 index fedcd1b5c..000000000 --- a/examples/09-Multiphysics/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -Multiphysics examples -~~~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to create some multiphysics workflows. They might use -an electromagnetic tool like HFSS or Maxwell and a thermal or structural tool -like Icepak or Mechanical. - -.. nbgallery:: - - Hfss_Icepak_Coupling.py - Circuit_Hfss_Icepak_Coupling.py - Hfss_Mechanical.py - Maxwell_Icepak_Wireless_Charging.py - MRI.py \ No newline at end of file diff --git a/examples/10-EMIT/_static/emit_hfss.png b/examples/10-EMIT/_static/emit_hfss.png deleted file mode 100644 index 0b641f5ed..000000000 Binary files a/examples/10-EMIT/_static/emit_hfss.png and /dev/null differ diff --git a/examples/10-EMIT/index.rst b/examples/10-EMIT/index.rst deleted file mode 100644 index 0453065f3..000000000 --- a/examples/10-EMIT/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -EMIT examples -~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for EMIT. -This includes schematic generation, setup, and postprocessing. - -.. nbgallery:: - - ComputeInterferenceType.py - ComputeProtectionLevels.py - EMIT_Example.py - EMIT_HFSS_Example.py - interference_gui.py \ No newline at end of file diff --git a/examples/11-twin_builder/index.rst b/examples/11-twin_builder/index.rst deleted file mode 100644 index c3d9594e6..000000000 --- a/examples/11-twin_builder/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -Twin Builder examples -~~~~~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some end-to-end workflows for Twin Builder. -This includes schematic generation, setup, and postprocessing. - -.. nbgallery:: - - rc_circuit.py - wiring_rectifier.py - dynamic_rom_creation_and_visualization.py - static_rom_creation_and_visualization.py diff --git a/examples/12-general/_static/e3dcomp.png b/examples/12-general/_static/e3dcomp.png deleted file mode 100644 index 0c650cfb2..000000000 Binary files a/examples/12-general/_static/e3dcomp.png and /dev/null differ diff --git a/examples/12-general/index.rst b/examples/12-general/index.rst deleted file mode 100644 index 5c6b99fd1..000000000 --- a/examples/12-general/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -General workflows -~~~~~~~~~~~~~~~~~ -These examples use PyAEDT to show some general end-to-end workflows. - -.. nbgallery:: - - com_analysis.py - convert_model_version.py - Maxwell_RMxprt.py - Lumped_Element_Response diff --git a/examples/index.rst b/examples/index.rst index 83e92aa6c..329b6ae83 100644 --- a/examples/index.rst +++ b/examples/index.rst @@ -4,20 +4,11 @@ :hidden: :maxdepth: 2 - - 01-Modeling-Setup/index - 02-HFSS/index - 03-Maxwell3D/index - 03-Maxwell2D/index - 04-Layout/index - 05-Icepak/index - 06-Q3D/index - 07-SBR+/index - 08-Circuit/index - 09-Multiphysics/index - 10-EMIT/index - 11-twin_builder/index - 12-general/index + 02-aedt_general/index + 03-high_frequency/index + 04-low_frequency/index + 05-electrothermal/index + 06-AEDT/index Examples