tidy3d.CustomAnisotropicMedium#
- class CustomAnisotropicMedium[source]#
Bases:
AbstractCustomMedium
,AnisotropicMedium
Diagonally anisotropic medium with spatially varying permittivity in each component.
- 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[CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomMedium]) β Medium describing the xx-component of the diagonal permittivity tensor.
yy (Union[CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomMedium]) β Medium describing the yy-component of the diagonal permittivity tensor.
zz (Union[CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomMedium]) β Medium describing the zz-component of the diagonal permittivity tensor.
interp_method (Optional[Literal['nearest', 'linear']] = None) β 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 (Optional[bool] = None) β 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.