Optimization - Large ring


Hi Ahsan,

Can you kindly help me to run the parameter sweeps for my structure ? You said that you discussed with @kchow and found some errors in my scripting. I followed the post of @kchow regarding the big radius ring structures but my ring is not that big (32um approx). Though in later stages I do need to design a big radius ring (~180um).
Right now the problem I have is that I am writing my script in Model-Setup-Script section and trying to run the parameter sweep for radius of ring in the Optimizations and Sweeps window. But whenever I do so, I do not get the results since after each parameter sweep, I need to change my design to layout mode using command “switchtolayout”;.
But I don’t know where to write it down in the script such that my design switches to layout mode after every single parameter sweep.
If @kchow can also comment on this please.

Kindly help me with this.


Issue with setting simulation time from script and running parameter sweep


Thank you for tagging me to join the conversation. Before answering your specific questions, I would like to discuss some simulation approach for your design/simulation goal.

30 um radius is not a small ring. It can in principle use FDTD or varFDTD to simulation but it is going to take a while. So this is why we have another approach to use FDTD, MODE Solutions and INTERCONNECT for large ring designs. As discussed in that post, the IC approach is going to be much faster and accurate. However, you will need to input some parameters for IC, ie, S-parameters, neff of the bent waveguides, etc. And you will need to run FDTD/MODE Solutions simulations to obtain these parameters. However, these parameters are obviously radius dependent. As you can imagine, you will need to come up with a set of these parameters as a function of radius since you are going to optimize the radius.

On the other hand, sticking with the varFDTD approach will take a while to run your simulations. However, you will not need to worry about coming up a set of parameter for IC. All you have to do, is to set up the optimization (or parameter sweep) in MODE Solutions and let it run. This approach seems easier if you are learning to use our software. Therefore, I will recommend using the varFDTD solver for now. Once you are familiar with it, we can continue our discussion how to use IC.

Before we move on to optimization (or sweep), I want to make sure you simulation is reasonable. There are couple of crucial area that I will need to point out. I will edit your file and list the points here in the next couple of days.


Hello @kchow,

Thanks for your reply. I understand you well and looking forward to your help of pointing out the crucial points in my simulation and helping me running parameter sweeps. Moreover, I would like to tell you that for now even I want to work with the varFDTD and want to learn how to do the parameter sweeps to obtain ideal design parameters. Once I finish with this 32um radius ring, I need to design a racetrack resonator with the radius of approx ~180um. At that time it will be really helpful to know about the S-parameters extraction and incorporating in IC.

Well I already have practised designing the ring resonators in the IC by putting parameters such as : neff of TE and TM modes, loss, coupling coefficient (k), total length of ring (L), etc., obtained from varFDTD.
So I am really looking forward to your guidance for designing in varFDTD for now and later with IC.
Kindly help me at the earliest.

Thanks a lot.


One major problem with your file is that you seem to forget about the index of the material, such that the mode calculated from the solver is not so reasonable. see screenshots. Once you fix that, you should see a much better mode profile.

The other thing is that you should use a mode expansion monitor like this example to figure out the power carried by the mode of interest. (https://kb.lumerical.com/en/pic_passive_getting_started_ring_resonator_mode2.html)

I have also made minor adjustments here and there. For example, I think the mesh you used for initial simulation is a little too fine. Given the size of the radius, it will take a long time to run. That said, I think the EM simulation time you set in the simulation region is way too long. Although the autoshut off should trigger but the number is just out of scale.

The edited file SiN racetrack resonator (1).lms (338.6 KB). You should make sure that the simulation is working for 1 radius before moving on to a different radius.

For now, I will suggest you to stick with 30um radius to get some reasonable results. We are happy to assist your once you are ready to move on to IC simulations.


Hello @kchow,

Thanks for your help. Well I have been working on the file you have sent me. I checked the material properties and defined according to me. Even after that, I am getting a weird mode profile and when I run the simulation, I am not getting any power at drop port. Please see :

Moreover, I tried to check the propagation through video and I realized that modes are not confined within the waveguide and tend to diverge. Here, I don’t know why, I cant see my ring resonator !! (strange)

When it approaches near ring, it scatters out and most of the light is propagated via Through port and absolutely nothing reaches Drop port.
I am uploading my file.
SiN racetrack resonator_kchow.lms (485.4 KB)

Please help me with that.


I guess the main problem is that you did not have the Slab mode position properly specified. This is to tell the software which to point to calculate the slab mode for. In this case, it will be your waveguide core. Once you fix that, you can see a nicer plot in the slab mode plot. You can also see a nice mode plot from the Mode Source too.

Let me know how this goes.

SiN racetrack resonator_kchow.lms (345.8 KB)


Hello @kchow , I did simulate the small ring. I have done several parameter sweeps and found the max. transmission at Drop port is at radius = 34.84um and gap = 0.4662um of around 0.6. Now I am doing the parameter sweeps of Lc. The central wavelength is 1550nm and I am getting the transmission response as follows:

But in ideal case, the power transmission (T) at drop should be maximum (~ 0.9) and minimum at through port. Here, we can already see that through response is convincing with dropping to 0. So, In your opinion, how should I proceed further in order to increase the T(at Drop) = ~0.9 ?

Moreover, I have also started with the large ring of radius = 278um in Lumerical Interconnect. and obtaining the proper response at resonant wavelength. But if I try to run the simulation in MODE, fixing the same parameters (total ring length, radius, Lc, gap), my file does not run. As soon I hit the RUN button, after few seconds it switches to Layout Mode. Please help me with this.


The sum of T from all channels should be close to 1, if scattering is minimal. If there is significant scattering, then you may not be able to capture all the light at the bus waveguides. If scattering is not intended, then you may want to start looking into the cause of it, ie, simulation error, or a design problem.

As far as the super large ring goes, it is possible that it has a huge demand in the memory requirement. In that case, it becomes impossible for MODE Solutions to run this job, based on the given computational resources. You can take a look at this page to see how to find the Memory Report.


Hello @kchow, I am designing a silicon nitride waveguide racetrack resonator with following parameters: radius = 30um, gap=0.5um, Lc=30um. The expected quality factor should be around ~ 4000. But the quality factor I am getting is very low around 825. As we can see from the following transmission spectra of drop and through port that the curve doesn’t look like what usually should be for the racetrack resonator:

What could be the reason for this ? Though the T at drop port is around 0.9 so the design seems optimal.
Please help me with this.



it is not very obvious to me that what could be wrong from the plot that you have shown. The curves look smooth to me so the EM simulation time seem long enough for the signal to leave the simulation region. The sum of peaks and dips seem to add up to 1 too. so nothing seems suspicious to me.

If you can upload the file here, I am happy to take a look at it. But it will be hard to me to comment your design parameters.


Hello @kchow, the spectral response for the ring/racetrack resonator ideally looks like this (example):

It looks like little bit of flat-top response and very high Q-factor and very narrow 3-dB bandwidth. But in my case I suppose, I am not getting the narrow 3-dB bandwidth. Due to this there is no flat-top like response. The parameters of the design and the waveguide dimensions are from a journal, since I am trying to replicate the same results. So they should be good.

Moreover, for one other design which I am trying to design, I am getting a following response:

the design parameters are radius=34.92um, Lc=40.95um, gap=0.46um. Silicon nitride (n=2.04586) waveguide dimensions are 400nm x 400nm, surrounded by cladding of SiO2 (n=1.44). I did the parameter sweeps for coupling length (Lc) as well as gaps but not able to achieve the T at Drop port more than 0.66, whereas T @ thru is 0. So totat T = 0.66. Not able to understand , where I am loosing the rest of the power. Please help me with this.
Also, the spectral response doesn’t look like the one I showed in example earlier.
For higher gap (0.55um), response is somewhat similar to the example i.e. probably narrower 3-dB bandwidth and little bit like flat-top response.

So, kindly help me with theses 2 problems.



Are you able to upload the file here? I am happy to take a look at it to see if I can spot anything.


Hello @kchow, I am attaching the file along. racetrackresonator3.lms (1.1 MB)
I am getting the power transmission T at drop port = 0.64 and T at thru port = 0.029.
I have put the monitor on the ring also to check how light propagates inside the ring. it’s more than 1, so its’ good.
I am not able to understand where is the loss occurring. Please see the overall transmission of the ring.

I can see some loss out of the ring, probably that might be the reason that I am not getting the whole light transmitted at drop port.
Please have a look at the file and help me with getting the critical coupling condition (T@drop ~ 0,98 and T@thru ~0).
Waiting for your comments.

Thanks a lot


Hi @kchow, I am writing you this message again because the previous message I suppose wasn’t posted. I am attaching the file along. racetrackresonator3.lms (1.2 MB)
The problem with this is, that I am getting power transmission T at Drop port = 0.6 and T at thru port = 0. Also the peak sharpness is very low.
Please have a look at it. Help me in achieving critical coupling condition (T@drop ~ 0.98 and T@thru ~ 0)
I am getting some loss outside the ring as seen by the transmission attached:

I am not able to figure out where is loss and how to reduce this loss.
Kindly help me with this.
Your comments are appreciated.

Thanks a lot.


I am running your file with higher mesh accuracy. I will update you once it is done.


Thank you for your patience while I was testing your file. Your file is rather large (especially for a ring), so it takes time for testing. Anyhow, I think I am able to have some improvement on the results, see this plot now. (although not perfect yet, I think you may be able to perform convergence tests on it.)

The main change I have made is increasing the z span. The previous z span you had is too small such that the evanescent tail may not be fully resolved. Increase the z span (boundary conditions proximity) is also part of testing convergence. Refer to here for FDTD testing convergence (https://kb.lumerical.com/en/index.html?layout_analysis_test_convergence_fdtd.html), the behavior should be very similar to the varFDTD solver you are using.

See this plot to check the slab mode and make sure the z span is large enough to fully resolve it.

Although I have made other changes, eg, changing it to narrowband, increasing the simulation time, using default dt stability factor, etc. They dont seem to have huge effects on the results.

racetrackresonator3_KC.lms (1018.8 KB)
File attached.Hope this helps.


Hello @kchow, thanks for your suggestions. Well now I am able to obtain the proper spectra and desired critical coupling condition. I achieve the following spectra by increasing the radius and the set of parameters are r = 80um, g = 0.46um, Lc = 18.31um:

Now, I am trying to design a larger ring with the radius ~ 272um for a desired FSR of 100GHz at 1550nm. But the problem in designing such a big ring is that it takes enormous amount of memory and time. So, it’s not possible to optimize and simulate the design on MODE. I want to first design it in Interconnect, so that I get an idea of approximate parameters. But for that, do I need to import the s-parameters from varFDTD ? Or I can just setup the design and fill in all the details of directional coupler and waveguides? Attached is the electrical circuit of the desired ring-resonator:

I have few queries regarding the same:

  1. I have put in all the values (such as neff of TE and TM modes and lengths of waveguides, coupling coefficient (k) of coupler, etc.) for each segment of the circuit. Is this correct ? What else need to be done?
  2. Do I need to import s-parameters from varFDTD ? But for that again I need to run the simulation which takes lot of memory and time.
  3. In interconnect how can I introduce propagation loss ?
  4. Kindly tell me an accurate way to calculate coupling coefficient (k) for a directional coupler ?

Apart from this, also please tell me how to extract s-parameters for the ring-resonator and import in Interconnect.

Thanks a lot.


I think you are on the right track. For large radius like this, it is not suitable for component simulation tool to handle the entire ring/racetrack. Having Interconnect (IC) to help will be the correct approach.

  1. I think you have got some of the parameters in mind. In fact, there shouldnt be too many parameters you will need to worry about for the waveguides, but the coupler can have more parameters to deal with.

  2. (and 4) Yes it is necessary to run a component simulation (eg, varFDTD) to get the S-parameter(coupling efficiency) of the coupler. Depends on the size of the coupler, the component simulation itself can be large and memory intensive! If you are varying the gap, coupling length, you will allow need to run the simulation again for the s-parameters for each design variation. The good news is that we have released the Lumerical Compact Model Library (LCML) where you can somehow automate this process. In simple words, you can call varFDTD from IC. For this part of the process, I will recommend you to move the conversation to here, and let the LCML expert help get you started with LCML. You can simply mention that you have had some conversation with me here and the expert will be able to read the thread. Note that the we use FDTD in the LCML for that ring by default, but it is possible to use varFDTD instead. Again, I am sure the LCML expert will be able to help you.

  3. See the screenshot below, it should also be covered in LCML.

We have a tutorial to export the s-parameter or a ring, but I think it is not quite what you will need for your case. But you can learn the way that the s-parameters are exported from MODE. (https://kb.lumerical.com/en/index.html?pic_passive_getting_started_ring_resonator_mode2.html)


Hello @kchow,

Thanks for all your help. I will post my queries and comments on the link you have given me for the Lumerical Compact Modal Library. So if I understood correct, we will now have the library for the devices (like ring-resonator, bragg-gratings, etc) in Interconnect and we can run the parameter sweeps for the same ?
In the meanwhile I need your opinion on some of my results which I have obtained for the large radius ring-resonator.
Firstly, I tried to obtain the optimum parameters for the ring-resonator in Interconnect and got the transmission spectra as follows:

The parameters for this ring circuit were:- radius = 250um, gap = 350nm, coupling length = 20um.

So I was expecting to get somewhat similar response in MODE but I didn’t get that. Instead the spectral response looks like:

Looking at the spectral response, it seems to me that there is some problem with the coupling leading to very low light intensity at drop port. Also, I checked the Fourier transform spectra to examine the simulation time for complete simulation but the simulation time (30000fs) was not enough. What could be the possible reason for such a low transmission at drop port and how can I improve it ? I intend to achieve a proper spectral response for this ring as I obtained for the previous one (shown earlier in conversation) and obtain proper critical coupling.

Thanks a lot.


It does look like critical coupling isnt achieved yet, in your second figure. But it wont be entirely obvious to comment what could be wrong in your set up. For your first figure, it looks like you maybe looking a real part of the complex coefficient? You may need to view the abs()^2 to see the transmission, if that was the case.

I am on vacation right now. If you need immediate assistance, I can invite a colleague of mine to help, let us know. Or otherwise, I can try to provide some comments when I am to the office in a couple of weeks.

In the mean time, please provide any related simulations files here.