


{"id":343966,"date":"2024-01-10T10:08:12","date_gmt":"2024-01-10T10:08:12","guid":{"rendered":"\/forum\/forums\/reply\/343966\/"},"modified":"2024-01-10T10:08:12","modified_gmt":"2024-01-10T10:08:12","slug":"343966","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/343966\/","title":{"rendered":"Reply To: How to find out Phase shift of transmitted wave varying radius vs wavelength"},"content":{"rendered":"<p>&lt;p&gt;Dear Nayem,&lt;\/p&gt;&lt;p&gt;Since you are using RCWA, you don&#8217;t need to add the wavelength to the sweep. It is better to have only the radius to the sweep and the wavelength can be set directly in RCWA settings as shown below:&lt;\/p&gt;&lt;p&gt;<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/10-01-2024-1704879769-mceclip0.png\" width=\"292\" height=\"288\" \/>&lt;\/p&gt;&lt;p&gt;Then you add only the radius to the sweep:&lt;\/p&gt;&lt;p&gt;<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/10-01-2024-1704879909-mceclip1.png\" width=\"292\" height=\"290\" \/>&lt;\/p&gt;&lt;p&gt;Make sure to have enough frequency and radius points in order to be able to resolve the phase shift.&lt;\/p&gt;&lt;p&gt;After running the sweep, you can directly get the phase plot by right-clicking on the radius sweep and visualize the grating_characterization result. In the visualization window, choose the result that you need (e.g. Tpp is shown below) and use &#8220;Angle&#8221; in the scalar operation option. In the parameters, choose to plot lambda as x axis and radius as y axis. For n and m choose the value that you are interested in (0 for 0th diffraction order is shown below):&lt;\/p&gt;&lt;p&gt;<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/10-01-2024-1704881139-mceclip4.png\" width=\"431\" height=\"366\" \/>&lt;\/p&gt;&lt;p&gt;Alternatively, you can use the following script to get the phase plot (this takes into account p polarization (Tpp) but you can do the same for s polarization too):&lt;\/p&gt;&lt;p&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;grating_characterization = getsweepresult(&#8220;radius&#8221;,&#8221;grating_characterization&#8221;);&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;total_energy = getsweepresult(&#8220;radius&#8221;,&#8221;total_energy&#8221;);&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;radius = grating_characterization.radius;&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;lambda= grating_characterization.lambda;&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;ni = find(grating_characterization.n, 0);&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;mi = find(grating_characterization.m, 0);&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;S = pinch(grating_characterization.Tpp(:,1,ni,mi,:));&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;T = abs(S)^2;&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;phase = angle(S);&lt;\/span&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;image(lambda*1e9,2*radius*1e9,phase,&#8221;Wavelength (nm)&#8221;,&#8221;Diameter (nm)&#8221;,&#8221;Phase&#8221;);&lt;br&gt;&lt;br&gt;&lt;span style=&#8221;font-size: 14pt;&#8221;&gt;The above script will give you the plot shown below:&lt;\/span&gt;&lt;br&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;&lt;span style=&#8221;font-size: 14pt;&#8221;&gt;<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/10-01-2024-1704880145-mceclip2.png\" width=\"275\" height=\"210\" \/>&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;&lt;span style=&#8221;font-size: 14pt;&#8221;&gt;I hope this helps.&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;&lt;span style=&#8221;font-size: 14pt;&#8221;&gt;Best Regards,&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p&gt;&lt;span style=&#8221;font-size: 10pt;&#8221;&gt;&lt;span style=&#8221;font-size: 14pt;&#8221;&gt;Afroditi&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-343966","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/343966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/343966\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=343966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}