tidy3d.PoleResidue#
- class PoleResidue[source]#
Bases:
DispersiveMedium
A dispersive medium described by the pole-residue pair model.
- Parameters:
attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrs
are mutable. For example, the following is allowed for setting anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.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 (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 (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
.eps_inf (Union[PositiveFloat, Box] = 1.0) – [units = None (relative permittivity)]. Relative permittivity at infinite frequency (\(\epsilon_\infty\)).
poles (Tuple[Tuple[Union[tidy3d.components.types.tidycomplex, tidy3d.components.types.ComplexNumber, autograd.tracer.Box], Union[tidy3d.components.types.tidycomplex, tidy3d.components.types.ComplexNumber, autograd.tracer.Box]], ...] = ()) – [units = (rad/sec, rad/sec)]. Tuple of complex-valued (\(a_i, c_i\)) poles for the model.
Notes
The frequency-dependence of the complex-valued permittivity is described by:
\[\epsilon(\omega) = \epsilon_\infty - \sum_i \left[\frac{c_i}{j \omega + a_i} + \frac{c_i^*}{j \omega + a_i^*}\right]\]Example
>>> pole_res = PoleResidue(eps_inf=2.0, poles=[((-1+2j), (3+4j)), ((-5+6j), (7+8j))]) >>> eps = pole_res.eps_model(200e12)
See also
CustomPoleResidue
:A spatially varying dispersive medium described by the pole-residue pair model.
- Notebooks
- Lectures
Attributes
Upper bound of Im[eps] in frequency_range
Methods
Hz_to_angular_freq
(f_hz)Convert frequency in unit of Hz to rad/s.
angular_freq_to_Hz
(f_rad)Convert frequency in unit of rad/s to Hz.
angular_freq_to_eV
(f_rad)Convert frequency in unit of rad/s to eV.
compute_derivatives
(derivative_info)Compute adjoint derivatives for each of the
fields
given the multiplied E and D.eV_to_angular_freq
(f_eV)Convert frequency in unit of eV to rad/s.
eps_model
(frequency)Complex-valued permittivity as a function of frequency.
from_lo_to
(poles[, eps_inf])Construct a pole residue model from the LO-TO form (longitudinal and transverse optical modes).
from_medium
(medium)Convert a
Medium
to a pole residue model.imag_ep_extrema
(poles)Extrema of Im[eps] in the same unit as poles.
lo_to_eps_model
(poles, eps_inf, frequency)Complex permittivity as a function of frequency for a given set of LO-TO coefficients.
Convert to a
Medium
.Inherited Common Usage
- eps_inf#
- poles#
- classmethod from_medium(medium)[source]#
Convert a
Medium
to a pole residue model.- Parameters:
medium (
Medium
) – The medium with permittivity and conductivity to convert.- Returns:
The pole residue equivalent.
- Return type:
- to_medium()[source]#
Convert to a
Medium
. Requires the pole residue model to only have a pole at 0 frequency, corresponding to a constant conductivity term.- Returns:
The non-dispersive equivalent with constant permittivity and conductivity.
- Return type:
- static lo_to_eps_model(poles, eps_inf, frequency)[source]#
Complex permittivity as a function of frequency for a given set of LO-TO coefficients. See
from_lo_to
inPoleResidue
for the detailed form of the model and a reference paper.- Parameters:
poles (Tuple[Tuple[float, float, float, float], ...]) – The LO-TO poles, given as list of tuples of the form (omega_LO, gamma_LO, omega_TO, gamma_TO).
eps_inf (pd.PositiveFloat) – The relative permittivity at infinite frequency.
frequency (float) – Frequency at which to evaluate the permittivity.
- Returns:
The complex permittivity of the given LO-TO model at the given frequency.
- Return type:
complex
- classmethod from_lo_to(poles, eps_inf=1)[source]#
Construct a pole residue model from the LO-TO form (longitudinal and transverse optical modes). The LO-TO form is \(\epsilon_\infty \prod_{i=1}^l \frac{\omega_{LO, i}^2 - \omega^2 - i \omega \gamma_{LO, i}}{\omega_{TO, i}^2 - \omega^2 - i \omega \gamma_{TO, i}}\) as given in the paper:
M. Schubert, T. E. Tiwald, and C. M. Herzinger, “Infrared dielectric anisotropy and phonon modes of sapphire,” Phys. Rev. B 61, 8187 (2000).
- Parameters:
poles (Tuple[Tuple[float, float, float, float], ...]) – The LO-TO poles, given as list of tuples of the form (omega_LO, gamma_LO, omega_TO, gamma_TO).
eps_inf (pd.PositiveFloat) – The relative permittivity at infinite frequency.
- Returns:
The pole residue equivalent of the LO-TO form provided.
- Return type:
- static eV_to_angular_freq(f_eV)[source]#
Convert frequency in unit of eV to rad/s.
- Parameters:
f_eV (float) – Frequency in unit of eV
- static angular_freq_to_eV(f_rad)[source]#
Convert frequency in unit of rad/s to eV.
- Parameters:
f_rad (float) – Frequency in unit of rad/s
- static angular_freq_to_Hz(f_rad)[source]#
Convert frequency in unit of rad/s to Hz.
- Parameters:
f_rad (float) – Frequency in unit of rad/s
- static Hz_to_angular_freq(f_hz)[source]#
Convert frequency in unit of Hz to rad/s.
- Parameters:
f_hz (float) – Frequency in unit of Hz
- static imag_ep_extrema(poles)[source]#
Extrema of Im[eps] in the same unit as poles.
- Parameters:
poles (Tuple[PoleAndResidue, ...]) – Tuple of complex-valued (
a_i, c_i
) poles for the model.
- property loss_upper_bound#
Upper bound of Im[eps] in frequency_range
- compute_derivatives(derivative_info)[source]#
Compute adjoint derivatives for each of the
fields
given the multiplied E and D.
- __hash__()#
Hash method.