tidy3d.rf.Custom2DCurrentIntegral#

class Custom2DCurrentIntegral[source]#

Bases: Custom2DPathIntegral, Custom2DCurrentIntegralSpec

Class for computing conduction current via Ampère’s circuital law on a custom path. To compute the current flowing in the positive axis direction, the vertices should be ordered in a counterclockwise direction.

Parameters:
  • axis (Literal[0, 1, 2]) – Specifies dimension of the planar axis (0,1,2) -> (x,y,z).

  • position (float) – Position of the plane along the axis.

  • vertices (ArrayLike[dtype=float, ndim=2]) – [units = um]. List of (d1, d2) defining the 2 dimensional positions of the path. The index of dimension should be in the ascending order, which means if the axis corresponds with y, the coordinates of the vertices should be (x, z). If you wish to indicate a closed contour, the final vertex should be made equal to the first vertex, i.e., vertices[-1] == vertices[0]

Example

>>> import numpy as np
>>> vertices = np.array([[0, 0], [2, 0], [2, 1], [0, 1], [0, 0]])
>>> current = Custom2DCurrentIntegral(
...     axis=2,
...     position=0.0,
...     vertices=vertices,
... )

Attributes

Methods

compute_current(em_field)

Compute current flowing in a custom loop.

compute_current(em_field)[source]#

Compute current flowing in a custom loop.

Parameters:

em_field (IntegrableMonitorDataType) – The electromagnetic field data that will be used for integrating.

Returns:

Result of current computation over remaining dimensions (frequency, time, mode indices).

Return type:

CurrentIntegralResultType

axis#
position#
vertices#