# Metalens example

#1

Dear Sir/Mrs,

Concerning the metalens example, I can see that the referenced paper describes a Titania metasurface based on geometric phase which is not the case in the FDTD file using PMMA with different duty cycle ?
I am not sure how can I check the results of the metalens and the S parameter analysis group if the results are not reproduced from the referenced paper?

Concerning the S parameter advanced group , analysis script commands. I have many questions.

1- In this part: Line 245: analysis group S parameters

# Select largest input field component (s or p) for S-parameter extraction
tempG = abs(G_input)^2;  #absolute value squared of three field components


Question: is that for all frequencies ?

pol_to_select = find( tempG, max( tempG) );
Questions : why  do we need Maximum input field (Er,Etheta,Ephi) in far field?


2- Line 262: analysis group S parameters

# Save dominant polarization component of all grating projections
G_input  = pinch( G_input (pol_to_select) )/norm_input;


why do we take the maximum value and normalize it to all spherical field components?

G_forward  = pinch( G_forward (pol_to_select) );
G_backward = pinch( G_backward(pol_to_select) );


I understand that we have field components (Er,Etheta,Ephi) for zero grating order at all frequencies , what is the maximum value we are pinching at?

3- line 271: if(dim == 2) { phase_correction = exp(1i*pi/4); } #2D and 3D are different
how can you get this phase correction factor?

4- line 295 and line 303: Question: what is the difference between normalization in these two lines
S21_Gn(i) = G_forward phase_correctionexp(-1i*phase_T_to_forward)/input; #S21 from source to monitor T

S11_Gn(i) = S11_Gn(i) * sqrt(R(i));

5- The phase corrections are done twice : first part line 273:
I can not understand what you are trying to do here.
in line 331 (# ROLL PHASE FROM MONITOR/SOURCE TO METAMATERIAL SURFACE):
That is clear.

6- line 304: S21_Gn(i) = S21_Gn(i) * sqrt(T(i)) * (sqrt(refractive_index_1/refractive_index_2));

Question: can you a give a reference for this refractive index correction?

7- for the script file names " [metalens_2D_duty_cycle_sweep.lsf]"(https://kb.lumerical.com/en/metalens_2D_duty_cycle_sweep.lsf)

when you extracted the (abs S21), I found this script command
T0(i) = abs(S.S21_Gn)^2*refractive_index_2/refractive_index_1;
Questions: you have made the correction twice for the S21, one in the S_parameters advanced analysis group and the other in extraction the amplitude .
I am not sure if that is correct?

it is a lot of questions but the illustrations provided are not sufficient

#2

I need to discuss your case with my colleague and will get back to you next week.

#3

Thank you waiting for your replies.

#4

The example is indeed different, however the analysis groups are checked with stackrt script command that uses analytical solution. You can also modify the geometry and try to replicate the results of the paper of interest.

1. The commands are inside a for loop starting at line 141. The calculations are done for each frequency separately.

The find command calculates the maximum field component to calculate the results for s or p polarization in the S results. Currently we assume that there is no cross polarization term i.e. there is no polarization rotation, but we need to modify the script to reflect this by limiting the user to have only s or p polarized light. For the moment, please limit the source to cases where light is only s or p polarized and take the S_polarization results instead of S.

2. We are interested in only zero grating order results. The normalization is done to normalize zero order projection and avoid very rare cases that there might be some artefacts with non-zero higher order projection orders.

3. I will get back to you about inquiry.

4. For the S parameters, results should be normalized to input filed (first normalization):
https://kb.lumerical.com/en/index.html?metamaterials_s_parameters.html
Also, since we are working with the farfield results where the sum of field intensity is 1, results should be normalized to square root of transmitted power to compensated for any loss or scattering due to metalens.

5. The farfield projection calculated the projection for a 1m distance from the origin of simulation i.e. (0,0,0). The first correction is done to calculate the phase from the origin to monitor location.

PMMA is considered to be the object where we want to obtain the s-parameter for. Since the source and monitor are not exactly at the surface of PMMA and are spaced, we need to account for phase change from source/monitor to PMMA surface.

6. The transmitted power depends on the material index ($\epsilon E^2$), however s-parameters are simply the ratio of electric fields and do not depend on the material index. For s-parameter calculations we need to multiply the results by the inverse index ratios to calculate the correct s-paramters.

7. Here we are trying to calculate transmission from s-parameters. Thus we need to multiply the s-results to material index to calculate the transmission. This is opposite of what we did in step 6 to move from s-paramter to power.

Please let me know if you have any further questions. Please limit your post to one question at a time so that we can address them completely.

Thanks

#5