tidy3d.rf.AxisAlignedVoltageIntegralSpec#

class AxisAlignedVoltageIntegralSpec[source]#

Bases: AxisAlignedPathIntegralSpec

Class for specifying the voltage calculation between two points defined by an axis-aligned line.

Parameters:
  • center (Optional[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]]] = None) – [units = um]. Center of object in x, y, and z.

  • size (tuple[Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box]]) – [units = um]. Size in x, y, and z directions.

  • extrapolate_to_endpoints (bool = False) – If the endpoints of the path integral terminate at or near a material interface, the field is likely discontinuous. When this field is True, fields that are outside and on the bounds of the integral are ignored. Should be enabled when computing voltage between two conductors.

  • snap_path_to_grid (bool = False) – It might be desirable to integrate exactly along the Yee grid associated with a field. When this field is True, the integration path will be snapped to the grid.

  • sign (Literal['+', '-']) – Positive indicates V=Vb-Va where position b has a larger coordinate along the axis of integration.

Attributes

sign

extrapolate_to_endpoints

snap_path_to_grid

size

center

Methods

from_terminal_positions(plus_terminal, ...)

Helper to create a AxisAlignedVoltageIntegralSpec from two coordinates that define a line and two positions indicating the endpoints of the path integral.

plot([x, y, z, ax, plot_markers])

Plot path integral at single (x,y,z) coordinate.

sign#
classmethod from_terminal_positions(plus_terminal, minus_terminal, x=None, y=None, z=None, extrapolate_to_endpoints=True, snap_path_to_grid=True)[source]#

Helper to create a AxisAlignedVoltageIntegralSpec from two coordinates that define a line and two positions indicating the endpoints of the path integral.

Parameters:
  • plus_terminal (float) – Position along the voltage axis of the positive terminal.

  • minus_terminal (float) – Position along the voltage axis of the negative terminal.

  • x (float = None) – Position in x direction, only two of x,y,z can be specified to define line.

  • y (float = None) – Position in y direction, only two of x,y,z can be specified to define line.

  • z (float = None) – Position in z direction, only two of x,y,z can be specified to define line.

  • extrapolate_to_endpoints (bool = True) – Passed directly to AxisAlignedVoltageIntegralSpec

  • snap_path_to_grid (bool = True) – Passed directly to AxisAlignedVoltageIntegralSpec

Returns:

The created path integral for computing voltage between the two terminals.

Return type:

AxisAlignedVoltageIntegralSpec

plot(x=None, y=None, z=None, ax=None, plot_markers=True, **path_kwargs)[source]#

Plot path integral at single (x,y,z) coordinate.

Parameters:
  • x (float = None) – Position of plane in x direction, only one of x,y,z can be specified to define plane.

  • y (float = None) – Position of plane in y direction, only one of x,y,z can be specified to define plane.

  • z (float = None) – Position of plane in z direction, only one of x,y,z can be specified to define plane.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

  • plot_markers (bool = True) – Whether to plot endpoint markers (+ and -). Default is True.

  • **path_kwargs – Optional keyword arguments passed to the matplotlib plotting of the line. For details on accepted values, refer to Matplotlib’s documentation.

Returns:

The supplied or created matplotlib axes.

Return type:

matplotlib.axes._subplots.Axes