tidy3d.AnisotropicMedium#

class AnisotropicMedium[source]#

Bases: AbstractMedium

Diagonally anisotropic medium.

Parameters:

Notes

Only diagonal anisotropy is currently supported.

Example

>>> medium_xx = Medium(permittivity=4.0)
>>> medium_yy = Medium(permittivity=4.1)
>>> medium_zz = Medium(permittivity=3.9)
>>> anisotropic_dielectric = AnisotropicMedium(xx=medium_xx, yy=medium_yy, zz=medium_zz)

See also

CustomAnisotropicMedium

Diagonally anisotropic medium with spatially varying permittivity in each component.

FullyAnisotropicMedium

Fully anisotropic medium including all 9 components of the permittivity and conductivity tensors.

Notebooks

Attributes

components

Dictionary of diagonal medium components.

elements

The diagonal elements of the medium as a dictionary.

is_pec

Whether the medium is a PEC.

is_pmc

Whether the medium is a PMC.

is_time_modulated

Whether any component of the medium is time modulated.

n_cfl

This property computes the index of refraction related to CFL condition, so that the FDTD with this medium is stable when the time step size that doesn't take material factor into account is multiplied by n_cfl.

xx

yy

zz

allow_gain

name

frequency_range

nonlinear_spec

modulation_spec

viz_spec

heat_spec

Methods

eps_comp(row, col, frequency)

Single component the complex-valued permittivity tensor as a function of frequency.

eps_diagonal(frequency)

Main diagonal of the complex-valued permittivity tensor as a function of frequency.

eps_model(frequency)

Complex-valued permittivity as a function of frequency.

is_comp_pec(comp)

Whether the medium is a PEC.

is_comp_pmc(comp)

Whether the medium is a PMC.

plot(freqs[, ax])

Plot n, k of a Medium as a function of frequency.

sel_inside(bounds)

Return a new medium that contains the minimal amount data necessary to cover a spatial region defined by bounds.

xx#
yy#
zz#
allow_gain#
property components#

Dictionary of diagonal medium components.

property is_time_modulated#

Whether any component of the medium is time modulated.

property n_cfl#

This property computes the index of refraction related to CFL condition, so that the FDTD with this medium is stable when the time step size that doesn’t take material factor into account is multiplied by n_cfl.

For this medium, it takes the minimal of n_clf in all components.

eps_model(frequency)[source]#

Complex-valued permittivity as a function of frequency.

eps_diagonal(frequency)[source]#

Main diagonal of the complex-valued permittivity tensor as a function of frequency.

eps_comp(row, col, frequency)[source]#

Single component the complex-valued permittivity tensor as a function of frequency.

Parameters:
  • row (int) – Component’s row in the permittivity tensor (0, 1, or 2 for x, y, or z respectively).

  • col (int) – Component’s column in the permittivity tensor (0, 1, or 2 for x, y, or z respectively).

  • frequency (float) – Frequency to evaluate permittivity at (Hz).

Returns:

Element of the relative permittivity tensor evaluated at frequency.

Return type:

complex

plot(freqs, ax=None)[source]#

Plot n, k of a Medium as a function of frequency.

property elements#

The diagonal elements of the medium as a dictionary.

property is_pec#

Whether the medium is a PEC.

property is_pmc#

Whether the medium is a PMC.

is_comp_pec(comp)[source]#

Whether the medium is a PEC.

is_comp_pmc(comp)[source]#

Whether the medium is a PMC.

sel_inside(bounds)[source]#

Return a new medium that contains the minimal amount data necessary to cover a spatial region defined by bounds.

Parameters:

bounds (tuple[float, float, float], tuple[float, float float]) – Min and max bounds packaged as (minx, miny, minz), (maxx, maxy, maxz).

Returns:

AnisotropicMedium with reduced data.

Return type:

AnisotropicMedium