edit_source#
- Hfss.edit_source(assignment=None, power='1W', phase='0deg')[source]#
Set up the power loaded for HFSS postprocessing.
- Parameters:
- assignment
str
,optional
Port name and mode. For example,
"Port1:1"
. The port name must be defined if the solution type is other than Eigenmodal. This parameter is ignored if the solution type is Eigenmodal.- power
str
,optional
Power in watts (W) or the project variable to put as stored energy in the project. The default is
"1W"
.- phase
str
,optional
Phase of the excitation. The default is
"0deg"
.
- assignment
- Returns:
- bool
True
when successful,False
when failed.
References
>>> oModule.EditSources
Examples
Create a circle sheet and use it to create a wave port. Set up the thermal power for this wave port.
>>> sheet = hfss.modeler.create_circle(hfss.PLANE.YZ, ... [-20, 0, 0], 10, ... name="sheet_for_source") >>> hfss.solution_type = "Modal" >>> wave_port = hfss.create_wave_port_from_sheet(sheet,5,hfss.AxisDir.XNeg,40,2,"SheetWavePort",True) >>> hfss.edit_source("SheetWavePort" + ":1","10W") PyAEDT INFO: Setting up power to "SheetWavePort:1" = 10W True