tidy3d.FullyAnisotropicMedium#

class FullyAnisotropicMedium[source]#

Bases: AbstractMedium

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

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 (bool = False) – Allow the medium to be active. Caution: simulations with a 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.

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

  • permittivity (ArrayLike[dtype=float, ndim=2, shape=(3, 3)] = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]) – [units = None (relative permittivity)]. Relative permittivity tensor.

  • conductivity (ArrayLike[dtype=float, ndim=2, shape=(3, 3)] = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) – [units = S/um]. Electric conductivity tensor. Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega.

Notes

Provided permittivity tensor and the symmetric part of the conductivity tensor must have coinciding main directions. A non-symmetric conductivity tensor can be used to model magneto-optic effects. Note that dispersive properties and subpixel averaging are currently not supported for fully anisotropic materials.

Note

Simulations involving fully anisotropic materials are computationally more intensive, thus, they take longer time to complete. This increase strongly depends on the filling fraction of the simulation domain by fully anisotropic materials, varying approximately in the range from 1.5 to 5. The cost of running a simulation is adjusted correspondingly.

Example

>>> perm = [[2, 0, 0], [0, 1, 0], [0, 0, 3]]
>>> cond = [[0.1, 0, 0], [0, 0, 0], [0, 0, 0]]
>>> anisotropic_dielectric = FullyAnisotropicMedium(permittivity=perm, conductivity=cond)

See also

CustomAnisotropicMedium

Diagonally anisotropic medium with spatially varying permittivity in each component.

AnisotropicMedium

Diagonally anisotropic medium.

Notebooks

Attributes

eps_sigma_diag

Main components of permittivity and conductivity tensors and their directions.

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.

Methods

conductivity_commutes(val, values)

Check that the symmetric part of conductivity tensor commutes with permittivity tensor (that is, simultaneously diagonalizable).

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.

from_diagonal(xx, yy, zz, rotation)

Construct a fully anisotropic medium by rotating a diagonally anisotropic medium.

permittivity_spd_and_ge_one(val)

Check that provided permittivity tensor is symmetric positive definite with eigenvalues >= 1.

plot(freqs[, ax])

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

permittivity#
conductivity#
classmethod permittivity_spd_and_ge_one(val)[source]#

Check that provided permittivity tensor is symmetric positive definite with eigenvalues >= 1.

classmethod conductivity_commutes(val, values)[source]#

Check that the symmetric part of conductivity tensor commutes with permittivity tensor (that is, simultaneously diagonalizable).

classmethod from_diagonal(xx, yy, zz, rotation)[source]#

Construct a fully anisotropic medium by rotating a diagonally anisotropic medium.

Parameters:
  • xx (Medium) – Medium describing the xx-component of the diagonal permittivity tensor.

  • yy (Medium) – Medium describing the yy-component of the diagonal permittivity tensor.

  • zz (Medium) – Medium describing the zz-component of the diagonal permittivity tensor.

  • rotation (Union[RotationAroundAxis]) – Rotation applied to diagonal permittivity tensor.

Returns:

Resulting fully anisotropic medium.

Return type:

FullyAnisotropicMedium

property eps_sigma_diag#

Main components of permittivity and conductivity tensors and their directions.

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

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 take the minimal of sqrt(permittivity) for main directions.

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

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

__hash__()#

Hash method.