assign_current_source_to_sheet

Hfss.assign_current_source_to_sheet(sheet_name, axisdir=0, sourcename=None)[source]

Create a current source taking one sheet.

Parameters
sheet_namestr

Name of the sheet to apply the boundary to.

axisdirint or pyaedt.application.Analysis.Analysis.AxisDir, optional

Position of the port. It should be one of the values for Application.AxisDir, which are: XNeg, YNeg, ZNeg, XPos, YPos, and ZPos. The default is Application.AxisDir.XNeg.

sourcenamestr, optional

Name of the source. The default is None.

Returns
pyaedt.modules.Boundary.BoundaryObject

Boundary object.

References

>>> oModule.AssignCurrent

Examples

Create a sheet and assign to it some current.

>>> sheet = hfss.modeler.primitives.create_rectangle(hfss.PLANE.XY, [0, 0, -50],
...                                                  [5, 1], name="CurrentSheet", matname="copper")
>>> hfss.assign_current_source_to_sheet(sheet.name, hfss.AxisDir.XNeg, "CurrentSheetExample")
'CurrentSheetExample'