assign_voltage_source_to_sheet#

Hfss.assign_voltage_source_to_sheet(assignment, start_direction=0, name=None)[source]#

Create a voltage source taking one sheet.

Parameters:
assignmentstr

Name of the sheet to apply the boundary to.

start_directionint, ansys.aedt.core.application.analysis.Analysis.AxisDir or list, optional

Direction of the integration line. It should be one of the values for Application.AxisDir, which are: XNeg, YNeg, ZNeg, XPos, YPos, and ZPos. It also accepts the list of the start point and end point with the format [[xstart, ystart, zstart], [xend, yend, zend]] The default is Application.AxisDir.XNeg.

namestr, optional

Name of the source. The default is None.

Returns:
ansys.aedt.core.modules.boundary.BoundaryObject

Boundary object.

References

>>> oModule.AssignVoltage

Examples

Create a sheet and assign to it some voltage.

>>> sheet = hfss.modeler.create_rectangle(hfss.PLANE.XY,[0, 0, -70],[10, 2],
...                                       name="VoltageSheet",material="copper")
>>> v1 = hfss.assign_voltage_source_to_sheet(sheet.name,hfss.AxisDir.XNeg,"VoltageSheetExample")
>>> v2 = hfss.assign_voltage_source_to_sheet(sheet.name,[sheet.bottom_edge_x.midpoint,
...                                     sheet.bottom_edge_y.midpoint],50)