assign_current_source_to_sheet#
- Hfss.assign_current_source_to_sheet(assignment, start_direction=0, name=None)#
Create a current source taking one sheet.
- Parameters:
- assignment
str
Name of the sheet to apply the boundary to.
- start_direction
int
,ansys.aedt.core.application.analysis.Analysis.AxisDir
orlist
,optional
Direction of the integration line. It should be one of the values for
Application.AxisDir
, which are:XNeg
,YNeg
,ZNeg
,XPos
,YPos
, andZPos
. It also accepts the list of the start point and end point with the format [[xstart, ystart, zstart], [xend, yend, zend]] The default isApplication.AxisDir.XNeg
.- name
str
,optional
Name of the source. The default is
None
.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObject
Boundary object.
References
>>> oModule.AssignCurrent
Examples
Create a sheet and assign some current to it.
>>> from ansys.aedt.core.generic.constants import Plane >>> sheet = hfss.modeler.create_rectangle(Plane.XY, [0, 0, -50], [5, 1], name="CurrentSheet", material="copper") >>> hfss.assign_current_source_to_sheet(sheet.name, hfss.AxisDir.XNeg, "CurrentSheetExample") 'CurrentSheetExample' >>> c1 = hfss.assign_current_source_to_sheet( ... sheet.name, [sheet.bottom_edge_x.midpoint, sheet.bottom_edge_y.midpoint] ... )