Traveling Wave Laser Model
Keywords
electrical, optical, bidirectional
Ports
Name  Type 

input  Electrical Signal 
port 1  Optical Signal 
port 2  Optical Signal 
Properties
General Properties
Name  Default value  Default unit  Range 

name Defines the name of the element. 
Laser TW     
annotate Defines whether or not to display annotations on the schematic editor. 
true    [true, false] 
enabled Defines whether or not the element is enabled. 
true    [true, false] 
type Defines the element unique type (read only). 
Laser TW     
description A brief description of the elements functionality. 
Traveling Wave Laser Model     
prefix Defines the element name prefix. 
TWLM     
model Defines the element model name. 
     
library Defines the element location or source in the library (custom or design kit). 
     
local path Defines the local path or working folder $LOCAL for the element. 
     
url An optional URL address pointing to the element online help. 
     
Standard Properties
Name  Default value  Default unit  Range 

frequency Central frequency of operation. 
193.1 
THz* *std. unit is Hz 
(0, +∞) 
length Defines the laser active region and cavity length L. 
0.0003  m  [0, +∞) 
active region width Defines the active region width w. 
5e006  m  [0, +∞) 
active region thickness Defines the active region depth d. 
100e009  m  [0, +∞) 
current injection efficiency The ratio of total current that gets injected into the quantum wells 
1    [0, 1] 
ambient temperature The ambient temperature. The total laser temperature is the sum of ambient temperature and selfheating temperature increase 
300  K  [0, +∞) 
current distribution table Defines the current distribution table as distribution weight vs. location. 
<2> [0, 1]     
load current distribution from file Defines whether or not to load the current distribution from file. 
false    [true, false] 
current distribution filename Defines the filename to load the current distribution table. 
current_distribution.dat     
Waveguide/Mode 1 Properties
Name  Default value  Default unit  Range 

orthogonal identifier 1 The first identifier used to track an orthogonal mode of an optical waveguide. For most waveguide, two orthogonal identifiers '1' and '2' are available (with the default labels 'TE' and 'TM' respectively). 
1    [1, +∞) 
label 1 The label corresponding to the first orthogonal identifier. 
TE     
polarization 1 Defines the waveguide polarization. 
TE    [TE, TM 
loss 1 The loss corresponding to the first orthogonal identifier. 
4342.944819  dB/m  [0, +∞) 
loss density coefficient 1 The loss density coefficient corresponding to the first orthogonal identifier. When multiplied with carrier density, this can give the free carrier absorption contribution to the total loss. 
0  dB*m^2  [0, +∞) 
effective index 1 The effective index corresponding to the first orthogonal identifier. 
3.5    (∞, +∞) 
group index 1 The group index coefficient corresponding to the first orthogonal identifier. 
4    [0, +∞) 
dispersion 1 The dispersion coefficient corresponding to the first orthogonal identifier. 
0  s/m/m  (∞, +∞) 
mode confinement factor 1 Defines the mode confinement factor. 
1    [0, 1] 
spontaneous emission factor 1 Defines the spontaneous emission coupling factor. 
0.01    [0, +∞) 
facet reflectivity left 1 Defines the facet reflectivity left. 
0.9    [0, 1] 
facet phase left 1 Defines the facet phase left. 
0  rad  (∞, +∞) 
facet reflectivity right 1 Defines the facet reflectivity right. 
0.9    [0, 1] 
facet phase right 1 Defines the facet phase right. 
0  rad  (∞, +∞) 
grating coupling real coefficient 1 Defines the grating coupling real coefficient. 
0  1/m  (∞, +∞) 
grating coupling imag coefficient 1 Defines the grating coupling imag coefficient. 
0  1/m  (∞, +∞) 
Waveguide/Apodization Properties
Name  Default value  Default unit  Range 

apodization function Defines the grating apodization type. 
uniform    [uniform, user defined, Gaussian, raised cosine, hyperbolic tangent, sinc 
apodization parameter The grating apodization parameter. 
0.5    (∞, +∞) 
apodization table Table containing normalized length versus apodization parameters. 
<2,2> [0, 1, 1,...]     
load apodization from file Defines whether or not to load apodization parameters from an input file or to use the currently stored values. 
false    [true, false] 
apodization filename The file containing the normalized length versus apodization parameter values. Refer to the Implementation Details section for the format expected. 
apodization.dat     
Waveguide/Chirp Properties
Name  Default value  Default unit  Range 

chirp function Defines the grating chirp type. 
none    [none, user defined, linear chirp parameter, linear chirp coefficient 
chirp parameter The chirp parameter for a linear chirped grating. 
0    (∞, +∞) 
chirp coefficient The chirp coefficient (dλ/dz) for a linear chirped grating. 
0    (∞, +∞) 
chirp table Table containing normalized length versus chirp coefficients. 
<2,2> [0, 1, 0,...]     
load chirp from file Defines whether or not to load chirp coefficients from an input file or to use the currently stored values. 
false    [true, false] 
chirp filename The file containing the normalized length versus chirp coefficient values. Refer to the Implementation Details section for the format expected. 
chirp.dat     
Waveguide/Recombination Properties
Name  Default value  Default unit  Range 

recombination input parameter Defines whether the input parameter is a table with carried density dependent values or coefficients of a polynomial function. 
coefficients    [table, coefficients 
Waveguide/Gain Properties
Name  Default value  Default unit  Range 

gain shape Defines the shape of the gain spectrum. 
Lorentzian    [Lorentzian, user defined, Westbrook 
load gain from file Defines whether or not to load measurements from an input file or to use the currently stored values. 
false    [true, false] 
gain filename The filename containing the gain spectrum shape fitted data. 
     
gain coefficient Defines the gain coefficient a_{0}. 
15e021  m^2  (∞, +∞) 
carrier density at transparency Defines the carrier density at transparency n_{0}. 
1.5e+024  m^3  (∞, +∞) 
initial carrier density Defines the initial carrier density. 
1.5e+024  m^3  (∞, +∞) 
diffusion constant Defines the diffusion constant. 
0  m^2/s  [0, +∞) 
gain compression factor Defines the gain compression factor ϵ. 
0  m^3  (∞, +∞) 
gain shape center frequency Defines the gain shape center frequency. 
193.1 
THz* *std. unit is Hz 
(0, +∞) 
gain shape quality factor Defines the gain shape quality factor. 
100    [0, +∞) 
gain shape reference carrier density Defines the gain shape reference carrier density. 
1.5e+024  m^3  [0, +∞) 
differential gain center frequency Defines the differential gain center frequency. 
0  Hz/m^3  (∞, +∞) 
differential gain quality factor Defines the differential gain quality factor. 
0  1/m^3  (∞, +∞) 
Waveguide/Spontaneous Emission Properties
Name  Default value  Default unit  Range 

spontaneous emission from gain Defines whether or not to use the gain shape as the spontaneous emission shape. 
true    [true, false] 
load spontaneous emission from file Defines whether or not to load measurements from an input file or to use the currently stored values. 
false    [true, false] 
spontaneous emission filename The filename containing the spontaneous emission fitted data. 
     
spontaneous emission center frequency Defines the spontaneous emission center frequency. 
193.1 
THz* *std. unit is Hz 
(0, +∞) 
spontaneous emission quality factor Defines the spontaneous emission quality factor. 
10e006    [0, +∞) 
spontaneous emission reference carrier density Defines the spontaneous emission reference carrier density. 
1.5e+024  m^3  [0, +∞) 
differential spontaneous emission center frequency Defines the differential spontaneous emission center frequency. 
0  Hz/m^3  (∞, +∞) 
differential spontaneous emission quality factor Defines the differential spontaneous emission quality factor. 
0  1/m^3  (∞, +∞) 
index perturbation Defines the index perturbation type 
linewidth enhancement factor    [linewidth enhancement factor, user defined 
linewidth enhancement factor Defines the linewidth enhancement factor α. 
0    (∞, +∞) 
index perturbation table Defines the index perturbation table 
<2,2> [0, 0, 0,...]     
load index perturbation from file Defines whether or not to load index perturbation from file 
false    [true, false] 
index perturbation filename Defines the filename to load index perturbation table 
index_perturbation.dat     
Waveguide/Grating Properties
Name  Default value  Default unit  Range 

enable grating Defines whether to add a grating to the device or not. 
false    [true, false] 
grating period The grating period. 
0  m  [0, +∞) 
grating phase slip The grating phase slip. 
1.570796327  rad  (∞, +∞) 
grating phase slips table Defines the grating phase slips table 
<2> [0, 0]     
load phase slips from file Defines whether or not to load phase slips from file 
false    [true, false] 
phase slips filename Defines the filename to load phase slips table 
phase_slips.dat     
Enhanced Properties
Name  Default value  Default unit  Range 

output carrier density Defines whether or not to add an additional output port to monitor the average carrier density. 
false    [true, false] 
Numerical Properties
Name  Default value  Default unit  Range 

minimum number of sections Defines the number of longitudinal sections. 
100    (0, +∞) 
convert noise bins Defines if noise bins are incorporated into the signal waveform. 
true    [true, false] 
automatic seed Defines whether or not to automatically create an unique seed value for each instance of this element. The seed will be the same for each simulation run. 
true    [true, false] 
seed The value of the seed for the random number generator. A value zero recreates an unique seed for each simulation run. 
1    [0, +∞) 
Numerical/Gain Fitting Properties
Name  Default value  Default unit  Range 

gain fitting number of coefficients Defines the maximum number of coefficients for the fitting function. 
5    [0, +∞) 
gain fitting tolerance Defines the mean square error for the fitting function. 
0.05    [0, 1] 
gain fitting maximum number of iterations This determines the maximum number of iterations required before fitting reaches the tolerance error. 
50    [1, +∞) 
gain fitting rolloff Defines the frequency roll off for the fitting function. 
0.05    [0, 1] 
Numerical/Spontaneous Emission Fitting Properties
Name  Default value  Default unit  Range 

spontaneous emission fitting number of coefficients Defines the maximum number of coefficients for the fitting function. 
5    [0, +∞) 
spontaneous emission fitting tolerance Defines the mean square error for the fitting function. 
0.05    [0, 1] 
spontaneous emission fitting maximum number of iterations This determines the maximum number of iterations required before fitting reaches the tolerance error. 
50    [1, +∞) 
spontaneous emission fitting rolloff Defines the frequency roll off for the fitting function. 
0.05    [0, 1] 
Simulation Properties
Name  Default value  Default unit  Range 

output signal mode The output signal mode. 
%output signal mode%    [sample, block 
sample rate The sample rate of the generated signal. This is typically set by the global properties in the root (topmost) element. 
%sample rate%  Hz  [0, +∞) 
Diagnostic Properties
Name  Default value  Default unit  Range 

run diagnostic Enables the gain and spontaneous emission spectrum response to be generated as results. 
true    [true, false] 
diagnostic size The number of frequency points used when calculating the gain and spontaneous emission spectrum response. 
1024    [2, +∞) 
longitudinal profiles downsample factor

1    [1, +∞) 
record carrier density profile Enables carrier density profile output as a function of time and position. 
false    [true, false] 
record mode amplitude profile Enables longitudinal mode amplitude profile output as a function of time and position. 
false    [true, false] 
record photon density profile Enables longitudinal photon density profile output as a function of time and position. 
false    [true, false] 
record gain spectrum profile Enables gain spectrum profile output as a function of time, frequency, and position. 
false    [true, false] 
record spontaneous emission spectrum profile Enables spontaneous emission spectrum profile output as a function of time, frequency, and position. 
false    [true, false] 
record stimulated emission power density profile Enables stimulated emission power density [W/m^3] profile output as a function of time and position. 
false    [true, false] 
record lumped gain spectra Enables lumped gain spectrum output as a function of time and frequency. 
false    [true, false] 
record recombination rates profile Enables recombination rates [1/s] profile output as a function of time and position. 
false    [true, false] 
record diffusive carrier flux profile Enables diffusion current density profile output as a function of time and position. 
false    [true, false] 
record thermionic leakage current Enables thermionic leakage current output as a function of time. 
false    [true, false] 
record temperature profile Enables temperature profile output as a function of position and iteration number. 
false    [true, false] 
record joule heat power profile Enables Joule heat power profile [W] output as a function of position and iteration number. 
false    [true, false] 
record nonradiative recombination heat power profile Enables nonradiative recombination heat power [W] profile output as a function of position and iteration number. 
false    [true, false] 
record capture and escape heat power profile Enables capture and escape heat power [W] profile output as a function of position and iteration number. 
false    [true, false] 
record absorption heat power profile Enables free carrier absorption heat power [W] profile output as a function of position and iteration number. 
false    [true, false] 
Waveguide/Recombination/Table Properties
Name  Default value  Default unit  Range 

load recombination from file Defines whether or not to load recombination data from an input file or to use the currently stored values. 
false    [true, false] 
recombination filename The file containing the recombination data. Refer to the Implementation Details section for the format expected. 
     
recombination table A matrix editor for users to read the element recombination data values. 
<3> [0, 0, 0]     
Waveguide/SCH/Thermionic leakage Properties
Name  Default value  Default unit  Range 

thermionic leakage model Defines the type of thermionic leakage model. 
none    [none, Schneider1988 
quantum barrier height Defines the quantum energy barrier height. 
0.1  eV  [0, +∞) 
SCH barrier height Defines the separate confinement heterostructure energy barrier height. 
0.2  eV  [0, +∞) 
quantum well effective mass Defines the quantum well effective mass. 
0.05  me  [0, +∞) 
quantum barrier effective mass Defines the quantum barrier effective mass. 
0.1  me  [0, +∞) 
Waveguide/Surface Recombination Properties
Name  Default value  Default unit  Range 

left facet surface recombination velocity Defines the left facet surface recombination velocity. 
0  m/s  [0, +∞) 
right facet surface recombination velocity Defines the right facet surface recombination velocity. 
0  m/s  [0, +∞) 
Waveguide/SCH Properties
Name  Default value  Default unit  Range 

enable SCH To enable separate confinement heterostructure 
false    [true, false] 
well carrier capture rate The well carrier capture rate including transport time over the barriers 
14.2857e+009  1/s  [0, +∞) 
well carrier escape rate The well carrier escape rate 
7.14286e+009  1/s  [0, +∞) 
total well thickness The total well thickness 
10e009  m  (0, +∞) 
total barrier thickness The total barrier thickness 
10e009  m  (0, +∞) 
Waveguide/Recombination/Coefficients/Temperature dependence Properties
Name  Default value  Default unit  Range 

radiative recombination eta Defines the radiative recombination temperature coefficient eta 1/lifetime=(A_{rad}+B_{rad}*N+C_{rad}*N^2)*(T/300)^eta. 
0    (∞, +∞) 
nonradiative linear recombination eta Defines the nonradiative linear recombination temperature coefficient eta A_{nr}*(T/300)^eta. 
0    (∞, +∞) 
nonradiative quadratic recombination eta Defines the nonradiative quadratic recombination temperature coefficient eta B_{nr}*(T/300)^eta. 
0    (∞, +∞) 
nonradiative cubic recombination activation energy Defines the nonradiative cubic recombination temperature activation energy E_{a} C_{nr}*exp(E_{a}*(1/kT_{0}1/kT)). 
0  eV  [0, +∞) 
Waveguide/Spontaneous Emission/Temperature Properties
Name  Default value  Default unit  Range 

spontaneous emission shape reference temperature Defines the spontaneous emission reference temperature. 
300  K  [0, +∞) 
spontaneous emission center frequency linear parameter Defines the linear parameter of the temperature dependence of the spontaneous emission center frequency a*T. 
0  Hz/K  (∞, +∞) 
spontaneous emission center frequency quadratic parameter Defines the quadratic parameter of the temperature dependence of the spontaneous emission center frequency b*T^2. 
0  Hz/K^2  (∞, +∞) 
spontaneous emission quality factor linear parameter Defines the linear parameter of the temperature dependence of the spontaneous emission quality factor a*T. 
0  1/K  (∞, +∞) 
spontaneous emission quality factor quadratic parameter Defines the quadratic parameter of the temperature dependence of the spontaneous emission quality factor b*T^2. 
0  1/K^2  (∞, +∞) 
Waveguide/Recombination/Coefficients Properties
Name  Default value  Default unit  Range 

radiative linear recombination coefficient Defines the radiative linear recombination coefficient A_{rad}. 
250e+006  1/s  (∞, +∞) 
radiative quadratic recombination coefficient Defines the radiative quadratic recombination coefficient B_{rad}. 
0  m^3/s  (∞, +∞) 
radiative cubic recombination coefficient Defines the radiative cubic recombination coefficient C_{rad}. 
0  m^6/s  (∞, +∞) 
nonradiative linear recombination coefficient Defines the nonradiative linear recombination coefficient A_{nr}. 
0  1/s  (∞, +∞) 
nonradiative quadratic recombination coefficient Defines the nonradiative quadratic recombination coefficient B_{nr}. 
0  m^3/s  (∞, +∞) 
nonradiative cubic recombination coefficient Defines the nonradiative cubic recombination coefficient C_{nr}. 
0  m^6/s  (∞, +∞) 
Waveguide/Mode 1/Temperature dependence Properties
Name  Default value  Default unit  Range 

temperature index perturbation Defines the temperature index perturbation type 
linear    [linear, user defined 
temperature index perturbation linear coefficient Defines the temperature index perturbation linear coefficient dn/dT. 
0  1/K  (∞, +∞) 
temperature index perturbation table Defines the temperature index perturbation table 
<2,2> [0, 0, 0,...]     
load temperature index perturbation from file Defines whether or not to load temperature index perturbation from file 
false    [true, false] 
temperature index perturbation filename Defines the filename to load temperature index perturbation table 
index_perturbation_temperature.dat     
Waveguide/Gain/Temperature Properties
Name  Default value  Default unit  Range 

gain shape reference temperature Defines the gain shape reference temperature. 
300  K  [0, +∞) 
gain coefficient linear parameter Defines the linear parameter of the temperature dependence of the gain coefficient a*T. 
0  m^2/K  (∞, +∞) 
gain coefficient quadratic parameter Defines the linear parameter of the temperature dependence of the gain coefficient a*T. 
0  m^2/K^2  (∞, +∞) 
transparency density linear parameter Defines the linear parameter of the temperature dependence of the carrier density at transparency a*T. 
0  1/m^3/K  (∞, +∞) 
transparency density quadratic parameter Defines the quadratic parameter of the temperature dependence of the carrier density at transparency b*T^2. 
0  1/m^3/K^2  (∞, +∞) 
center frequency linear parameter Defines the linear parameter of the temperature dependence of the gain shape center frequency a*T. 
0  Hz/K  (∞, +∞) 
center frequency quadratic parameter Defines the quadratic parameter of the temperature dependence of the gain shape center frequency b*T^2. 
0  Hz/K^2  (∞, +∞) 
quality factor linear parameter Defines the linear parameter of the temperature dependence of the gain shape quality factor a*T. 
0  1/K  (∞, +∞) 
quality factor quadratic parameter Defines the quadratic parameter of the temperature dependence of the gain shape quality factor b*T^2. 
0  1/K^2  (∞, +∞) 
Waveguide/Selfheating Properties
Name  Default value  Default unit  Range 

enable selfheating Enables selfheating model. 
false    [true, false] 
active layer thermal resistivity Defines the active layer thermal resistivity 
100e012  m*K/W  [1e10, +∞) 
activelayertoambient thermal resistance Defines the activelayertoambient thermal resistance. 
100e012  K/W  [1e10, +∞) 
effective electrical resistance Defines the effective electrical resistance folded onto the active layer. If the actual resistive layer is not close to the active layer scale it appropriatelly to have the same effect on the active layer temperature. 
0  Ohm  [0, +∞) 
active layer band gap Defines the active layer band gap. 
0  eV  [0, +∞) 
====================================
See Also
Please see the FabryPerot Laser page for an application example of this compact laser model.
Please see the Gain Fitting page for an application example of the laser gain curve fitting.
Implementation Details
A generic geometry of the gain element is shown in the figure below. l_{act}, d_{act} and w_{act} are the length, depth and width of the active region of the gain element, respectively. The length of the active region is implicitly equal to the length of the gain element, however, the width (and depth) are not assumed to be the same as those of the entire gain element, although the width is shown to be in the figure below.
Carrier Recombination
Two sets of recombination coefficients are defined in this compact model, one set each for the radiative recombination and nonradiative recombination, respectively. The definition of the parameters and their relationships are listed below.
$$\frac{d N}{d t}=\frac{d N_{r a d}}{d t}+\frac{d N_{n r}}{d t}=\frac{N}{\tau}=\frac{N}{\tau_{r a d}}+\frac{N}{\tau_{n r}}$$ 
(1) 
$$\frac{\Delta N}{\Delta T}=\frac{\Delta N_{r a d}}{\Delta T}+\frac{\Delta N_{n r}}{\Delta T}$$ 
(2) 
$$\frac{\Delta N_{r a d}}{\Delta T}=A_{r a d} N+B_{r a d} N^{2}+C_{r a d} N^{3}$$ 
(3) 
$$\frac{\Delta N_{n r}}{\Delta T}=A_{n r} N+B_{n r} N^{2}+C_{n r} N^{3}$$ 
(4) 
$$\tau_{r a d}=\left[A_{r a d}+B_{r a d} N+C_{r a d} N^{2}\right]^{1}$$ 
(5) 
$$\tau_{n r}=\left[A_{n r}+B_{n r} N+C_{n r} N^{2}\right]^{1}$$ 
(6) 
$$\frac{1}{\tau}=\frac{1}{\tau_{r a d}}+\frac{1}{\tau_{n r}}$$ 
(7) 
$$\Delta T=1 / \text {sample rate}$$ 
(8) 
$$\Delta N_{r a d}$$ 
change in carrier concentration from radiative processes 
$$\Delta N_{n r}$$ 
change in carrier concentration from nonradiative processes 
$$\tau_{r a d}$$ 
radiative carrier lifetime 
$$\tau_{n r}$$ 
nonradiative carrier lifetime 
$$\tau$$ 
overall carrier lifetime 
$$\Delta T$$ 
simulation time step 
$$A_{\text {rad }}$$ 
radiative linear recombination coefficient 
$$A_{n r}$$ 
nonradiative linear recombination coefficient 
$$B_{\text {rad }}$$ 
radiative quadratic recombination coefficient 
$$B_{n r}$$ 
nonradiative quadratic recombination coefficient 
$$C_{\text {rad }}$$ 
radiative cubic recombination coefficient 
$$C_{n r}$$ 
nonradiative cubic recombination coefficient 
$$N$$ 
carrier density 
Gain
Lorentzian gain shape
As an optical mode traverses a section of gain element, its power grows exponentially. With the exponential rate of growth being proportional to the mode confinement to the active portion section of the structure and to the material gain which is, in general, frequency and carrier dependent. In the present model, the peak of the spectral gain shapes vary linearly with carrier density about the transparency carrier density with a slope given by the gain coefficient, and with a discount at high photon densities (referred to the volume of the gain section). The gain shapes are Lorentzian with user specified center frequency and Q values, and the center frequency and Q can be made to vary dynamically as a linear function of the carrier density.
The following table lists the definitions of the parameters used to define the effect of gain in the compact model element.
$$a_{p}$$ 
gain coefficient 
$$\varepsilon$$ 
nonlinear gain coefficient 
$$a_{f G}$$ 
differential gain center frequency 
$$S$$ 
photon density with respect to the volume of the active region 
$$a_{O G}$$ 
differential gain quality factor 
$$f_{0 G}$$ 
gain shape center frequency 
$$N_{G r e f}$$ 
gain shape reference carrier density 
$$Q_{0 G}$$ 
gain shape quality factor defined as $$Q_{0 G} = \frac{f_c}{FWHM},$$ where \(f_c\) is the center frequency and \(FWHM\) is gain full width at half maximum in units of frequency on the linear scale. 
$$N_{t r}$$ 
carrier density at transparency 
$$L\left(f_{c G}, Q_{G} ; f\right)$$ 
unity peak Lorentzian function centered at \(f_{0 G}\) with quality factor \(Q_{G}\) 
Within one section of the active region as shown in the figure below, the gain and quality factor following the relationship listed below.
$$ \frac{E(\Delta L)^{2}}{E(0)^{2}}=e^{\Gamma g(f, N) \Delta L} $$ 
(9) 
$$ g(f, N)=g_{peak} L\left(f_{c G}, Q_{G} ; f\right) $$ 
(10) 
$$ g_{p e a k}=a_{p} \frac{1}{1+\varepsilon S}\left(NN_{t r}\right) $$ 
(11) 
$$ f_{c G}(N)=f_{0 G}+a_{f G}\left(NN_{Gref}\right) $$ 
(12) 
$$ Q_{G}(N)=Q_{0 G}+a_{Q G}\left(NN_{Gref}\right) $$ 
(13) 
The following figure shows a plot of a family of Lorentzian Gain Shapes with center frequencies and Q's being made to vary dynamically as a linear function of carrier density within each spatial element.
Please note that, constant gain shape can be achieved by setting \(a_{Q G}=a_{f G}=0\) 
User defined gain shape
This feature is introduced since R2017a. User could use the mczfit command to find the variable gain filter coefficients based on a text file which contains the carrier density and gain curve information. At the same time, a .mcfdb file which contains the fitting coefficients information will be generated and can be uploaded to the TWLM element to define the laser gain curves.
For the implementation details of the script command mczfit and this gain fitting feature, please visit the pages mczfit and Gain Fitting.
Spontaneous Emission
Users can set the spontaneous emission spectrum shape be equal to the gain spectrum shape by setting the "spontaneous emission from gain" to be true, or they can set this parameter to false and then enter the following parameters to define the spontaneous emission spectrum in a manner similar to that for the defining the gain spectrum.
$$f_{0 E}$$ 
spontaneous emission center frequency 
$$Q_{0 E}$$ 
spontaneous emission quality factor 
$$a_{f E}$$ 
spontaneous emission differential center frequency 
$$a_{QE}$$ 
spontaneous emission quality factor 
$$N_{E ref}$$ 
spontaneous emission reference carrier density 
$$L\left(f_{c E}, Q_{E} ; f\right)$$ 
unity peak Lorentzian function centered at \(f_{cG}\), with quality factor \(Q_E\) 
The spontaneous emission shape is given by
$$ E(f, N)=L\left(f_{c E}, Q_{E} ; f\right) $$ 
(14) 
with
$$ f_{c E}(N)=f_{0 E}+a_{f E}\left(NN_{\text {Eref}}\right) $$ 
(15) 
$$ Q_{E}(N)=Q_{0 E}+a_{Q E}\left(NN_{E i e f}\right) $$ 
(16) 
The other parameter in this group is the linewidth enhancement factor. It is important in this model as it is responsible for the change in material index with change in carrier density, and this effect gives rise to laser chirp.
The linewidth enhancement factor is defined by:
$$ \alpha_{H}=\frac{4 \pi}{\lambda_{0}} \frac{\frac{\partial n}{\partial N}}{\frac{\partial g}{\partial N}} $$ 
(17) 
where \({\partial g}/{\partial N}\) is the gain coefficient in the compact laser model.
Please note that the reference wavelength,\(\lambda_{0}\), is taken to be the frequency specified in the Standard section, which is the only place this Standard/frequency affects the physical model. 
(Optical) Mode
The effective index parameter is not used in this model as it is implicitly set equal to the group index which is the relevant quantity affecting laser dynamics.
The spontaneous emission factor is the fraction of the spontaneous emission that gets coupled into the waveguide mode.
Number of Sections
The gain element is divided into a number of sections each with a length of ΔL. The time step ΔT of the simulation is the inverse of the simulation sample rate, which must be set to be larger than the bandwidth simulated, including that of the gain element gain shape.
INTERCONNECT will find the value of the number of sections that makes the simulated group velocity,
$$ \frac{\Delta L}{\Delta T} $$
as close as possible to actual group velocity \(v_{g}=c / n_{g}\) (where c is the speed of light, and n_{g} the group index of the mode) for a given sample frequency. Note that for a single optical mode, this agreement can be made perfect by adjusting the simulation sample rate.
However, the user can decide upon a minimum number of sections to be used based on other considerations, which they can specify in the "minimum number of sections" parameter. A warning message will be shown if the number of sections is less than the value thus specified
Another consideration for the sample rate is that it should be approximately 5 times greater than the input/output bandwidth of interest to ensure adequate fidelity of the gain and spontaneous emission frequency dependencies implemented by timedomain IIR filtering.
For an application example, please see the FabryPerot Laser page.
Current Distribution
The current distribution along the length can be defined either by using current distribution table or by loading current distribution data from the file. The first column in the current distribution table is the normalized position along the length of the structure, and the second column is the unitless weight to be assigned to the current injected at that position. The position values must be normalized between 0 and 1. For example, the figure below corresponds to the values defined in the following current distribution table.
Normalized position  Weights (arb. units) 
0  0 
0.249  0 
0.251  4 
0.749  4 
0.751  0 
1  0 
From the current distribution table, the actual position is obtained by multiplying the normalized position by the length of TWLM. The weights are then linearly interpolated at the middle of each TWLM section. The weights will be automatically normalized (if not done by the user), so that the integral of weights is equal to 1. The injection current applied to each section is given by:
$${I_i}=I \frac{W_i}{\sum_{i=1}^N{W_i}}$$ 
(18) 
The sum of the injection current applied to each section is equal to the total injection current \(I\).
$$\sum_{i=1}^N I_i=I$$ 
(19) 
The following figure shows the simulated normalized current injection weights for a TWLM length of 1000 µm.
Diagnostic
Since INTERCONNECT release 2019a, The TW Laser model added the carrier profile properties under the "Diagnostic" category. Users have the option to save the carrier profile to a text file with a customized downsample factor.
Following are the properties' definitions:
"save carrier profile": turns on and off the saving of the carrier profile in a text file.
"carrier profile filename": the name of the text file in which the carrier profile will be saved.
"carrier profile downsample factor": the factor by which the carrier profile data exported to the text file will be downsampled in time.
The text file exported is a matrix with the spatial profile from left to right labeled by the columns, and time labeled by the columns. The number of columns equals the number of spatial elements in the TWLM used in the simulation, and the number of rows equals (number of samples in the simulation)/(downsample factor).
The following figure shows the circuit in the example file CarrierProfile.icp:
and the script plotCarrierDensity.lsf can be used to read the generated carrier profile text file and plot the graphs of the carrier profiles at the first and last time step.