-
-
February 11, 2023 at 10:19 pm
Pankaj Kumar Sahoo
SubscriberHi,
I am following the metalens example to find the reflectivity and phase of nanopillars. I want to find the set of all periods and dutycycles that gives rise to reflections more than 90%. I am unable to write the command how to find the values ofperiod and dutycycle that give more than 90% and the corresponding phase values.
-
February 11, 2023 at 10:23 pm
Pankaj Kumar Sahoo
SubscriberI am using the following script to plot Reflectivity and Phase extracted from period and fillfactor sweep.
sname = "period";
period = getsweepdata(sname,"period");
fillfactor = getsweepdata(sname,"fillfactor");
S = getsweepresult(sname,"S");
T = getsweepresult(sname,"T");
R = getsweepresult(sname,"R");
nd = length(fillfactor);# Phase in terms of period and fillfactor [S22_Gn for Reflection and S12_Gn for Transmission]
phase = pinch(angle(S.S22_Gn),1,1); # the dimension of S22_Gn is [frequency,radius,height],
image(period*1e9,fillfactor,phase,"Period (nm)","Fill factor","Phase");
setplot("colorbar min",-pi); setplot("colorbar max",pi);# Reflection in terms of period and fill factor
R0 = pinch(R.R_Gn,1,1); # the dimension of R_Gn is [frequency,radius,height]
image(period*1e9,fillfactor,R0,"Period (nm)","fillfactor","Reflection");
setplot("colorbar min",0); setplot("colorbar max",1);------------------------------------------------------------------------------
After this I am unable to write script on how to map the phase and reflection to get the period and fillfaactors for which reflection is more than 90%.
Please hel me.
-
February 13, 2023 at 7:44 pm
Amrita Pati
Ansys EmployeeHi Pankaj,
You can use the find script command to obtain the indices of all elements in R0 that have values greater than 0.9.
ind = find(R0>0.9);
However, this will return single index values of the desired elements. You would have to convert these single index values into multiple index (i,j) values, which is quite straightforward for a 2D matrix.
More information on this conversion can be found on the following link:
https://optics.ansys.com/hc/en-us/articles/360034405874-find-Script-command
Once you have the (i,j) values, you can determine the required period and fill factor as period(i) and fillfactor(j) or vice versa depending upon the way you have defined the parameter sweep.
Thank you.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Diverging Simulations
- Ansys Insight: Transmission results greater than one
- Ansys Insight: About override mesh in FDTD: its use and settings
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Convergence issues in CHARGE
-
3666
-
2534
-
1749
-
1226
-
580
© 2023 Copyright ANSYS, Inc. All rights reserved.