Skip to content

flex_rf.tidy3d.Medium

Type: class Base(s): AbstractMedium

Dispersionless medium. Mediums define the optical properties of the materials within the simulation.

In a dispersion-less medium, the displacement field D(t)D(t) reacts instantaneously to the applied electric field E(t)E(t).

D(t)=ϵE(t)D(t) = \epsilon E(t)

The permittivity parameter is the relative permittivity (dimensionless). The conductivity parameter has units of S/μm (siemens per micrometer), consistent with Tidy3D’s micrometer-based unit system. To convert from standard S/m, divide by 1e6.

Practical Advice

Choosing a Material Type

  • Material is in td.material_library? → Use it directly (e.g. td.material_library['cSi']['Li1993_293K']).
  • Lossless, wavelength-independent refractive index? → td.Medium(permittivity=n**2).
  • Known n and k at a specific frequency? → td.Medium.from_nk(n=2.4, k=0.01, freq=freq0). Note: when k > 0, the resulting medium has wavelength-independent n but wavelength-dependent k.
  • You have n,k data vs wavelength? → Use FastDispersionFitter from tidy3d.plugins.dispersion to fit a pole-residue model.
  • Permittivity varies spatially? → Use CustomMedium with a SpatialDataArray.
  • Need an analytical dispersive model? → Use Sellmeier, Lorentz, Drude, Debye, or PoleResidue directly.

Common Library Materials (telecom, ~1.55 μm)

  • Silicon: td.material_library['cSi']['Li1993_293K'] (n ≈ 3.48)
  • SiO2: td.material_library['SiO2']['Palik_Lossless'] (n ≈ 1.44)
  • Si3N4: td.material_library['Si3N4']['Luke2015PMLStable'] (n ≈ 2.0)
  • Gold: td.material_library['Au']['JohnsonChristy1972']
  • Silver: td.material_library['Ag']['JohnsonChristy1972']
dielectric = Medium(permittivity=4.0, name='my_medium')
eps = dielectric.eps_model(200e12)
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.

permittivity [TracedFloat] = 1.0

Relative permittivity.

conductivity [TracedFloat] = 0.0

Electric conductivity. Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega.

eps_model(frequency: float)

Complex-valued permittivity as a function of frequency.

from_nk(n: float, k: float, freq: float, **kwargs: Any)

Convert n and k values at frequency freq to Medium.

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.