tidy3d.PerturbationPoleResidue#

class PerturbationPoleResidue[source]#

Bases: PoleResidue, AbstractPerturbationMedium

A dispersive medium described by the pole-residue pair model with perturbations. Perturbation model can be defined either directly through providing eps_inf_perturbation and poles_perturbation or via providing a specific perturbation model (PermittivityPerturbation, IndexPerturbation) as perturbaiton_spec.

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 an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • subpixel (bool = True) – This value will be transferred to the resulting custom medium. That is, if True, the subpixel averaging will be applied to the custom medium. The type of subpixel averaging method applied is specified in Simulation’s field subpixel. If the resulting medium is not a custom medium (no perturbations), this field does not have an effect.

  • perturbation_spec (Union[PermittivityPerturbation, IndexPerturbation, NoneType] = None) – Specification of medium perturbation as one of predefined types.

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

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

  • eps_inf_perturbation (Optional[ParameterPerturbation] = None) – [units = None (relative permittivity)]. Perturbations to relative permittivity at infinite frequency (\(\epsilon_\infty\)).

  • poles_perturbation (Optional[Tuple[Tuple[Optional[tidy3d.components.parameter_perturbation.ParameterPerturbation], Optional[tidy3d.components.parameter_perturbation.ParameterPerturbation]], ...]] = None) – [units = (rad/sec, rad/sec)]. Perturbations to poles of 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

>>> from tidy3d import ParameterPerturbation, LinearHeatPerturbation
>>> c0_perturbation = ParameterPerturbation(
...     heat=LinearHeatPerturbation(temperature_ref=300, coeff=0.0001),
... )
>>> pole_res = PerturbationPoleResidue(
...     eps_inf=2.0,
...     poles=[((-1+2j), (3+4j)), ((-5+6j), (7+8j))],
...     poles_perturbation=[(None, c0_perturbation), (None, None)],
... )

Attributes

Methods

perturbed_copy([temperature, ...])

Sample perturbations on provided heat and/or charge data and return 'CustomPoleResidue'.

Inherited Common Usage

eps_inf_perturbation#
poles_perturbation#
perturbed_copy(temperature=None, electron_density=None, hole_density=None, interp_method='linear')[source]#

Sample perturbations on provided heat and/or charge data and return ‘CustomPoleResidue’. Any of temperature, electron_density, and hole_density can be ‘None’. If all passed arguments are ‘None’ then a ‘PoleResidue’ object is returned. All provided fields must have identical coords.

Parameters:
Returns:

Medium specification after application of heat and/or charge data.

Return type:

Union[PoleResidue, CustomPoleResidue]

__hash__()#

Hash method.