tidy3d.NonlinearSpec#
- class NonlinearSpec[source]#
Bases:
ABC
,Tidy3dBaseModel
Abstract specification for adding nonlinearities to a medium.
- Parameters:
models (Tuple[Union[NonlinearSusceptibility, TwoPhotonAbsorption, KerrNonlinearity], ...] = ()) β The nonlinear models present in this nonlinear spec. Nonlinear models of different types are additive. Multiple nonlinear models of the same type are not allowed.
num_iters (PositiveInt = 5) β Number of iterations for solving nonlinear constitutive relation.
Note
The nonlinear constitutive relation is solved iteratively; it may not converge for strong nonlinearities. Increasing
num_iters
can help with convergence.Example
>>> nonlinear_susceptibility = NonlinearSusceptibility(chi3=1) >>> nonlinear_spec = NonlinearSpec(models=[nonlinear_susceptibility]) >>> medium = Medium(permittivity=2, nonlinear_spec=nonlinear_spec)
Attributes
Methods
- models#
- num_iters#
- __hash__()#
Hash method.