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: HFSS Setup error #5618 #5619

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

Devin-Crawford
Copy link
Contributor

@Devin-Crawford Devin-Crawford commented Dec 28, 2024

Resolve #5618

Description

\ansys\aedt\core\modules\setup_templates.py

  • Change autosweep default from "LinearStep" to "LinearCount" to match the default behavior of HFSS.
  • Use "RangeCount": 501

\ansys\aedt\core\hfss.py

  • Update docstring errors for create_setup()

\ansys\aedt\core\application.py

  • Change default setup from 1 to 0 for HFSS where appropriate.

\ansys\aedt\core\application\analysis.py

  • Correct an error that would always use an auto-generated name for the setup.

Issue linked

Close #5618

Checklist

  • I have tested my changes locally.
  • I have added necessary documentation or updated existing documentation.
  • I have followed the coding style guidelines of this project.
  • I have added appropriate tests (unit, integration, system).
  • I have reviewed my changes before submitting this pull request.
  • I have linked the issue or issues that are solved by the PR if any.
  • I have agreed with the Contributor License Agreement (CLA).

\ansys\aedt\core\modules\setup_templates.py
- Change autosweep default from "LinearStep" to "LinearCount" to match the default behavior of HFSS.
- Use "RangeCount": 501

\ansys\aedt\core\hfss.py
- Update docstring errors for create_setup()

\ansys\aedt\core\application.py
- Change default setup from 1 to 0 for HFSS where appropriate.

\ansys\aedt\core\application\analysis.py
- Correct an error that would always use an auto-generated name for the setup.
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@github-actions github-actions bot added the bug Something isn't working label Dec 28, 2024
Copy link

codecov bot commented Dec 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.49%. Comparing base (a457727) to head (841f36b).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5619       +/-   ##
===========================================
- Coverage   85.27%   43.49%   -41.79%     
===========================================
  Files         152      152               
  Lines       60990    60991        +1     
===========================================
- Hits        52011    26529    -25482     
- Misses       8979    34462    +25483     

MaxJPRey
MaxJPRey previously approved these changes Dec 29, 2024
Copy link
Collaborator

@MaxJPRey MaxJPRey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

- The docstring for Hfss.create_setup had an error.
  The text "HFSSDrivenDefault" is not a valid argument
  for setup_type.
- Updated test_02_hfss_export_results by adding the
  argument setup_type which was not present previously.
- Added a few more assert statements to that test.
- Added the solve frequency as a variable that is retrieved
  from the setup since this is re-used multiple times.
- Added a test for HFSS setups in test_20_HFSS.py
pre-commit-ci bot and others added 8 commits January 3, 2025 18:03
- Replace deprecated create_discrete_sweep() with create_frequency_sweep()
- choke_designer.py uses the "HFSSDriven" setup type. This must
  must be passed explicitly with the "setup_type" argument.
Some changes were made inadvertently.
A 2nd attempt to create a setup name with the same name
would cause an error in AEDT. Now check if the setup
exists and assign a unique name if the name is used..
@@ -77,7 +77,19 @@ def test_01_save(self):
assert os.path.exists(test_project)

def test_01A_check_setup(self):
assert self.aedtapp.active_setup is None
# Use the built-in Waveguide Tee example.
filter_fn = os.path.join("Examples", "HFSS", "Filters", "ceramic_monoblock_MMDS_Band.aedt")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Devin-Crawford I think this is dangerous because the name of the example could change from different versions. I would create a dummy project if this is really needed, and add it to PyAEDT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug located in Hfss.create_setup()
3 participants