edit_sources#

Hfss.edit_sources(assignment, include_port_post_processing=True, max_available_power=None, use_incident_voltage=False, eigenmode_stored_energy=True)[source]#

Set up the power loaded for HFSS postprocessing in multiple sources simultaneously.

Parameters:
assignmentdict

Dictionary of input sources to modify module and phase. Dictionary values can be: - 1 value to setup 0deg as default - 2 values tuple or list (magnitude and phase) or - 3 values (magnitude, phase, and termination flag) for Terminal solution in case of incident voltage usage.

include_port_post_processingbool, optional

Include port post-processing effects. The default is True.

max_available_powerstr, optional

System power for gain calculations. The default is None, in which case maximum available power is applied.

use_incident_voltagebool, optional

Use incident voltage definition. The default is False. This argument applies only to the Terminal solution type.

eigenmode_stored_energybool, optional

Use stored energy definition. The default is True. This argument applies only to the Eigenmode solution type.

Returns:
bool

Examples

>>> sources = {"Port1:1": ("0W", "0deg"), "Port2:1": ("1W", "90deg")}
>>> hfss.edit_sources(sources, include_port_post_processing=True)
>>> sources = {"Box2_T1": ("0V", "0deg", True), "Box1_T1": ("1V", "90deg")}
>>> hfss.edit_sources(sources,max_available_power="2W", use_incident_voltage=True)
>>> aedtapp = add_app(solution_type="Eigenmode")
>>> _ = aedtapp.modeler.create_box([0, 0, 0], [10, 20, 20])
>>> setup = aedtapp.create_setup()
>>> setup.props["NumModes"] = 2
>>> sources = {"1": "1Joules", "2": "0Joules"}
>>> aedtapp.edit_sources(sources, eigenmode_stored_energy=True)
>>> sources = {"1": ("0V/M", "0deg"), "2": ("2V/M", "90deg")}
>>> aedtapp.edit_sources(sources, eigenmode_stored_energy=False)