tidy3d.LinearChargePerturbation#

class LinearChargePerturbation[source]#

Bases: ChargePerturbation

Specifies parameter’s perturbation due to free carrier effects as a linear function of electron and hole densities:

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().

  • electron_range (Tuple[NonNegativeFloat, NonNegativeFloat] = (0, inf)) – Range of electrons densities in which perturbation model is valid.

  • hole_range (Tuple[NonNegativeFloat, NonNegativeFloat] = (0, inf)) – Range of holes densities in which perturbation model is valid.

  • electron_ref (NonNegativeFloat) – [units = 1/cm^3]. Electron density value at which there is no perturbation due to electrons’s presence.

  • hole_ref (NonNegativeFloat) – [units = 1/cm^3]. Hole density value at which there is no perturbation due to holes’ presence.

  • electron_coeff (float) – [units = cm^3]. Sensitivity (derivative) of perturbation with respect to electron density.

  • hole_coeff (float) – [units = cm^3]. Sensitivity (derivative) of perturbation with respect to hole density.

Notes

\[\Delta X (T) = \text{electron\_coeff} \times (N_e - \text{electron\_ref}) + \text{hole\_coeff} \times (N_h - \text{hole\_ref}),\]

where electron_coeff and hole_coeff are the parameter’s sensitivities to electron and hole densities, while electron_ref and hole_ref are reference electron and hole density values. Ranges of electron and hole densities in which such a model is deemed accurate may be provided as fields electron_range and hole_range (default: [0, inf] each). Wherever is applied, Tidy3D will check that the parameter’s value does not go out of its physical bounds within electron_range x hole_range due to perturbations and raise a warning if this check fails. A warning is also issued if the perturbation model is evaluated outside of electron_range x hole_range.

Example

>>> charge_perturb = LinearChargePerturbation(
...     electron_ref=0,
...     electron_coeff=0.0001,
...     electron_range=[0, 1e19],
...     hole_ref=0,
...     hole_coeff=0.0002,
...     hole_range=[0, 2e19],
... )

Attributes

is_complex

Whether perturbation is complex valued.

perturbation_range

Range of possible perturbation values within provided electron_range and hole_range.

attrs

Methods

sample(electron_density, hole_density)

Sample perturbation at electron and hole density points.

Inherited Common Usage

electron_ref#
hole_ref#
electron_coeff#
hole_coeff#
property perturbation_range#

Range of possible perturbation values within provided electron_range and hole_range.

sample(electron_density, hole_density)[source]#

Sample perturbation at electron and hole density points.

Parameters:

Note

Provided electron_density and hole_density must be of the same type and match shapes/coordinates, unless one of them is a scalar or both are 1d arrays, in which case values are broadcasted.

Returns:

property is_complex#

Whether perturbation is complex valued.

__hash__()#

Hash method.