# How to calculate 'field factor'? Need help with data normalization of focused beam

#1

Hi, I am trying to run a simulation where I am sending a focused beam onto my device and I want to calculate at a certain point what we call the ‘field factor’, or how much the power is enhanced or reduced due to interference from the reflected wave. So It should be 1 with no reflected wave, or 0 to 4 for a fully reflected coherent wave.

Here is the project file for my simulation:

pnf simulation.fsp (247.7 KB)

And here is a screenshot:

The device consists of two electrodes on both sides of a trench dug into SiO2. At the bottom of the trench there are two thin pieces of Pt metal. I am interested in the field factor between the two electrodes, where there is a suspended carbon nanotube. I am focusing a beam onto the plane of the carbon nanotube.

I have the simluation set up and working but I’m having a hard time understanding the units of the monitors. I am currently using a frequency domain field and power monitor(lebeled Power NT) where I am interested, and have CW normalization on. When I look at the E field between the electrodes as a function of wavelength I get a plot that looks like what I want:

However, when I run the same simulation, but remove all of the strucutres, I think I should get roughly 1 independent of lambda, but I don’t:

However when I make it a plane wave I do get roughly 1 like I would expect.

How can I normalize the data correctly for the focused beam? Also am I correct in what I think I’m calculating with this monitor: the electric field amplitude of both the incoming beam and reflected beam coherently added?

Thanks for any help.

#2

As you correctly identified, this behaviour is related to the normalization. The fields that you display on your plot are normalized to the maximum value at the source injection plane. This can be shown by going to the beam source properties -> “Beam options” and using the “Visualize beam data” button:

Here you can see the maximum amplitude with normalized value 1:

This works well when the beam focus is aligned with the injection plane since the maximum value at the injection plane is also the maximum value in the focus.

In your simulation, you used non zero distance from focus and therefore, the maximum value in the focus is larger that the maximum value at the injection plane to which the values are normalized. Therefore, you see values larger than one around the focus. You can also notice that the values at the injection plane are roughly one:

This is also why you get the expected value of 1 with the plane wave source as it is uniformly distributed.

Yes, your assumption is correct. You can notice that the monitor records complex fields in all (x/y/z) directions.
If this normalization does not work for you, you can measure the fields in frequency domain at a specific location in an empty simulation region and then re-normalize the data to these values. This way you can obtain the reference value of 1 at your desired location/plane and for given frequency band.

Note 1: Unless you enable the multifrequency beam calculation, the beam profile is correctly calculated only for the center frequency and the focus distance will vary with the wavelength.

Note 2: You can notice that the beam is clipped by the simulation region when you visualize the beam data. This will likely lead to the edge effect as described in this post.

#3

Hi mbenes, Thanks for the helpful reply.

So If I understand correctly one way to acheive what I want with a focused beam is to have gaussian beam injected at the focus and have the center at my location of interest, such that the intensity is 1 there. I was discouraged from doing this originally because the beam is not simulated behind the injection plane.

I was concerned that this wouldn’t give meaningful results as I understand FDTD results are generated with spatial(and time) derivatives. but as you suggested injecting the gaussian beam at my location of interest could work, is the discontinuity in the fields not actually an issue? Furthermore, if I inject at the focus is there still a need for multifrequency beam calculation? I think from what you’re saying the light past the focus and therefore the reflected light would only be accurate at the center frequency.

If this normalization does not work for you, you can measure the fields in frequency domain at a specific location in an empty simulation region and then re-normalize the data to these values. This way you can obtain the reference value of 1 at your desired location/plane and for given frequency band.

This sounds like an elegant solution I want a map of the field factor. I don’t know much about manipulating the data that is generated from different simulations like this. Got a good starter article?

#4

Hi, I am glad it helped.

Purely from the simulation accuracy point of view, it should not be a big problem to place the source plane close to the material as long as you leave at least one or two mesh cells in between the source and the structure in order to keep the grey source area in a homogeneous material/background. You would definitely want to avoid a situation when portion of the source would be in the Pt electrode and portion would be in the air.

On the other hand, since you ultimately want to calculate the field enhancement factor that is spatially and frequency dependent, you need to get some reference to use in the denominator. If you simply place the source in the focal plane, there still will be default spatial variance of the Gaussian beam profile as the fields will be normalized to the maximum value in the centre. Therefore, I think that you will need to run one simulation without any structure, record the fields using the “Power NT” monitor and then run one more simulation with the structure. This should allow you to calculate the field enhancement factor for your structure.

While the principle is fairly simple, you will have to use some scripting in order to get the data to your workspace and then do the calculation. When you run the simulation, you can see the simulation results are available in the “Result View” window:

To get the data to the script wokspace, use getresult(); command. For example, if you want to have E fields as function of x,y,z coordinates and lambda/f, simply use this:
MyFields=getresult("Power NT","E");

to get lambda values from this dataset, you can use:
wavelength=MyFields.lambda;

You can save your data from workspace into a matlab file using matlabsave command and load them with matlabload. This should allow you to collect, save and load data from multiple simulations without worrying about loosing the data.

If you are new to Lumerical scripting, I would recommend the scripting section on Knowledge Base that contains tutorials and use examples for all commands.

Other than that it should require only basic manipulation of matrices. Moreover, if you are more familiar with Matlab, you can simply open the mat file in Matab and do the analysis there(you could also use the Matlab integration).