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 componentnonlinear_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 usingHeatSimulation
object,Simulation.perturbed_mediums_copy()
can be used to convert mediums with perturbation models defined into spatially dependent custom mediums. Otherwise, theheat_spec
does not directly affect the running of an opticalSimulation
.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
Dictionary of diagonal medium components.
The diagonal elements of the medium as a dictionary.
Whether the medium is a PEC.
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
.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_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 elements#
The diagonal elements of the medium as a dictionary.
- property is_pec#
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:
- __hash__()#
Hash method.