Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into fix_5580
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcapodi78 committed Feb 6, 2025
2 parents 27baa41 + ddecb1d commit 8a6ab01
Show file tree
Hide file tree
Showing 545 changed files with 57,727 additions and 302,001 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,17 @@ jobs:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [package, doc-build]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
id-token: write
contents: write
steps:
- name: Release to the public PyPI repository
uses: ansys/actions/release-pypi-public@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}
use-trusted-publisher: true

- name: Release to GitHub
uses: ansys/actions/release-github@v8
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 - 2024 ANSYS, Inc. and/or its affiliates.
Copyright (c) 2021 - 2025 ANSYS, Inc. and/or its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
1 change: 0 additions & 1 deletion doc/source/API/Application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Available PyAEDT apps are:
ansys.aedt.core.maxwellcircuit.MaxwellCircuit
ansys.aedt.core.emit.Emit
ansys.aedt.core.twinbuilder.TwinBuilder
ansys.aedt.core.filtersolutions.FilterSolutions

All other classes and methods are inherited into the app class.
AEDT, which is also referred to as the desktop app, is implicitly launched in any PyAEDT app.
Expand Down
119 changes: 100 additions & 19 deletions doc/source/API/FilterSolutions.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,105 @@
Filter design
==========================
The ``FilterSolutions`` module contains all classes needed to create and edit an object including.


* ``Attributes`` to defines attributes and parameters of filters.
* ``DllInterface`` to interface with the FilterSolutions DLL.
* ``GraphSetup`` to define the frequency and time limits of the exported responses.
* ``IdealResponse`` to return the data for available ideal filter responses.
* ``MultipleBandsTable`` to manipulate access to the entries of multiple bands table.
* ``TransmissionZeros`` to manipulates access to ratio and bandwidth entries in the transmission zeros table.
* ``LumpedTopology`` to define attributes and parameters of filters implemented with lumped topology.
* ``LumpedParasitics`` to define attributes of the lumped element parasitic values.
====================
This section describes the classes used for creating and modifying parameters in the ``filtersolutions`` module.
The module provides tools for designing and customizing filter configurations.

The module includes two classes, ``LumpedDesign`` and ``DistributedDesign``, both inherited from the ``FilterDesignBase`` class as described in the :ref:`BaseFilterDesign` section.

Each class implements methods specific to its design approach while leveraging common functionality from the base class.


Lumped design
~~~~~~~~~~~~~~~~~~~
The ``LumpedDesign`` module includes all the necessary classes for creating and modifying parameters used in lumped filter designs.
Lumped filters use discrete components such as capacitors, inductors, and resistors.

* ``LumpedTopology`` to define attributes and parameters of filters implemented using a lumped topology.
* ``LumpedParasitics`` to define attributes of parasitic values associated with lumped elements.
* ``LumpedNodesandLeads`` to define attributes of the lumped node capacitors and lead inductors.
* ``LumpedTerminationImpedance`` to manipulate access to the entries of source and load complex impedance table.
* ``ExportToAedt`` to define attributes and parameters of the export page for exporting to AEDT.
* ``OptimizationGoalsTable`` to manipulate access to the entries of the optimization goals table.
* ``LumpedTerminationImpedance`` to manage access to the entries in the source and load complex impedance table.

They are accessible through:


.. currentmodule:: ansys.aedt.core.filtersolutions_core

.. autosummary::
:toctree: _autosummary
:nosignatures:


lumped_topology.LumpedTopology
lumped_parasitics.LumpedParasitics
lumped_nodes_and_leads.LumpedNodesandLeads
lumped_termination_impedance_table.LumpedTerminationImpedance

``Lumped Filter`` example:

.. code:: python
import ansys.aedt.core
import ansys.aedt.core.filtersolutions
# This call returns an instance of the LumpedDesign class
design = ansys.aedt.core.FilterSolutions.LumpedDesign(version= "2025.1")
# This property in the Attributes class specifies the filter class as band pass
design.attributes.filter_class = FilterClass.BAND_PASS
# This property in the Attributes class specifies the filter type as Elliptic
design.attributes.filter_type = FilterType.ELLIPTIC
# This property in the LumpedTopology class enables the trap topology by setting it to true
design.topology.trap_topology = True
...
Distributed design
~~~~~~~~~~~~~~~~~~~
The ``DistributedDesign`` module includes all the necessary classes for creating and modifying parameters used in distributed filter designs.
Distributed filters rely on transmission lines and resonators.

* ``DistributedTopology`` to define attributes and parameters of filters implemented using a distributed topology.

They are accessible through:


.. currentmodule:: ansys.aedt.core.filtersolutions_core

.. autosummary::
:toctree: _autosummary
:nosignatures:


distributed_topology.DistributedTopology

``Distributed Filter`` example:

.. code:: python
import ansys.aedt.core
import ansys.aedt.core.filtersolutions
# This call returns an instance of the DistributedDesign class
design = ansys.aedt.core.FilterSolutions.DistributedDesign(version= "2025.2")
# This property in the Attributes class specifies the filter class as band pass
design.attributes.filter_class = FilterClass.BAND_PASS
# This property in the Attributes class specifies the filter type as Elliptic
design.attributes.filter_type = FilterType.ELLIPTIC
# This property in the DistributedTopology class sets the load resistance to 50 ohms.
design.topology.load_resistance = "50"
...
.. _BaseFilterDesign:

Base filter design
~~~~~~~~~~~~~~~~~~~
The ``FilterDesignBase`` module provides all the essential classes for creating and modifying the primary parameters applicable to all design types.

* ``Attributes`` to define attributes and parameters of filters.
* ``DllInterface`` to establish an interface with the FilterSolutions DLL.
* ``GraphSetup`` to define the frequency and time graph parameters of the exported responses.
* ``IdealResponse`` to return the data for the available ideal filter responses.
* ``MultipleBandsTable`` to manage access to the entries in the multiple bands table.
* ``TransmissionZeros`` to manage access to ratio and bandwidth entries in the transmission zeros table.
* ``ExportToAedt`` to define attributes and parameters for the export page when exporting to AEDT.
* ``OptimizationGoalsTable`` to manage access to the entries in the optimization goals table.

They are accessible through:

Expand All @@ -27,15 +110,13 @@ They are accessible through:
:toctree: _autosummary
:nosignatures:


attributes.Attributes
dll_interface.DllInterface
graph_setup.GraphSetup
ideal_response.IdealResponse
multiple_bands_table.MultipleBandsTable
transmission_zeros.TransmissionZeros
lumped_topology.LumpedTopology
lumped_parasitics.LumpedParasitics
lumped_nodes_and_leads.LumpedNodesandLeads
lumped_termination_impedance_table.LumpedTerminationImpedance
export_to_aedt.ExportToAedt
optimization_goals_table.OptimizationGoalsTable

14 changes: 7 additions & 7 deletions doc/source/Getting_started/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requires Ansys Electronics Desktop (AEDT) 2022 R1 or later. The AEDT Student Ver

Install from PyAEDT installer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following python script automatically installs PyAEDT from AEDT,
The following Python script automatically installs PyAEDT from AEDT,
using the CPython interpreter included in the AEDT installation.

In order to do that you can:
Expand All @@ -23,7 +23,7 @@ In order to do that you can:

- Open an Electronics Desktop Session and click on Tools->Run Script and execute the file.

- Offline install is also possible using wheelhouses.
- Offline installation is also possible using wheelhouses.

.. note::
A wheelhouse is a zip containing all needed packages that can be installed offline.
Expand Down Expand Up @@ -103,7 +103,7 @@ If you want to install the PyAEDT panels in the AEDT Automation tab, use the fol
pip install pyaedt[installer]
Finally, in the python console, run the following commands:
Finally, in the Python console, run the following commands:

.. code::
Expand All @@ -114,10 +114,10 @@ You can also install the PyAEDT panels using the following steps, this is also u

- Download the following file: :download:`PyAEDT panel Installer Python file <../Resources/toolkit_installer_from_aedt.py>`

- Define an environment variable called `PYAEDT_INTERPRETER` with the path of the python interpreter in which PyAEDT is installed.
- Define an environment variable called `PYAEDT_INTERPRETER` with the path of the Python interpreter in which PyAEDT is installed.

- Open an Electronics Desktop Session and click on Tools->Run Script and execute the file. You do not need the previous step if
you pass as an argument the path of the python interpreter.
you pass as an argument the path of the Python interpreter.


Linux support
Expand All @@ -141,7 +141,7 @@ From the `Releases <https://github.com/ansys/pyaedt/releases>`_
page in the PyAEDT repository, you can find the wheelhouses for a particular release in its
assets and download the wheelhouse specific to your setup.

There are two kind of wheelhouses: `all` and `installer`.
There are two kinds of wheelhouses: `all` and `installer`.

The `all` wheelhouse contains all PyAEDT dependencies. And the `installer` one includes `ipython` and `jupyter lab`.

Expand All @@ -160,7 +160,7 @@ If you want to add the PyAEDT panels in the AEDT Automation tab, you need first
pip install --no-cache-dir --no-index --find-links=file:///<path_to_wheelhouse>/PyAEDT-v<release_version>-wheelhouse-Windows-3.10 pyaedt[installer]
Finally, in the python console, run the following commands:
Finally, in the Python console, run the following commands:

.. code::
Expand Down
17 changes: 17 additions & 0 deletions doc/source/Getting_started/Troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,20 @@ gRPC calls on the client where the Python script is to be run.
Now run the PyAEDT script, (making sure it connects to the same port as the gRPC server - 50051).
Capture the output in a file. For example *client.txt*. Then send all the logs
to `Ansys Support <https://www.ansys.com/it-solutions/contacting-technical-support>`_.


Numpy compatibility
-------------------
If you use Numpy 2.Y.Z, you may encounter compatibility issues with PyAEDT or PyEDB.

This kind of problem can occur when a user is in a Linux environment and wants to use .NET.
If you encounter such issue, you can try patching it by importing PyAEDT or PyEDB before any import of Numpy as below

.. code-block:: python
import ansys.aedt.core
import numpy
.. note::

If you use gRPC or previous Numpy releases, you shouldn't be impacted with this issue.
22 changes: 18 additions & 4 deletions doc/source/Resources/pyaedt_installer_from_aedt.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@


VENV_DIR_PREFIX = ".pyaedt_env"

"""
It is possible create Python virtual environment in a specific directory by setting variable VENV_DIR.
For example,
VENV_DIR = "e:/pyaedt_env"
"""
VENV_DIR = None
if not VENV_DIR:
if is_windows:
VENV_DIR = os.path.join(os.environ["APPDATA"], VENV_DIR_PREFIX)
else:
VENV_DIR = os.path.join(os.environ["HOME"], VENV_DIR_PREFIX)


DISCLAIMER = (
"This script will download and install certain third-party software and/or "
"open-source software (collectively, 'Third-Party Software'). Such Third-Party "
Expand Down Expand Up @@ -99,10 +113,10 @@ def run_pyinstaller_from_c_python(oDesktop):
# Add PyAEDT tabs in AEDT
# Virtual environment path and Python executable
if is_windows:
venv_dir = os.path.join(os.environ["APPDATA"], VENV_DIR_PREFIX, python_version_new)
venv_dir = os.path.join(VENV_DIR, python_version_new)
python_exe = os.path.join(venv_dir, "Scripts", "python.exe")
else:
venv_dir = os.path.join(os.environ["HOME"], VENV_DIR_PREFIX, python_version_new)
venv_dir = os.path.join(VENV_DIR, python_version_new)
python_exe = os.path.join(venv_dir, "bin", "python")
pyaedt_path = os.path.join(venv_dir, "Lib", "site-packages", "ansys", "aedt", "core")
if is_linux:
Expand Down Expand Up @@ -207,11 +221,11 @@ def install_pyaedt():
python_version = "3_7"

if is_windows:
venv_dir = Path(os.environ["APPDATA"], VENV_DIR_PREFIX, python_version)
venv_dir = Path(VENV_DIR, python_version)
python_exe = venv_dir / "Scripts" / "python.exe"
pip_exe = venv_dir / "Scripts" / "pip.exe"
else:
venv_dir = Path(os.environ["HOME"], VENV_DIR_PREFIX, python_version)
venv_dir = Path(VENV_DIR, python_version)
python_exe = venv_dir / "bin" / "python"
pip_exe = venv_dir / "bin" / "pip"
os.environ["ANSYSEM_ROOT{}".format(args.version)] = args.edt_root
Expand Down
51 changes: 51 additions & 0 deletions doc/source/User_guide/pyaedt_extensions_doc/hfss/shielding.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Shielding Effectiveness
=======================

The **Shielding Effectiveness** extension computes the shielding effectiveness of an enclosure.
It calculates the attenuation of an electromagnetic field inside the enclosure due to the presence of a shield.

The extension provides a graphical user interface (GUI) for configuration,
or it can be used in batch mode via command line arguments.

The following image shows the extension GUI:

.. image:: ../../../_static/extensions/shielding_ui.png
:width: 800
:alt: Shielding Effectiveness GUI


Features
--------

- Configure input parameters including source sphere radius, polarization, start and stop frequency and dipole type.
- Automatic HFSS setup.
- Switch between light and dark themes in the GUI.


Using the extension
-------------------

1. Open the **Automation** tab in the HFSS interface.
2. Locate and click the **Shielding Effectiveness** icon under the Extension Manager.
3. In the GUI, users can interact with the following elements:
- **Source sphere radius**: Source sphere radius in meters. It must fit inside the shielding.
- **Polarization**: X, Y, Z polarization component.
- **Frequency**: Start and stop frequency and the number of steps to analyze.
- **Electric dipole**: Activate electric dipole. Electric or magnetic dipole are available.
- **Cores**: Number of cores for the simulation.
- Toggle between light and dark themes.
4. Click on **Launch** to start the automated workflow.


Command line
------------

The extension can also be used directly via the command line for batch processing.


Use the following syntax to run the extension:

.. toctree::
:maxdepth: 2

../commandline
Binary file added doc/source/_static/extensions/shielding_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespaces
Nastran
netlist
Nexxim
numpy
[Nn]umpy
numpydoc
openssl
[Oo]ptimetrics
Expand Down
Loading

0 comments on commit 8a6ab01

Please sign in to comment.