-
-
May 18, 2024 at 10:31 amph23resch01002Subscriber
I'm using the metalens example provided in the Ansys examples as a guide for my own project. The Unitcell I use is attached here. In the metalens example, the radius and height of the meta-atom were varied. At a specific height and different radius values, the transmission remained constant while the phase varied. In my problem, I have three parameters, w1, w2, and theta, when I fix two parameters and vary only theta, I get the phase ranging from 0 to 2*pi but the transmission coefficients varied drastically. So, I had to vary all three parameters to create a meta atom library such that the phase value ranges from 0 to 2*pi and also has constant high transmission coefficients. Now as I have a three dimensional parameter, Now I am confused how to pick the set of dimensions which will give rise to 0 to 2*pi and also the high transmission coefficients to create the meta atom Library? This is the primary question I have.Â
Second question is, to create the unitcell file, we should have radius_interp, as per the metalens example, In my case I have three parameters. How do I interpolate all the three parameters with phase and phase_interp? Their dimensions are very different. It is very important to interp the varying parameters (in my case, it is w1, w2 and theta) as it plays a huge role in finding the Ex, Ey and Ez components of the electric fied.Â
This is the code from metalens unitcell_fdtd:
# interpolate radius and fields on a denser phase data pointsphase_interp = linspace(0,2*pi,361); # limit the phase range to 0 - 2*piradius_interp = spline(radius,phase,phase_interp); # phase sampled at an interval of 1 degree.plot(phase_interp*180/pi,radius_interp*1e9,"phase (degree)","radius (nm)","","linewidth=2");holdon;Âplot(phase*180/pi,radius*1e9,"phase (degree)","radius (nm)","","plot type = point,marker type=x, color=red");legend("radius_interpolated","radius from sweep");holdoff;ÂE = getsweepresult(sname,"E");Ex = pinch(E.Ex); Hx = pinch(H.Hx);Ey = pinch(E.Ey); Hy = pinch(H.Hy);Ez = pinch(E.Ez); Hz = pinch(H.Hz);x = E.x;y = E.y;z = E.z;f = E.f;wavlength = c/f;Â# interpolate over radiusEx = interp(Ex,x,y,radius,x,y,radius_interp);Ey = interp(Ey,x,y,radius,x,y,radius_interp);Ez = interp(Ez,x,y,radius,x,y,radius_interp);Hx = interp(Hx,x,y,radius,x,y,radius_interp);Hy = interp(Hy,x,y,radius,x,y,radius_interp);Hz = interp(Hz,x,y,radius,x,y,radius_interp);Drawing parallel to this metalens example and my problem, radius_interp = spline(radius,phase,phase_interp);
(i) How do I get w1_interp, w2_interp and theta_interp for my case? For my case there are three variables that are varying simultaneously not only radius as in the case of metalens.Â
(ii) The dimensions of the phase for my case is [1,1,5,5,9] where the first dimension refers to the wavelength, second one corresponds to the polarization, and the other three dimensions corresponds to the other three parameters. So we can't use spline for my case because all the three arguments have different dimensions.Â
These are the doubts that I have related to the unitcell file. Now coming to the Beam shaping file, we will have a structure group, with which we can say which atom should go to what place and all that through scripting,Â
Â## This is the code from the scripting of Metalens:
for(i=1:2*np+1) {
  for (j=1:2*np+1) {
    r = sqrt(x_mask(i)^2+y_mask(j)^2);
    if (r <= %lens radius%) {
      phase_target1 = (2*pi/ wavelength)*(f-sqrt(x_mask(i)^2+y_mask(j)^2+f^2)); # Hyperbolic lens is assumed
      phase_target2 = l*atan2(y_mask(j),x_mask(i));
      phase_target=mod((phase_target1+phase_target2),2*pi);Â
      #addcircle({"name":"pillar", "x":x_mask(i),"y":y_mask(j),"radius":30e-9});
      addcircle({"name":"pillar", "x":x_mask(i),"y":y_mask(j),"radius":radius(find(phase,phase_target))});  Â
   }
  }
Especially at this line,addcircle({"name":"pillar", "x":x_mask(i),"y":y_mask(j),"radius":radius(find(phase,phase_target))}); Â
We will take the radius of the atom which can impart the particular phase shift to the incident light. For the metalens case, all of the radius dimension have a good transmission coefficients, whereas for my problem that is not the case, I have three parameters which should give a particular phase shifts along with the high transmission coefficients, so how do I write a code such that I can choose to not only have the phase values varying from 0 to 2*pi but also the high transmission coefficients.
I am stuck with this problem for a very long time. It would be really helpful if anyone could address the questions that I asked. Thank you very much in advance.  -
May 20, 2024 at 5:08 pmGuilin SunAnsys Employee
For your primary question, as you know, the metalens is composed of the desired unit cells at specific locations to create the desired phases. As you can see from this image
You will need to specify the unit cell at any spatial points, since it needs to create specified phase. This is the phase matching stage. To better understand this, maybe you can use the center of the square as the center of the unit cell.
for interpolation, you can use interp to interpolate the dimensions as "interp" allows you to interpolate more than one dimension. To have better accuracy, you may need more number of unit cell simulations. Or using "spline" to interpolate one dimension at a time with loops.
For the beam shaping, as you know and I mentioned above, the unit cells with specified dimensions now have specified locations with the desired phases, and you also have the fields at the specific locations. Now you need to assign such "Z" structure with specified dimension at the specific location. You may need to use "struct" dataset, or several script lines to specicy the desired properties. Although the example uses "find", you can use the exact xy locations (x_mask,y_mask) instead of phase difference of 1 degree. This will require you to take care at the interpolation stage. The final data might be large.
Please note that in your case, the structure might have strong polarization effect. So when you pick up the phase, care should be taken. The online examples do not have strong polarization effect. You may just stick to one S parameters and see if the final result matches your expectation.
Those are suggestions. Please try after you think them over.
Since I will be in a long vacation from tomorrow, and this post will not have others to take care due to the Forum mechnism, please write a new post for any further questions.
Â
Â
Â
Â
Â
In your case, the structure might have strong polarization effect. So when you pick up the phase, care should be taken.
Â
Â
Â
Â
-
- The topic ‘Doubts in following the metalens examples when many parameters are involved’ is closed to new replies.
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Errors Running Ring Modulator Example on Cluster
- INTERCONNECT – No results unless rerun simulation until it gives any
- Import material .txt file with script
- Help for qINTERCONNECT
- Trapezoidal ring
- Issues with getting result from interconnent analysis script
- Topology Optimization Error
- Edge Coupler EME Example Issue
- How to measure transmission coefficients on a given plane .
-
1241
-
543
-
523
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.