Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into icepak_example_sp
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzovecchietti committed Sep 11, 2024
2 parents d21cab8 + 375d518 commit 8a2ccce
Show file tree
Hide file tree
Showing 197 changed files with 1,243 additions and 697 deletions.
Binary file added doc/source/_static/thumbnails/components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/thumbnails/electrothermal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/thumbnails/lumped_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/thumbnails/modeler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/thumbnails/rmxpert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/thumbnails/touchstone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 42 additions & 27 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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.
Expand Down Expand Up @@ -381,7 +385,6 @@ def setup(app):
copybutton_prompt_text = r">>> ?|\.\.\. "
copybutton_prompt_is_regexp = True


# The language for content autogenerated.
language = "en"

Expand Down Expand Up @@ -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": ""}],
Expand Down
173 changes: 50 additions & 123 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,158 +10,85 @@ Embedding examples for `PyAEDT <https://aedt.docs.pyansys.com/version/stable/>`_
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:
Expand Down
Binary file not shown.
11 changes: 0 additions & 11 deletions examples/01-Modeling-Setup/index.rst

This file was deleted.

Binary file added examples/01-basic/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 0 additions & 17 deletions examples/02-HFSS/index.rst

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions examples/02-aedt_general/components/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
3D Components
~~~~~~~~~~~~~

These examples use PyAEDT to show some 3D Component capabilities

.. nbgallery::

reuse_component.py
component_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 8a2ccce

Please sign in to comment.