# Steady state simulation with Raman scattering¶

class SteadyStateSimulationWithRaman

SteadyStateSimulationWithRaman is the main class for running Giles model simulations with 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_pulsed_signal(wl, power, f_rep, fwhm_duration, wl_bandwidth=0, mode_shape_parameters=None, label='')

Adds a new forward propagating single-frequency pulsed signal to the simulation. A pulsed signal has a higher peak power resulting in stronger nonlinear effects, in particular spontaneous and stimulated Raman scattering. The pulse shape is assumed to be Gaussian.

Parameters: wl (float) – Wavelength of the signal power (float) – Input power of the signal at the beginning of the fiber f_rep (float) – Repetition frequency of the signal fwhm_duration (float) – Full-width at half-maximum duration of the Gaussian pulses wl_bandwidth (float) – Wavelength bandwidth of the channel. Finite bandwidth means including ASE. mode_shape_parameters (dict) – Defines the mode field shape. Allowed key-value pairs: functional_form -> [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter -> float overlaps -> list of pre-calculated overlaps between the channel and the ion populations label (str) – Optional label for the channel
add_raman(input_power=1e-14, backward_raman_allowed=True, raman_gain=1e-13)

Adds Raman channels to the simulation.

Parameters: backward_raman_allowed (bool, default True) – Determines if only the forward propagating Raman beam is simulated. input_power (float, default ~0 W) – Input power of the Raman beam(s) raman_gain (float, default 1e-13 m/W) – Raman gain value to be used in the simulation.
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.
add_backward_pump(wl, power, wl_bandwidth=0, mode_shape_parameters=None, label='')

Adds a new backward propagating single-frequency 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 key-value pairs: functional_form -> one of [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter -> float overlaps -> list of pre-calculated overlaps between the channel and the ion populations label (str) – Optional label for the channel
add_cw_signal(wl, power, wl_bandwidth=0, mode_shape_parameters=None, label='')

Adds a new forward propagating single-frequency 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 key-value pairs: functional_form -> one of [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter -> float overlaps -> list of pre-calculated 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 single-frequency 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 key-value pairs: functional_form -> one of [‘bessel’, ‘gaussian’, ‘tophat’] mode_diameter -> float overlaps -> list of pre-calculated overlaps between the channel and the ion populations label (str) – Optional label for the channel
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_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_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

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