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.
viz_spec (Optional[VisualizationSpec] = None) – Plotting specification for visualizing medium.
heat_spec (Union[FluidSpec, SolidSpec, SolidMedium, FluidMedium, NoneType] = None) – DEPRECATED: Use td.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 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
compute_derivatives
(derivative_info)Compute adjoint derivatives for each of the
fields
given the multiplied E and D.eps_model
(frequency)Complex-valued permittivity as a function of frequency.
from_admittance_coeffs
(a, b[, eps_inf, pole_tol])Construct a
PoleResidue
model from an admittance function defining the relationship between the electric field and the polarization current density in the Laplace domain.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 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.
- classmethod from_admittance_coeffs(a, b, eps_inf=1, pole_tol=0.01)[source]#
Construct a
PoleResidue
model from an admittance function defining the relationship between the electric field and the polarization current density in the Laplace domain.- Parameters:
a (np.ndarray) – Coefficients of the numerator polynomial in increasing monomial order.
b (np.ndarray) – Coefficients of the denominator polynomial in increasing monomial order.
eps_inf (pd.PositiveFloat) – The relative permittivity at infinite frequency.
pole_tol (pd.PositiveFloat) – Tolerance for the pole finding algorithm in Hertz. Two poles are considered equal, if their spacing is closer than ``pole_tol`.
- Returns:
The pole residue equivalent.
- Return type:
Notes
The supplied admittance function relates the electric field to the polarization current density in the Laplace domain and is equivalent to a frequency-dependent complex conductivity \(\sigma(\omega)\).
\[J_p(s) = Y(s)E(s)\]\[Y(s) = \frac{a_0 + a_1 s + \dots + a_M s^M}{b_0 + b_1 s + \dots + b_N s^N}\]An equivalent
PoleResidue
medium is constructed using an equivalent frequency-dependent complex permittivity defined as\[\epsilon(s) = \epsilon_\infty - \frac{1}{\epsilon_0 s} \frac{a_0 + a_1 s + \dots + a_M s^M}{b_0 + b_1 s + \dots + b_N s^N}.\]
- __hash__()#
Hash method.