Ansys Learning Forum › Forums › Discuss Simulation › Photonics › Doubts in following the metalens examples when many parameters are involved › Reply To: Doubts in following the metalens examples when many parameters are involved
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.
Â
Â
Â
Â