# CustomMedium

Medium with user-supplied permittivity distribution.

# Name

name: Optional unique name for the medium.

# Frequency Range

frequency_range: Optional range of validity for the medium.

Type: floating-point number

  • Unit: Hz (default) or THz
  • Constraint: greater than 0
  • Default: None

# Interpolation Method

interp_method: Interpolation method to obtain permittivity values that are not supplied at the Yee grids.

For grids outside the range of the supplied data, extrapolation will be applied. When the extrapolated value is smaller (greater) than the minimal (maximal) of the supplied data, the extrapolated value will take the minimal (maximal) of the supplied data.

Options:

  • nearest
  • linear

Default: nearest

# Subpixel

subpixel: If True and simulation’s subpixel is also True, applies subpixel averaging of the permittivity on the interface of the structure, including exterior boundary and intersection interfaces with other structures.

Type: boolean

Default: False

# Permittivity

permittivity: Spatial profile of relative permittivity. Click the Import Medium button to load the permittivity dataset.

To generate a HDF5 dataset in a correct shape, create the medium using the Python interface and use the to_hdf5(filename) (opens new window) method. For details on creating a spatially varying medium, see this example (opens new window).

Type: SpatialDataArray

  • Unit: unitless

# Conductivity

conductivity: Spatial profile of the electric conductivity. Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega. Click the Import Medium button to load the permittivity and conductivity datasets.

To generate a HDF5 dataset in a correct shape, create the medium using the Python interface and use the to_hdf5(filename) (opens new window) method. For details on creating a spatially varying medium, see this example (opens new window).

Type: SpatialDataArray

  • Unit: S/μm

# Complex-valued Permittivity

eps_dataset: User-supplied dataset containing complex-valued permittivity as a function of space. Permittivity distribution over the Yee-grid will be interpolated based on interp_method. Click the Import Medium button to load the complex-valued permittivity dataset.

To generate a HDF5 dataset in a correct shape, create the medium using the Python interface and use the to_hdf5(filename) (opens new window) method. For details on creating a spatially varying medium, see this example (opens new window).

Type: SpatialDataArray

  • Unit: unitless

# Allow Gain

allow_gain: Allow the medium to be active. Caution: simulations with gain medium are unstable, and are likely to diverge. Simulations where allow_gain is set to True will still be charged even if diverged. Monitor data up to the divergence point will still be returned and can be useful in some cases.

Type: boolean

Default: False