Skip to content

flex_rf.tidy3d.CustomAnisotropicMedium

Type: class Base(s): AbstractCustomMedium, AnisotropicMedium

Diagonally anisotropic medium with spatially varying permittivity in each component.

Only diagonal anisotropy is currently supported.

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)
xx [IsotropicCustomMediumType | CustomMedium]

Medium describing the xx-component of the diagonal permittivity tensor.

yy [IsotropicCustomMediumType | CustomMedium]

Medium describing the yy-component of the diagonal permittivity tensor.

zz [IsotropicCustomMediumType | CustomMedium]

Medium describing the zz-component of the diagonal permittivity tensor.

name [str | None] = None

Optional unique name for medium.

frequency_range [FreqBound | None] = None

Optional range of validity for the medium.

nonlinear_spec [NonlinearSpec | NonlinearSusceptibility | None] = None

Nonlinear spec applied on top of the base medium properties.

modulation_spec [ModulationSpec | None] = None

Modulation spec applied on top of the base medium properties.

viz_spec [VisualizationSpec | None] = None

Plotting specification for visualizing medium.

heat_spec [ThermalSpecType | None] = None

DEPRECATED: Use MultiPhysicsMedium. Specification of the medium heat properties. They are used for solving the heat equation via the HeatSimulation interface. Such simulations can beused 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.

derived_from [PerturbationMediumType | None] = None

If not None, it records the parent medium from which this medium was derived.

interp_method [InterpMethod | None] = 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.

allow_gain [bool | None] = None

This field is ignored. Please set allow_gain in each component

subpixel [bool | None] = None

This field is ignored. Please set subpixel in each component

eps_dataarray_freq(frequency: float)

Permittivity array at frequency.

is_isotropic()

Whether the medium is isotropic.

is_spatially_uniform()

Whether the medium is spatially uniform.

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.