Steady state simulation¶

class
SteadyStateSimulation
¶ SteadyStateSimulation is the main class used for running steady state Giles model simulations without Raman scattering. Only one ion population is supported. The class defines the fiber, boundary conditions and optical channels used in the simulation.

__init__
()¶ Initialize self. See help(type(self)) for accurate signature.

add_cw_signal
(wl, power, wl_bandwidth=0, mode_shape_parameters=None, label='')¶ Adds a new forward propagating singlefrequency CW signal to the simulation.
Parameters:  wl (float) – Wavelength of the signal
 power (float) – Input power of the signal at the beginning of the fiber
 wl_bandwidth (float) – Wavelength bandwidth of the channel. Finite bandwidth means including ASE.
 mode_shape_parameters (dict) – Defines the mode field shape. Allowed keyvalue pairs: functional_form > one of [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter > float overlaps > list of precalculated overlaps between the channel and the ion populations
 label (str) – Optional label for the channel

add_forward_pump
(wl, power, wl_bandwidth=0, mode_shape_parameters=None, label='')¶ Adds a new forward propagating singlefrequency pump to the simulation.
Parameters:  wl (float) – Wavelength of the signal
 power (float) – Input power of the signal at the beginning of the fiber
 wl_bandwidth (float) – Wavelength bandwidth of the channel. Finite bandwidth means including ASE.
 mode_shape_parameters (dict) – Defines the mode field shape. Allowed keyvalue pairs: functional_form > one of [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter > float overlaps > list of precalculated overlaps between the channel and the ion populations
 label (str) – Optional label for the channel

add_backward_pump
(wl, power, wl_bandwidth=0, mode_shape_parameters=None, label='')¶ Adds a new backward propagating singlefrequency pump to the simulation.
Parameters:  wl (float) – Wavelength of the signal
 power (float) – Input power of the signal at the beginning of the fiber
 wl_bandwidth (float) – Wavelength bandwidth of the channel. Finite bandwidth means including ASE.
 mode_shape_parameters (dict) – Defines the mode field shape. Allowed keyvalue pairs: functional_form > one of [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter > float overlaps > list of precalculated overlaps between the channel and the ion populations
 label (str) – Optional label for the channel

add_ase
(wl_start, wl_end, n_bins)¶ Adds amplified spontaneous emission (ASE) channels. Using more channels improves accuracy, but incurs a heavier computational cost to the simulation.
Parameters:  wl_start (float) – The shorted wavelength of the ASE band
 wl_end (float) – The longest wavelength of the ASE band
 n_bins (positive int) – The number of simulated ASE channels.

run
(tol=0.001)¶ Runs the simulation, i.e. calculates the steady state of the defined fiber amplifier. ASE or raman simulations might require higher tolerance than the default value. It is best to decrease the tolerance until the result no longer changes.
Parameters: tol (float) – Target error tolerance of the solver.

set_guess_parameters
(guess_parameters)¶ Overrides the default initial guess parameters.
Parameters: guess_parameters (Instance of GuessParameters class) – Parameters used to create the initial guess array Example: from pyfiberamp import GuessParameters, GainShapes params = GuessParameters() params.signal.set_gain_shape(GainShapes.LINEAR) params.pump.set_gain_db(20) simulation.set_guess_parameters(params)

set_guess_array
(array, force_node_number=None)¶ Use an existing array as the initial guess. Typically this array is the result of a previous simulation with sligthly different parameters. Note that the number of simulated beams/channels must be the same.
Parameters:  array (numpy array) – The initial guess array
 force_node_number (int, optional) – The new number of columns in the resized array.

set_number_of_nodes
(N)¶ Override the default number of nodes used by the solver. The solver will increase the number of nodes if necessary.
Parameters: N (int) – New starting number of nodes used by the solver.
