


{"id":361345,"date":"2024-04-09T14:45:16","date_gmt":"2024-04-09T14:45:16","guid":{"rendered":"\/forum\/forums\/topic\/lumerical-script-and-fdtd-simulation-ports\/"},"modified":"2024-04-09T15:13:41","modified_gmt":"2024-04-09T15:13:41","slug":"lumerical-script-and-fdtd-simulation-ports","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/lumerical-script-and-fdtd-simulation-ports\/","title":{"rendered":"Lumerical script and FDTD simulation ports"},"content":{"rendered":"<p>I am trying to simulate tilted subwavelength gratings. I have few questions regarding the simulation,<\/p>\n<ol>\n<li>How do i place the input and output ports? The posted picture is XY view. Should i rotate ports with respect to the tilt angle?<\/li>\n<li>How do i place access input and output waveguides? Should i tilt them with respect to te SWG tilt?<\/li>\n<li>\n<p>This is my code to create SWG:<\/p>\n<p>m = (wg_width-width_in)\/taper_len; #Taper slope<\/p>\n<p>b = width_in &#8211; (x0*m); #Taper width at x = 0<\/p>\n<p>&nbsp;<\/p>\n<p>num_periods = floor(taper_len\/period); #Number of SWG segments in the taper<\/p>\n<p>period = period + (mod(taper_len,period)\/num_periods); #Adjusts SWG period so there is an integer number of periods in the taper length<\/p>\n<p>segment_width = dc*period*1; #Longitudinal thickness of SWG segments<\/p>\n<p>&nbsp;<\/p>\n<p>x = x0 + (period\/2); #Starting position<\/p>\n<p>#x = -1*taper_len-0.5*period;<\/p>\n<p>&nbsp;<\/p>\n<p>addstructuregroup;<\/p>\n<p>set(&#8216;name&#8217;,&#8217;swg1&#8242;);<\/p>\n<p>set(&#8216;x&#8217;,0e-06);<\/p>\n<p>set(&#8216;y&#8217;,0e-06);<\/p>\n<p>set(&#8216;z&#8217;,0e-6);<\/p>\n<p>&nbsp;<\/p>\n<p>for(i = 1:num_periods) {<\/p>\n<p>width = m*x + b; #Calculate taper width at current position<\/p>\n<p>&nbsp;<\/p>\n<p>addrect;<\/p>\n<p>set(&#8216;name&#8217;,&#8217;seg_&#8217;+num2str(i));<\/p>\n<p>set(&#8216;material&#8217;,coremat);<\/p>\n<p>set(&#8216;x&#8217;,x); #Set x position based on current SWG segment<\/p>\n<p>set(&#8216;x span&#8217;,segment_width); #Set longitudinal thickness based on SWG period and duty cycle<\/p>\n<p>set(&#8216;y&#8217;,0e-06);<\/p>\n<p>set(&#8216;y span&#8217;,width); #Set transverse width based on taper width at this x position<\/p>\n<p>set(&#8216;z min&#8217;,-0.5*T);<\/p>\n<p>set(&#8216;z max&#8217;,0.5*T); #Assuming 220 nm SOI platform<\/p>\n<p>select(&#8216;seg_&#8217;+num2str(i));<\/p>\n<p>set(&#8216;second axis&#8217;,&#8217;z&#8217;);<\/p>\n<p>set(&#8216;rotation 2&#8217;, -tilt);<\/p>\n<p>addtogroup(&#8216;swg1&#8217;);<\/p>\n<p>&nbsp;<\/p>\n<p>x = x + period; #Increment to next SWG segment<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/04\/09-04-2024-1712675460-mceclip0.png\"><\/p>\n","protected":false},"template":"","class_list":["post-361345","topic","type-topic","status-closed","hentry","topic-tag-fdtd","topic-tag-FDTDgeometry-1","topic-tag-lumerical","topic-tag-LumericalFDTD-1","topic-tag-script"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["3441","33648"],"_bbp_author_ip":["168.143.243.14"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1299"],"_bbp_topic_status":["unanswered"],"_edit_lock":["1712675374:142852"],"_bbp_topic_id":["361345"],"_bbp_forum_id":["27833"],"_bbp_engagement":["3441","33648"],"_bbp_voice_count":["2"],"_bbp_reply_count":["7"],"_bbp_last_reply_id":["363068"],"_bbp_last_active_id":["363068"],"_bbp_last_active_time":["2024-04-18 21:51:29"]},"test":"minusunnycmail-carleton-ca"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/361345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/361345\/revisions"}],"predecessor-version":[{"id":361356,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/361345\/revisions\/361356"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=361345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}