Understanding Lumerical's dark field beam source generation script

I’m trying to figure out how to use the newly released dark field beam source, listed at https://kb.lumerical.com/en/ref_sim_obj_dark_field_beam.html . Which I believe was first proposed in http://pubs.acs.org/doi/full/10.1021/acsnano.5b03622 .

My main confusion is about setting the amplitude of the inner source. The script in the source is unclear on a few points. The first is what the ratio is supposed to be, the naming convention is unclear. When the script calls for sqrt(E2far_outer / E2far_inner), does E2far_inner refer to the simulation when the inner source was disabled or when it was enabled (and the outer source was disabled)?

Secondly at what wavelength is this ratio to be calculated. As the attached .fsp file and setup script show this ratio is not constant for all simulation wavelengths. So does this mean that this setup is for a single frequency? In which case I’m not sure it’s so useful as a dark field beam source, which is used for spectral measurements. I tried taking the mean for all wavelengths in the script use that value and its inverse (in case I had the ratio wrong), and in neither case does it produce an annular beam, in the near field or in far field.

If anybody could help me out with this I’d greatly appreciate it. Thanks!

darkfield_setup.lsf (2.8 KB)
darkfield_source.fsp (22.0 KB)
ffproj_all_fpts_no_focus.lsf (991 Bytes)

1 Like

Hi @bpi,

Thanks for waiting. These are some comments and suggestions:

The convention is the following:

E2far_outer is the field intensity when only the outer source is on (with amplitude 1).
E2far_inner is the field intensity when only the inner source is on (with amplitude 1).

The ratio sqrt(E2far_outer / E2far_inner) is necessary for scaling the amplitude of the inner source to match the field intensity of the outer source (which stays with amplitude 1) so that we get the appropriate field cancellation in the inner region.

It is possible that the ratio depends on the frequency but you can only use one amplitude value in the source settings. It is probably a good idea to use the ratio for the center frequency. Unless the range of frequencies is too large I would expect it to work.

After taking a look at your simulation file I think the problem why you are not seeing the annular pattern is because the simulation span in the x and y directions is too small. When the simulation span is too small, the PML boundaries do not allow to detect the light scattered at steep angles as illustrated in the following diagram:

In our KB example we use x and y spans of 20um so you should definitely use a comparable span, especially because you are looking at large numerical apertures. By the way, I noticed you used NA_max=1.4, which is larger than the background index (1.33).

I have attached a modified version of your file which shows the desired annular pattern for wavelength 0.6um: darkfield_source_modFG.fsp (22.1 KB).

I would suggest working first on the single frequency simulation to make sure you get the desired pattern and then move on to the multi-frequency problem.

I should also point out that, strictly speaking, our regular Gaussian source is not broadband. However, we recently introduced a multi-frequency beam calculation, that might be useful in your case.


Ok thanks a lot for the help. The reason that I had been using a simulation with such a small sized span is that I’m doing plasmonics simulations, which require a very fine mesh near the nanoparticle. Due to the grid mesh, this means that such a large simulation will require a huge amount of memory. Do you have any suggestions as to how to reconcile these two requirements?

Hi @bpi,

One way to minimize the memory requirement is to use a mesh override in the region where the nanoparticle is, so that the mesh is finer close to the particle. You can also try to place the monitor for the farfield projection closer to the source and the structure so that it can collect light at steep angles more effectively. As you bring it closer, you can reduce the span of the simulation region; however, this requires some careful testing to make sure you are not missing important angles in the light collection.

1 Like

Hi @fgomez, in my previous comment I was implying the use of a mesh override region, but as FDTD runs on a grid that high mesh partially extends to other regions in the FDTD volume. Furthermore for more complex simulations than these setup simulations may not allow the use of symmetry to reduce the simulation volume, which will make this memory problem even worse.

Regardless, I can’t do anything with darkfield_source_modFG.fsp that you shared. The file is 20GB and when I open it on my computer with 16 GB of RAM, after trying to do any operation in the program FDTD solutions terminates with a memory error.

I’m running a span sweep as you suggest, so we’ll see if I can figure out a set of parameters where this works.

Hi @bpi,

The file I attached should not be that large. The file itself should be 22.1KB and the memory requirements for running it are the following:

If you haven’t made any changes to the file then there might be some other issue. Maybe a version problem. Which version of FDTD are you using? Is it the latest?

In any case, bringing the monitor for far-field as close as possible to the structure and checking the far-field results for decreasing span is a good idea. This will allow you to identify the smallest simulation span that allows you to collect light at the relevant angles.

1 Like

Hi @fgomez, you’re right the simulation you sent was indeed that size. I failed to mention that I was using a broadband simulation.

After doing a little convergence testing, with the single frequency simulation at 0.6 um, I found that the simulation span could be decreased down to 10um and the simulation would still correctly produce an annular beam like a darkfield source.
darkfield_source10e3_rat.fsp (19.0 KB)

However, when I try to convert this to a broadband simulation it gets quite large again. Going from 300 to 900nm, with 300 frequency points, and removing the symmetry BCs (not generally applicable) the monitor data saved is 18 GB, which is too big to use.

So back to one of my original questions. This source is used for spectroscopy. How can we make it work for that?


Hi @bpi,

I am not sure if the structure you want to include later on allows you to do this, but you can try bringing the source and monitor closer to each other so that light at steep angles can be collected with smaller x and y spans for the FDTD region. This might help a bit more but it seems like your simulation will still be very demanding in terms of memory.

If you don’t have a large amount of memory available, one option would be to split your simulation in a few simulations with smaller wavelength range and less frequency points. Also, it might be worth thinking what is the minimum frequency resolution that you need. If the frequency dependence does not have strong variations, maybe you can try less frequency points.

1 Like