fdtdx.PoyntingFluxDetector

Bases: Detector

Detector for measuring Poynting flux in electromagnetic simulations.

This detector computes the Poynting flux (power flow) through a specified surface in the simulation volume. It can measure flux in either positive or negative direction along the propagation axis, and optionally reduce measurements to a single value by summing over the detection surface.

Attributes:
  • direction (Literal['+', '-']) –

    Direction of flux measurement, either "+" for positive or "-" for negative along the propagation axis.

  • reduce_volume (bool) –

    If True, reduces measurements to a single value by summing over the detection surface. If False, maintains spatial distribution. Defaults to True.

  • fixed_propagation_axis (int | None) –

    By default, the propagation axis for calculating the poynting flux is the axis, where the detector has a grid shape of 1. If the detector has a shape of 1 in more than one axes or a different axis should be used, then this attribute can/has to be set. Defaults to None.

  • keep_all_components (bool) –

    By default, only the poynting flux component for the propagation axis is returned (scalar). If true, all three vector components are returned. Defaults to False.

propagation_axis property

propagation_axis: int

Determines the axis along which Poynting flux is measured.

The propagation axis is identified as the dimension with size 1 in the detector's grid shape, representing a plane perpendicular to the flux measurement direction.

Returns:
  • int( int ) –

    Index of the propagation axis (0 for x, 1 for y, 2 for z)

Raises:
  • Exception

    If detector shape does not have exactly one dimension of size 1