Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/match pyaedt examples #216

Merged
merged 11 commits into from
Aug 26, 2024
1 change: 1 addition & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def setup(app):
"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",
Expand Down
8 changes: 4 additions & 4 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ These end-to-end examples show how you can use PyAEDT.

Uncover the various uses of Maxwell 2D

.. grid-item-card:: HFSS 3D Layout
.. grid-item-card:: Layout
:padding: 2 2 2 2
:link: examples/04-HFSS3DLayout/index
:link: examples/04-Layout/index
:link-type: doc

.. image:: examples/04-HFSS3DLayout/_static/HFSS_3DL.png
.. image:: examples/04-Layout/hfss_3d_layout/_static/HFSS_3DL.png
:alt: Flex assembly
:width: 200px
:height: 150px

Discover use cases of HFSS 3D Layout
Explore end-to-end workflows for Layout automation

.. grid-item-card:: Icepak
:padding: 2 2 2 2
Expand Down
4 changes: 2 additions & 2 deletions examples/02-HFSS/HFSS_Spiral.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def create_line(pts):
hfss.modeler.create_rectangle(
orientation=ansys.aedt.core.constants.PLANE.YZ,
origin=[abs(x1) + 5, y0 - width / 2, -gap - thickness / 2],
sizes=[width, "Tsub+{}{}".format(gap, hfss.modeler.model_units)],
sizes=[width, "-Tsub+{}{}".format(gap, hfss.modeler.model_units)],
name="port1",
)
hfss.lumped_port(assignment="port1", integration_line=ansys.aedt.core.constants.AXIS.Z)
Expand Down Expand Up @@ -203,7 +203,7 @@ def create_line(pts):

data = hfss.post.get_solution_data([L_formula, Q_formula])
data.plot(
curves=[L_formula, Q_formula], math_formula="re", xlabel="Freq", ylabel="L and Q"
curves=[L_formula, Q_formula], formula="re", x_label="Freq", y_label="L and Q"
)

# Export results to csv file
Expand Down
2 changes: 1 addition & 1 deletion examples/03-Maxwell2D/Maxwell2D_DCConduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
sweep["SaveFields"] = True
sweep["CopyMesh"] = True
sweep["SolveWithCopiedMeshOnly"] = True
m2d.ooptimetrics.SolveSetup(sweep.name)
sweep.analyze(cores=NUM_CORES)

# ## Create resistance report
#
Expand Down
2 changes: 1 addition & 1 deletion examples/03-Maxwell2D/Maxwell2D_H_contour_opt2.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

# ## Analyze parametric sweep

m2d.ooptimetrics.SolveSetup(param_sweep.name)
param_sweep.analyze(cores=NUM_CORES)

# ## Create a data table report
#
Expand Down
2 changes: 1 addition & 1 deletion examples/03-Maxwell3D/Maxwell3D_Team3_bath_plate.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
# Solve the parametric sweep directly so that results of all variations are available.

m3d.save_project()
m3d.ooptimetrics.SolveSetup(sweep_name)
param.analyze(cores=NUM_CORES)

# ## Create expression for Bz
#
Expand Down
Binary file added examples/04-Layout/edb/_static/stackup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions examples/04-Layout/edb/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 <https://edb.docs.pyansys.com/version/stable/examples/index.html>`_ 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")
Loading
Loading