Skip to content

Commit 37233eb

Browse files
maxcapodi78pyansys-ci-botAlberto-DMSMoraisAnsys
authored
FIX: bug in Transient design which was creating a Freq Sweep in every transient analysis (#6849)
Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Alberto Di Maria <[email protected]> Co-authored-by: Sébastien Morais <[email protected]>
1 parent 42b45b3 commit 37233eb

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

doc/changelog.d/6849.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bug in Transient design which was creating a Freq Sweep in every transient analysis

src/ansys/aedt/core/modules/setup_templates.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,6 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq):
627627
"TransientData": ["0.1ns", "10ns"],
628628
"TransientNoiseData": [False, "", "", 0, 1, 0, False, 1],
629629
"TransientOtherData": ["default"],
630-
"SweepDefinition": SweepDefinition,
631630
}
632631
)
633632
"""Nexxim transient setup properties and default values."""

src/ansys/aedt/core/modules/solve_setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,9 +1439,13 @@ def add_sweep_step(
14391439
@pyaedt_function_handler()
14401440
def _add_sweep(self, sweep_variable, equation, override_existing_sweep):
14411441
if "SweepDefinition" not in self.props:
1442-
self.props["SweepDefinition"] = dict(
1443-
{"Variable": "Freq", "Data": "LINC 1GHz 5GHz 501", "OffsetF1": False, "Synchronize": 0}
1444-
)
1442+
self.props["SweepDefinition"] = {
1443+
"Variable": sweep_variable,
1444+
"Data": equation,
1445+
"OffsetF1": False,
1446+
"Synchronize": 0,
1447+
}
1448+
return self.update()
14451449
if isinstance(self.props["SweepDefinition"], list):
14461450
for sw in self.props["SweepDefinition"]:
14471451
if sw["Variable"] == sweep_variable:

src/ansys/aedt/core/visualization/post/common.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,12 @@ def _update_props(prop_in, props_out):
17881788
and props.get("report_type", "") != "Rectangular Contour Plot"
17891789
):
17901790
report._legacy_props["context"]["secondary_sweep"] = ""
1791+
if props.get("context", {}).get("primary_sweep", "Freq") in [
1792+
"Time",
1793+
"__UnitInterval",
1794+
"__Amplitude",
1795+
] and "Freq" in report._legacy_props.get("context", {}).get("variations", {}):
1796+
del report._legacy_props["context"]["variations"]["Freq"]
17911797
_update_props(props, report._legacy_props)
17921798
for el, k in self._app.available_variations.nominal_w_values_dict.items():
17931799
if (

0 commit comments

Comments
 (0)