tidy3d.CustomAnisotropicMedium#
- class CustomAnisotropicMedium[source]#
Bases:
AbstractCustomMedium
,AnisotropicMedium
Diagonally anisotropic medium with spatially varying permittivity in each component.
- Parameters:
name (Attribute:
name
) βType
Optional[str]
Default
= None
Description
Optional unique name for medium.
frequency_range (Attribute:
frequency_range
) βType
Optional[Tuple[float, float]]
Default
= None
Units
(Hz, Hz)
Description
Optional range of validity for the medium.
allow_gain (Attribute:
allow_gain
) βType
Optional[bool]
Default
= None
Description
This field is ignored. Please set
allow_gain
in each componentnonlinear_spec (Attribute:
nonlinear_spec
) βType
Union[NonlinearSpec, NonlinearSusceptibility]
Default
= None
Description
Nonlinear spec applied on top of the base medium properties.
modulation_spec (Attribute:
modulation_spec
) βType
Optional[ModulationSpec]
Default
= None
Description
Modulation spec applied on top of the base medium properties.
heat_spec (Attribute:
heat_spec
) βType
Union[FluidSpec, SolidSpec, NoneType]
Default
= None
Description
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 (Attribute:
xx
) βType
Union[CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomMedium]
Default
Description
Medium describing the xx-component of the diagonal permittivity tensor.
yy (Attribute:
yy
) βType
Union[CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomMedium]
Default
Description
Medium describing the yy-component of the diagonal permittivity tensor.
zz (Attribute:
zz
) βType
Union[CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomMedium]
Default
Description
Medium describing the zz-component of the diagonal permittivity tensor.
interp_method (Attribute:
interp_method
) βType
Optional[Literal[βnearestβ, βlinearβ]]
Default
= None
Description
When the value is βNoneβ, each component will follow its own interpolation method. When the value is other than βNoneβ, the interpolation method specified by this field will override the one in each component.
subpixel (Attribute:
subpixel
) βType
Optional[bool]
Default
= None
Description
This field is ignored. Please set
subpixel
in each component
Note
Only diagonal anisotropy is currently supported.
Example
>>> Nx, Ny, Nz = 10, 9, 8 >>> x = np.linspace(-1, 1, Nx) >>> y = np.linspace(-1, 1, Ny) >>> z = np.linspace(-1, 1, Nz) >>> coords = dict(x=x, y=y, z=z) >>> permittivity= SpatialDataArray(np.ones((Nx, Ny, Nz)), coords=coords) >>> conductivity= SpatialDataArray(np.ones((Nx, Ny, Nz)), coords=coords) >>> medium_xx = CustomMedium(permittivity=permittivity, conductivity=conductivity) >>> medium_yy = CustomMedium(permittivity=permittivity, conductivity=conductivity) >>> d_epsilon = SpatialDataArray(np.random.random((Nx, Ny, Nz)), coords=coords) >>> f = SpatialDataArray(1+np.random.random((Nx, Ny, Nz)), coords=coords) >>> delta = SpatialDataArray(np.random.random((Nx, Ny, Nz)), coords=coords) >>> medium_zz = CustomLorentz(eps_inf=permittivity, coeffs=[(d_epsilon,f,delta),]) >>> anisotropic_dielectric = CustomAnisotropicMedium(xx=medium_xx, yy=medium_yy, zz=medium_zz)
See also
AnisotropicMedium
Diagonally anisotropic medium.
- Notebooks
Attributes
Whether the medium is isotropic.
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
eps_dataarray_freq
(frequency)Permittivity array at
frequency
.- xx#
- yy#
- zz#
- interp_method#
- allow_gain#
- subpixel#
- 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.
- property is_isotropic#
Whether the medium is isotropic.
- eps_dataarray_freq(frequency)[source]#
Permittivity array at
frequency
.- Parameters:
frequency (float) β Frequency to evaluate permittivity at (Hz).
- Returns:
The permittivity evaluated at
frequency
.- Return type:
- __hash__()#
Hash method.