edit_source¶
- Hfss.edit_source(portandmode=None, powerin='1W', phase='0deg')[source]¶
Set up the power loaded for Hfss Post-Processing.
- Parameters
- portandmode
str
,optional
Port name and mode. For example,
"Port1:1"
. It must be defined if solution type is other than Eigenmodal. It is ignored for solution type Eigenmodal.- powerin
str
,optional
Power in Watts 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"
.
- portandmode
- 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 the port created above.
>>> 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