circuit_port#

Hfss.circuit_port(assignment, reference, port_location=0, impedance=50, name=None, renormalize=True, renorm_impedance=50, deembed=False)[source]#

Create a circuit port from two objects.

The integration line is from edge 2 to edge 1.

Parameters:
assignmentint or ansys.aedt.core.modeler.cad.object_3d.Object3d or
ansys.aedt.core.modeler.cad.FacePrimitive`or :class:`ansys.aedt.core.modeler.cad.EdgePrimitive

Signal object.

referenceint or ansys.aedt.core.modeler.cad.object_3d.Object3d or
ansys.aedt.core.modeler.cad.FacePrimitive`or :class:`ansys.aedt.core.modeler.cad.EdgePrimitive

Reference object.

port_locationint or ansys.aedt.core.application.analysis.Analysis.AxisDir, optional

Position of the port when an object different from an edge is provided. 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.

namestr, optional

Name of the port. The default is "".

impedanceint, str, or float, optional

Impedance. The default is "50". You can also enter a string that looks like this: "50+1i*55".

renormalizebool, optional

Whether to renormalize the mode. The default is False. This parameter is ignored for a driven terminal.

renorm_impedancestr, optional

Impedance. The default is 50.

deembedbool, optional

Whether to deembed the port. The default is False.

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

Boundary object.

References

>>> oModule.AssignCircuitPort

Examples

Create two rectangles in the XY plane. Select the first edge of each rectangle created previously. Create a circuit port from the first edge of the first rectangle toward the first edge of the second rectangle.

>>> plane = hfss.PLANE.XY
>>> rectangle1 = hfss.modeler.create_rectangle(plane, [10, 10, 10], [10, 10],
...                                            name="rectangle1_for_port")
>>> edges1 = hfss.modeler.get_object_edges(rectangle1.id)
>>> first_edge = edges1[0]
>>> rectangle2 = hfss.modeler.create_rectangle(plane, [30, 10, 10], [10, 10],
...                                            name="rectangle2_for_port")
>>> edges2 = hfss.modeler.get_object_edges(rectangle2.id)
>>> second_edge = edges2[0]
>>> hfss.solution_type = "Modal"
>>> hfss.circuit_port(first_edge,second_edge,
...                   impedance=50.1,
...                   name="PortExample",
...                   renormalize=False,
...                   renorm_impedance="50")
'PortExample'