RP Photonics

Software … powerful tools for your research & development!

deutsch

RP Fiber Power – Simulation and Design Software
for Fiber Optics, Amplifiers and Fiber Lasers

Convenient Input Forms, Highly Flexible Script Language, Powerful Tools

RP Fiber Power can be operated in three different modes:

Mode 1: Standard Forms

For a quick and easy start, you can use various forms where you can simply enter your input data and then also inspect the calculated results.

interactive form for describing optical channels in RP Fiber Power

Note: instead of numerical values, you can also enter mathematical expressions in the input fields! (As a simple example, define a variable for some pump power and ensure that its value is used for forward and backward pumping; that way, you avoid always changing an input value at two locations.) Also, there are various opportunities to inject some script code into the forms. That way, you get a good part of the flexibility of scripting (see below) while basically just using simple forms!

Various diagrams (see below) can also be created via forms.

Mode 2: Custom Forms

Since V6, RP Fiber Power offers custom forms – forms which are not hard-coded, but rather defined within a script (a text file). Many of the demo files supplied with the software contain such forms. Here you see an example:

custom form for fiber laser calculations

The handling of those forms is similar to that of the standard forms (see above, mode 1). The crucial difference, however, is that you can modify the forms themselves and the underlying calculations just as you like – or develop totally new calculations and forms. (Alternatively, you can get that done within the technical support.) That way you obtain forms, which are fully tailored to your needs!

Note that competing software products usually offer only hard-coded standard forms, which you cannot adapt to your needs. You just have to hope that they will provide everything which you will need.

See a separate page which explains custom forms in detail.

Mode 3: Control with a Script

The enormous flexibility of our software is essentially obtained through its powerful script language.

A script (a plain text file), which can be edited in the software's own editors, can contain various parts:

  • definition of the fiber length, doping profiles, mode fields, input powers, etc., all done by calling certain predefined functions
  • details for the graphical output of results, usually in the form of function plots (see the example on the right side)
  • commands for the flexible input or output in text form, e.g. in CSV format, for exchanging data with other software (e.g. your favorite plotting software)
  • if required, various mathematical calculations, e.g. for automatically calculating mode profiles from fiber parameters

A simple script contains everything to determine the calculations and its outputs – including the input parameters. Although it is easy to edit those parameters in a script, it is often more convenient to also create a custom form in the script, with which one can conveniently enter the input parameters and also display some results. That mode of operation has been explained above (see mode 2).

More on Scripting

You may obtain scripts in many ways:

  • Many demo scripts come with the software. Just use them as they are, or adapt them to your needs.
  • If you need something completely different, you will nevertheless usually not start from scratch, but rather start with some demo file and modify it step by step.
  • You can also get scripts developed within the technical support. In case that this requires more than the support time included in the license fee, you can simply purchase additional support time.

You will soon appreciate the manifold advantages of the scripting approach (modes 2 and 3):

  • You can simply copy and paste parts of the provided demo files, or of your earlier script files, in order to reuse code.
  • In complicated cases, RP Photonics can send you some lines of code.
  • The scripting approach is extremely flexible, allowing you e.g. to systematically vary certain parameters, import and export data in various formats, set up new types of diagrams, or mathematically process and input or output data. In case of unexpected behavior, a powerful debugger helps you to trace down problems with a script.
  • A script file perfectly documents your work. When you read it later on, you easily see what you have done. You do not need to remember e.g. what settings you have done in some interactive windows.

A cute feature: if you use a standard form (see above) and execute it, the software automatically generates a script based on the inputs in the interactive form, executes the script, and displays the results. It is then possible to save the generated script and manually develop it further. This means that you will find it easy to switch from the use of standard forms to full scripting!

The Script Language

The script language is very powerful but still pretty easy to understand. As an example, the following code defines a pump and a signal channel for an amplifier model:

; Pump:
l_p := 980 nm  { pump wavelength }
P_p_in := 500 mW  { pump power }
w_p := 5 um  { mode radius }
I_p(r) := exp(-2 * (r / w_p)^2)  { Gaussian pump intensity profile }
 
; Signal:
P_s_in := 1 mW  { signal input }
l_s := 1550 nm  { signal wavelength }
w_s := 6 um  { mode radius }
I_s(r) := exp(-2 * (r / w_s)^2)  { Gaussian signal intensity profile }
 
; Channel definitions:
pump := addinputchannel(P_p_in, l_p, 'I_p', 0, backward)
signal := addinputchannel(P_s_in, l_s, 'I_s', 0, forward)

As another example, the following code defines a diagram and then displays the optical powers and the upper-state population as a function of the longitudinal position in the fiber:

diagram 1:
 
x: 0, L_f
"position in the fiber (m)", @x
y: 0, 2
frame
 
f: P(pump, x), color = red, width = 3, "pump power (W)"
f: P(signal, x), color = blue, width = 3, "signal power (W)"
f: n(x, 2), style = dotted, "upper-state population"

It is easy to display in well formatted form additional quantities of interest, e.g. in the handy “Output window” or in graphical diagrams. As an example, we may display the single-pass signal gain and the Raman gain (for checking whether stimulated Raman scattering becomes strong):

show "Signal gain: ", sp_gain(signal_fw):f1:"dB"
g_R := 1e-13  { peak Raman gain coefficient of silica in m / W }
A_eff := pi * w_s^2  { effective mode area }
show "Raman gain: ", 4.34 * (g_R / A_eff) * int(P(signal_fw, z), z := 0 to L_f step dL):f1:"dB"

Even quite sophisticated things may be done with a few lines of script code. For more details, see our page on the script language.

Powerful Tools for Efficient Scripting

For developing script code, the software offers powerful editors and related tools. A screen shot shows an editor:

script editing in RP Fiber Power

Some great features of such editors:

  • Multilevel undo/redo functionality
  • Syntax highlighting: recognized command or function names, keywords, comments etc. are shown with different colors. That makes it easier to understand the structure.
  • Parameter hints: if you type in a function name followed by a parenthesis, the editor displays information on the required parameter list. That way it becomes much simpler to utilize the hundreds of supported functions.
  • Syntax check: you can quickly have the syntax of a script checked without executing it.
  • Code snippets library: you can easily insert certain frequently used parts of code into your script. (See the screen shot below.) Users can create own code snippets as an extension for that library.
code snippets library

Graphical Output

Your scripts and forms can create many different types of diagrams for visualizing the results of the calculations. Examples are shown on the pages for various example cases. Each diagram is normally shown in a separate window; however, one can also display many versions of a diagram (e.g. one for each mode of a fiber) in a single window, where one can browse them.

a graphics window of RP Fiber Power

Those graphics windows have plenty of convenient features:

  • measure positions and distances using one or two cursors
  • save the graphics in GIF or PNG format
  • export numerical data
  • copy the graphics to the Windows clipboard
  • recall the graphics from the last calculation run, so that you can clearly see any differences
  • browse in multiple versions of a diagram – for example, for different fiber modes or amplifier stages

The following example is a color graph, showing the spatial and spectral distribution of ASE and a weak amplified signal at 1030 nm in an ytterbium-doped amplifier, which is pumped at 920 nm.

ASE distribution in fiber amplifier

Such graphics show in the most direct way phenomena which would be easily overlooked when not using a physical model and appropriate software.

A number of standard diagrams can be made with the interactive forms, simply by filling out some form fields. However, you may make basically any kind of diagram with the powerful script language – you are by no means limited to the kinds of diagrams envisaged by the developer of this software.

Beam Profile Viewer

RP Fiber Power offers an interactive beam profile viewer, which allows the convenient inspection of field intensity distributions in fibers. You can switch between the xy, xz and yz plane, between different waves, real space and Fourier space, change the scaling, etc. This is very convenient particularly in the exploration phase of a project, where you need to understand the details of wave propagation, and don't want to be distracted by technical details of preparing diagrams.

beam profile viewer

Interactive Pulse Display Window

In addition, the interactive pulse display window allows one to inspect the details of ultrashort pulse propagation. Simply select a position the fiber (or alternatively browse through previously saved pulses), and then you can display a wide range of pulse properties in the time and frequency domain – even before the simulation has been completed.

interactive pulse display window

With this extremely handy feature you can quickly analyze even complicated pulse shaping processes.

Comprehensive Documentation

RP Fiber Power comes with very well worked out documentation, which allows you to have a quick start and work efficiently even when doing sophisticated modeling:

  • There is a manual in PDF format, explaining in detail (on over 170 pages) the principles of the physical model, the user interface, the script language, etc. (For a first impression, you may download the beginning of the RP Fiber Power manual with the table of contents.)
  • The context-sensitive online help function is even more comprehensive. See the screen shot below to get an impression.
online help of RP Fiber Power

Technical Support

Any remaining problems can be addressed with the technical support. We make sure that any problems you may have will soon be solved.

arrow