tidy3d.AnisotropicMedium#

class AnisotropicMedium[source]#

Bases: AbstractMedium

Diagonally anisotropic medium.

Parameters:
  • name (Optional[str] = None) – Optional unique name for medium.

  • frequency_range (Optional[Tuple[float, float]] = None) – [units = (Hz, Hz)]. Optional range of validity for the medium.

  • allow_gain (Optional[bool] = None) – This field is ignored. Please set allow_gain in each component

  • nonlinear_spec (Union[NonlinearSpec, NonlinearSusceptibility] = None) – Nonlinear spec applied on top of the base medium properties.

  • modulation_spec (Optional[ModulationSpec] = None) – Modulation spec applied on top of the base medium properties.

  • heat_spec (Union[FluidSpec, SolidSpec, NoneType] = None) – Specification of the medium heat properties. They are used for solving the heat equation via the HeatSimulation interface. Such simulations can be used for investigating the influence of heat propagation on the properties of optical systems. Once the temperature distribution in the system is found using HeatSimulation object, Simulation.perturbed_mediums_copy() can be used to convert mediums with perturbation models defined into spatially dependent custom mediums. Otherwise, the heat_spec does not directly affect the running of an optical Simulation.

  • xx (Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, PECMedium]) – Medium describing the xx-component of the diagonal permittivity tensor.

  • yy (Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, PECMedium]) – Medium describing the yy-component of the diagonal permittivity tensor.

  • zz (Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, PECMedium]) – Medium describing the zz-component of the diagonal permittivity tensor.

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.

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.

time_modulated

Whether any component of the medium is time modulated.

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.

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 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.

is_comp_pec(comp)[source]#

Whether the medium is a PEC.

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

__hash__()#

Hash method.