Skip to content

flex_rf.tidy3d.Medium2D

Type: class Base(s): AbstractMedium

2D diagonally anisotropic medium.

Only diagonal anisotropy is currently supported.

drude_medium = Drude(eps_inf=2.0, coeffs=[(1,2), (3,4)])
medium2d = Medium2D(ss=drude_medium, tt=drude_medium)
ss [IsotropicUniformMediumFor2DType]

Medium describing the ss-component of the diagonal permittivity tensor. The ss-component refers to the in-plane dimension of the medium that is the first component in order of ‘x’, ‘y’, ‘z’. If the 2D material is normal to the y-axis, for example, then this determines the xx-component of the corresponding 3D medium.

tt [IsotropicUniformMediumFor2DType]

Medium describing the tt-component of the diagonal permittivity tensor. The tt-component refers to the in-plane dimension of the medium that is the second component in order of ‘x’, ‘y’, ‘z’. If the 2D material is normal to the y-axis, for example, then this determines the zz-component of the corresponding 3D medium.

name [str | None] = None

Optional unique name for medium.

frequency_range [FreqBound | None] = None

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

elements [dict[str, IsotropicUniformMediumFor2DType]]

The diagonal elements of the 2D medium as a dictionary.

eps_diagonal(frequency: float)

Main diagonal of the complex-valued permittivity tensor as a function of frequency.

eps_diagonal_numerical(frequency: float)

Main diagonal of the complex-valued permittivity tensor for numerical considerations such as meshing and runtime estimation.

eps_model(frequency: float)

Complex-valued permittivity as a function of frequency.

from_anisotropic_medium(medium: AnisotropicMedium, axis: Axis, thickness: float)

Generate a Medium2D equivalent of a AnisotropicMedium with given normal axis and thickness. The ss and tt components of the resulting 2D medium correspond to the first of the xx, yy, and zz components of the 3D medium, with the axis component removed.

from_dispersive_medium(medium: DispersiveMedium, thickness: float)

Generate a Medium2D equivalent of a DispersiveMedium with a given thickness.

from_medium(medium: Medium, thickness: float)

Generate a Medium2D equivalent of a Medium with a given thickness.

is_comp_pec_2d(comp: Axis, axis: Axis)

Whether the medium is a PEC.

is_pec()

Whether the medium is a PEC.

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.

plot(freqs: float, ax: Ax = None)

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

plot_sigma(freqs: float, ax: Ax = None)

Plot the surface conductivity of the 2D material.

sigma_model(freq: float)

Complex-valued conductivity as a function of frequency.

to_anisotropic_medium(axis: Axis, thickness: float)

Generate a 3D AnisotropicMedium equivalent of a given thickness.

to_medium(thickness: float)

Generate a Medium equivalent of a given thickness. The 2D medium must be isotropic in-plane (otherwise the components are averaged) and non-dispersive besides a constant conductivity.

to_pole_residue(thickness: float)

Generate a PoleResidue equivalent of a given thickness. The 2D medium to be isotropic in-plane (otherwise the components are averaged).

volumetric_equivalent(axis: Axis, adjacent_media: tuple[MediumType3D, MediumType3D], adjacent_dls: tuple[float, float])

Produces a 3D volumetric equivalent medium. The new medium has thickness equal to the average of the dls in the axis direction. The ss and tt components of the 2D material are mapped in order onto the xx, yy, and zz components of the 3D material, excluding the axis component. The conductivity and residues (in the case of a dispersive 2D material) are rescaled by 1/dl. The neighboring media neighbors enter in as a background for the resulting volumetric equivalent.