Differences between simulation results and mie3d function



Previously, I posted a similar question on why simulations on seemingly identical simulation regions yielded different absorption results here. However, it turned out that the simulation regions were not in fact identical (different source injection axes.)

In the files attached below, however, the simulation regions are indeed identical (generated from the same script), with the only difference being the metal nanoparticle material (Au or Ag). I then modified the script provided in the mie 3d scattering kb page to analyze the absorption spectra and obtain the following results:

However, when I run the mie3d function on these parameters (Au or Ag nanoparticles with 50 nm radius), I obtain the following plots, which I have verified to be correct using other computational tools.

While the Ag analysis is very clearly different, the Au analysis is quite similar in terms of the shape of the plot. However, the peak absorption efficiency is different (~3 vs 2.6). As I used the script provided from the Lumerical website (with some minor modifications to accommodate for different materials), I am inclined to believe that there is something in the simulation region that is defined incorrectly.

In defining my simulation regions, I followed the suggestions found here, so I am still at a loss to why my results differ from mie theory.

I would greatly appreciate it if someone could look through my .fsp files to see if I did overlook something when defining my simulation regions.

Thanks in advance.

mie_analysis_3d_modified.lsf (6.8 KB)
1x1x1_Au_on_Air_50_nm_rad_(sphere).fsp (371.7 KB)
1x1x1_Ag_on_Air_50_nm_rad_(sphere).fsp (372.3 KB)
mie3d_func_test.lsf (580 Bytes)

Simulation of nanoparticle has unexpected absorption peak
Simulation of nanoparticle has unexpected absorption peak

Dear @eelu

Thank you very much for detailed explanation, and providing the supporting document. This is one of the posts which I believe should get A+ for following our guidelines on how to create a post :slight_smile:

I focused on the silver (Ag) case, which the results were most inconsistent one. Here are the few things that I modified:

  • simulation time: it was too short and simulation was not triggering the auto shutoff level. Generally when you see ripples in your results, simulation time is the number one thing that you can check (another reason might be poor absorption due to PML but was not the problem in your case). We have many available content in KX that you can read, for example here and here.

  • material fitting: I found that in your original simulation file, you do not have a good fit specially for the imaginary part. Fit was a straight line with value of zero for imaginary part. I modified it so that it provides a much better fit and captures the index variation. Please note that this an important factor if you want to compare your results with theory or any other simulation tool. This is a good link to learn more about material fitting.

  • FDTD simulation region and mesh size: While the last two steps improved the results a lot, plots were slightly off. I increased the simulation region, and more importantly, used a fine mesh override to resolve the sphere.

Here are the final results:

Here is the script that I used and simulation file attached:



n1 = getnamed("FDTD","background index");
# Cross section analysis

?"  Calculating scattering and absorption cross sections";

# get sigma and particle radius
sigmaabs = getresult("total","sigma");
sigmascat = getresult("scat","sigma");
r = getnamed("sphere","radius"); # the radius of the mie particle

# Calculate cross-sections normalized to the particle area
Qscat = sigmascat.sigma/(pi*r^2);
Qabs  = -sigmaabs.sigma/(pi*r^2);
lambda = sigmaabs.lambda;

# calculate the size parameter
size_parameter = 2*pi*r/lambda * n1;

# compare with analytic based on material fit
n2 = getfdtdindex("Ag",sigmaabs.f,min(sigmaabs.f),max(sigmaabs.f));
#n2 = getindex("Au",c/lambda);
n1 = getnamed("FDTD","background index");
m = n2/n1;
Qtheory = mie3d(m,size_parameter);

# Plot results
plot(lambda*1e6,Qscat,Qtheory.Qscat,"wavelength","Mie efficiency","Scattering cross section");
legend("FDTD","Mie theory");
plot(lambda*1e6,Qabs,Qtheory.Qabs, "wavelength","Mie efficiency","Absorption cross section");
legend("FDTD","Mie theory");

1x1x1_Ag_on_Air_50_nm_rad_(sphere)_modified.fsp (376.7 KB)

I think that you should be able to improve the results by using a better fit and finer mesh in both files. Please keep me updated if you had further questions.



Hi @bkhanaliloo,

Thank you very much for your detailed explanation for why my simulations did not match mie theory. I have since adjusted the material fits and changed the FDTD/mesh parameters. I have not yet completed running the simulations due to the length of the analysis, but I do have some remaining questions.

  1. In the modified simulation file you provided, the simulation appears as such:

I have seen how the mesh override region is visible in this simulation, but when I modify the parameters in my original .fsp files, that region does not appear and simply is displayed as such:

Additionally, when I simply copied the FDTD region into the .fsp file you modified, suddenly the mesh override region became visible.

Here are my questions:

  1. What causes this difference in displaying the mesh override region? The parameters in the mesh and FDTD are the same, so is it some global property that needs to be changed?

  2. More importantly, does the visibility of the mesh override region have any effect on the accuracy of the simulation?

Thanks in advance.


Dear @eelu

I am glad that it worked out. Simulation initially shows a few hours to run but it actually finishes in 10-15 minutes in my PC. So, it should not take too long to trigger auto shutoff.

First thing would be to check and make sure that you have clicked on view simulation mesh from the view toolbar. Please see this link for more information:

If you still had problem, please let me know and I will be glad to discuss it further.

  1. No. This is only for visualization purposes and depicts how your geometry is meshed for simulation. You can move between enabled-disabled view simulation mesh without affecting simulation itself.

I hope this answered your questions.