Instructions for Using SL.4TH

You may use either the windows or linux versions of kforth to execute SL.4TH.

  1. Start kforth by typing:


  2. At the kforth prompt (ok), type:

    include sl

    The code (definitions) will be loaded, and the initial laser parameters will be printed out.

  3. You can modify any of the parameters by storing a new value in the corresponding variable. For example, to change the threshold current to 48 mA, type

    48e I_th f!

    (All floating pt numbers must be entered in exponential format. kForth is not case sensitive.) The variables are:

            t_p        photon lifetime (s)
            t_s        carrier lifetime (s)
            G_N        differential gain (cm^3/s)
            N_th       threshold carrier density (cm^-3)
            I_th       threshold current (mA)
            alpha      linewidth enh. factor

    You can print out all the current values by typing


  4. An arbitrary current pulse profile may be specified by writing your own word that computes the current in mA at a specified time in nanoseconds, but it is setup to use a Gaussian current pulse. You may set any of the following pulse profile variables:

        dc_current      bias current (mA)
        fwhm            full-width at half-max (ns)
        pulse_amp       pulse amplitude (mA)
        peak_offset     peak offset (ns)

    These values are not displayed, but you may examine them in the following manner:

    pulse_amp f@ f.

    You can set them to new values also, e.g.

    3e fwhm f!

    to set the FWHM to 3 ns.

  5. Ok, onto the calculation. Once you've got the laser parameters and the current pulse parameters set up, simply type:


    to run the calculation. You will be presented with a screen full of scrolling numbers, which will take a long time to print out since there are 25000 time steps. Instead, you should redirect the output to a file in the following manner:

            >file  yourfilename.dat

    The last word, console, redirects kForth's output back to the terminal. On a 500 MHz processor, the calculation takes about 2 to 3 seconds. The output file will contain the following columns:

            col 1    time in ns
            col 2    current in mA
            col 3    intensity in the scaled units (|Y|^2)
            col 4    phase in units of pi
            col 5    carrier density in scaled units (Z)

  6. Now, you can use your favorite plotting utility (xyplot maybe) to look at the results.