Laser gain simulation

Hi I’m trying to simulate laser spectrum simulation with user defined gain

So I followed TW laser model gain fitting example.

It is working when I use example ‘sampleGainData.txt’ file
but when I use my own test gain file simulation failed(Multi coefficient fitting failed).
And I don’t know what is problem.
testgain.txt (3.3 KB)

1 Like

Hi @minkyu226,

It seems like the “mczfit” command doesn’t work on 2 gain curves as I tested. It works on all other number of curve(s). Thank you very much for bringing this to our attention and I’ve reported this bug. I will definitely keep you in the loop on the fixing progress :slight_smile:

Hi gwang

Thank you for your help.

But I tried with other number of curves but it failed too.
testgain1.txt (5.6 KB)

Hi @minkyu226,

I dug up a bit and found that, the problem is because you have some empty spaces in your file that our solver does not recognize of, so that the mczfit fails. I modified your file a bit to clean up all the empty spaces and now the fitting works fine. The modified files are attached here: testgain1_modified.txt (5.6 KB), fitplotBasic_modified.lsf (862 Bytes), and the fitting result is as below:

To add on to my previous reply, the “mczfit” function won’t work on 2 gain curves (but it does work on one single gain curve fitting) because the fitting algorithm we are using has an interpolation step if the gain curves have dependence on carrier densities and it cannot perform the interpolation for just 2 gain curves. So if the gain curves do depend on carrier densities, there should be at least 3 curves to be enough for the fitting.

I will file a feature request on this to let the solver detect and remove the unnecessary special characters in the file automatically and will keep you in the loop on the progress.

1 Like

Thank you for your help

Many thanks!

1 Like

Hi

With your help I was able to get gain file using testgain.txt (3.1 KB) file to make gain file.

And I got this graph

  1. There is some error at boundary how can I fix it?

  2. I want to simulate and get laser spectrum and IV curve with this gain material.
    I tried by using FP-laser example but there is error in TWLM element.
    How can I get laser spectrum and LI curve with this gain material

Hi @minkyu226,

I am glad you made it work. Regarding your questions:

The fitting takes several taps to converge so you may always see some misalignment at the boundary. This is the nature of the fitting algorithm and I don’t think there is a way you can fix it. But you can enlarge the frequency range a bit beyond the exact range you want to fit so that you can guarantee the fitting is converged in the area you are interested.

Please try to use the example file linked in the Gain Fitting page. You have to load the file generated by the ‘mczfit’ command to the TWLM element:

But you will have to carefully tune the other parameters based on your design as well to make it work.

I hope this could help :slight_smile:

Hi Gwang:

I’m using the gain fitting model of TWLM element also. My model is very sensitive to some parameters like sample rate, laser cavity length and current value. I wonder why is it this way and how can I avoid problems.

Hi @yang.wu,

The gain curves suppose to be sensitive to some parameters. Could you please upload your file here and we can take a look?

Hi. I was creating a VCSEL with FDTD solutions. I used a gain material to replace the quantum wells. However, the E intensity keep growing with time. A laser must be steady at last. Is there any solution to make the E amplitude steady?

Hello @db19532,
I would recommend that you use a nonlinear gain material with gain saturation, such as the 4-level 2 electron model used in these examples:

Could you give me an example of parameters of 4-level 2- electron model which can enhence the light whose wavelength is between 550 and 600nm? I don’t have any other parameters except wavelength.

As discussed on the advanced material model page, the parameter that determines the gain frequency is the resonant angular frequency “wa”. The pump frequency is determined by “wb”. If you are not sure of the other parameters, I would recommend you use the parameters from one of our examples that uses this material model: