Skip to content

Commit

Permalink
Correct error to HFSS Setup default type #5618
Browse files Browse the repository at this point in the history
\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.
  • Loading branch information
Devin-Crawford committed Dec 28, 2024
1 parent 3a67112 commit c8a030b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/ansys/aedt/core/application/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,8 @@ def _create_setup(self, name="MySetupAuto", setup_type=None, props=None):

if setup_type is None:
setup_type = self.design_solutions.default_setup
name = self.generate_unique_setup_name(name)
if not name:
name = self.generate_unique_setup_name(name)

Check warning on line 1359 in src/ansys/aedt/core/application/analysis.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/application/analysis.py#L1358-L1359

Added lines #L1358 - L1359 were not covered by tests
if setup_type == 0:
setup = SetupHFSSAuto(self, setup_type, name)
elif setup_type == 4:
Expand Down
8 changes: 4 additions & 4 deletions src/ansys/aedt/core/application/design_solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,31 +342,31 @@
"name": "HFSS Modal Network",
"options": None,
"report_type": "Modal Solution Data",
"default_setup": 1,
"default_setup": 0,
"default_adaptive": "LastAdaptive",
"intrinsics": ["Freq", "Phase"],
},
"Terminal": {
"name": "HFSS Terminal Network",
"options": None,
"report_type": "Terminal Solution Data",
"default_setup": 1,
"default_setup": 0,
"default_adaptive": "LastAdaptive",
"intrinsics": ["Freq", "Phase"],
},
"DrivenModal": {
"name": "DrivenModal",
"options": None,
"report_type": "Modal Solution Data",
"default_setup": 1,
"default_setup": 0,
"default_adaptive": "LastAdaptive",
"intrinsics": ["Freq", "Phase"],
},
"DrivenTerminal": {
"name": "DrivenTerminal",
"options": None,
"report_type": "Terminal Solution Data",
"default_setup": 1,
"default_setup": 0,
"default_adaptive": "LastAdaptive",
"intrinsics": ["Freq", "Phase"],
},
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/aedt/core/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,7 @@ def create_setup(self, name="MySetupAuto", setup_type=None, **kwargs):
``"HFSSDrivenAuto"``, ``"HFSSDrivenDefault"``, ``"HFSSEigen"``, ``"HFSSTransient"``,
and ``"HFSSSBR"``. The default is ``"HFSSDrivenAuto"``.
**kwargs : dict, optional
Extra arguments to set up the circuit.
Available keys depend on the setup chosen.
Keyword arguments from the native AEDT API.
For more information, see
:doc:`../SetupTemplatesHFSS`.
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/modules/setup_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq):


meshlink = dict({"ImportMesh": False})
autosweep = dict({"RangeType": "LinearStep", "RangeStart": "1GHz", "RangeEnd": "10GHz", "RangeStep": "1GHz"})
autosweep = dict({"RangeType": "LinearCount", "RangeStart": "1GHz", "RangeEnd": "10GHz", "RangeCount": "501"})
autosweeps = dict({"Sweep": autosweep})
multifreq = dict({"1GHz": [0.02], "2GHz": [0.02], "5GHz": [0.02]})
sweepsbr = dict({"RangeType": "LinearStep", "RangeStart": "1GHz", "RangeEnd": "10GHz", "RangeStep": "1GHz"})
Expand Down

0 comments on commit c8a030b

Please sign in to comment.