AnalyticWaveguideTimeStepper

class photonforge.AnalyticWaveguideTimeStepper(*, n_eff, length=None, propagation_loss=0.0, extra_loss=0.0, n_group=0, tau_fc=0, dn_fc=_zero, tau_th=0, dn_th=_zero)[source]

Analytic waveguide tiem-stepper with power-dependent effects.

This model simulates a two-port optical waveguide where the effective refractive index is dynamically perturbed by power-dependent effects, specifically free-carrier dispersion and thermal changes. The total effective index at any time is the sum of the baseline index and the dynamic perturbations:

\[ \begin{align}\begin{aligned}&n(t) = n_\text{eff} + n_\text{fc}(t) + n_\text{th}(t)\\&\tau_\text{fc} \frac{{\rm d}n_\text{fc}}{{\rm d}t} + n_\text{fc}(t) = \Delta n_\text{fc}(P(t))\\&\tau_\text{th} \frac{{\rm d}n_\text{th}}{{\rm d}t} + n_\text{th}(t) = \Delta n_\text{th}(P(t))\end{aligned}\end{align} \]

in which \(\Delta n_\text{fc}\) and \(\Delta n_\text{th}\) are the steady-state index changes corresponding to the instantaneous optical power \(P(t)\) due to free-carrier and thermal effects, respectively.

Parameters:
  • n_eff (complex) – Effective refractive index (loss can be included here by using complex values).

  • length (Annotated[float, units='μm'] | None) – Length of the waveguide. If not provided, the length is measured by route_length() or ports distance.

  • propagation_loss (Annotated[float, minimum=0, units='dB/μm']) – Propagation loss.

  • n_group (float) – Group index of the optical mode, used to calculate delay.

  • tau_fc (Annotated[float, minimum=0, units='s']) – Time constant for the free-carrier effects. If zero, free-carrier effects are disabled.

  • dn_fc (Interpolator) – Power-dependent, steady-state index variation due to free-carrier effects.

  • tau_th (Annotated[float, minimum=0, units='s']) – Time constant for the thermal effects. If zero, thermal effects are disabled.

  • dn_th (Interpolator) – Power-dependent, steady-state index variation due to thermal effects.

  • extra_loss (Annotated[float, minimum=0, units='dB'])

Notes

The group delay \(n_g \ell / c_0\) is implemented as a fixed multiple of the time step.

This model uses a lumped element approximation by assuming a uniform effect along the waveguide length.

Methods

reset()

Reset internal state.

setup(component, time_step, *[, ...])

Initialize the time stepper.

setup_state(*, component, time_step, ...)

Initialize internal state.

step([inputs, steps, time_step, show_progress])

Compute the outputs of this time stepper, given inputs.

step_single(inputs, outputs, time_index, ...)

Take a single time step on the given inputs.

update(*args, **kwargs)

Update this time stepper.

Attributes

parametric_function

Function used to update the time stepper.

parametric_kwargs

Keyword arguments used to update the time stepper.

properties

Object properties.

random_variables

Random variables associated to the time stepper's parameters.

reset()[source]

Reset internal state.

setup_state(*, component, time_step, carrier_frequency, **kwargs)[source]

Initialize internal state.

Parameters:
  • component (Component) – Component representing the laser source.

  • time_step (Annotated[float, minimum=0, units='s']) – The interval between time steps (in seconds).

  • carrier_frequency (Annotated[float, minimum=0, units='Hz']) – The carrier frequency used to construct the time stepper. The carrier should be omitted from the input signals, as it is handled automatically by the time stepper.

  • kwargs – Unused.

step_single(inputs, outputs, time_index, update_state, shutdown)[source]

Take a single time step on the given inputs.

Parameters:
  • inputs (ndarray) – Input values at the current time step. Must be a 1D array of complex values ordered according to keys.

  • outputs (ndarray) – Pre-allocated output array where results will be stored. Same size and type as inputs.

  • time_index (int) – Time series index for the current input.

  • update_state (bool) – Whether to update the internal stepper state.

  • shutdown (bool) – Whether this is the last call to the single stepping function for the provided TimeSeries.

Return type:

None