


{"id":160711,"date":"2021-07-26T17:18:04","date_gmt":"2021-07-26T17:18:04","guid":{"rendered":"\/forum\/forums\/topic\/running-repeated-fdtd-simulation-failed-using-matlab\/"},"modified":"2021-07-27T16:55:19","modified_gmt":"2021-07-27T16:55:19","slug":"running-repeated-fdtd-simulation-failed-using-matlab","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/running-repeated-fdtd-simulation-failed-using-matlab\/","title":{"rendered":"running repeated FDTD simulation failed using matlab"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Hi everyone, I have encountered unexpected issue when running repeated FDTD 2D simulation using matlab. <\/p>\n<p>I tried to run the following code from matlab (I have ignored here the loading of the .fsp file)<\/p>\n<p>The structure and simulation setup code is written inside the &quot;model&quot; object, not in a separate .lsf script file. <\/p>\n<p>ideally this should run the same simulation multiple times (5 times here). this might seem purposeless but what I am doing is trying to narrow down the cause of my optimization error and I think fundamentally this is the cause. <\/p>\n<p>Lumerical would successfully run the first simulation (some times up to the third simulation). But then it will give the following error as shown in the screenshot. <\/p>\n<p>However, if I implement this for loop (basically just switchtolayou; run;) directly in a .lsf file, it seems no error would pop up and Lumerical would finish all five simulations. Due to the use of optimization, I have to interface with matlab. <\/p>\n<div class=\"embedExternal embedImage\">\n<div class=\"embedExternal-content\">\n<a class=\"embedImage-link\" href=\"\/forum\/wp-content\/uploads\/forum-uploads\/058\/QQQWNSNOA4KL.png\" rel=\"nofollow noopener\" target=\"_blank\"><br \/>\n<img decoding=\"async\" class=\"embedImage-img\" src=\"\/forum\/wp-content\/uploads\/forum-uploads\/058\/QQQWNSNOA4KL.png\" alt=\"Screen Shot 2021-07-26 at 1.02.46 PM.png\" \/><br \/>\n<\/a><\/p>\n","protected":false},"template":"","class_list":["post-160711","topic","type-topic","status-closed","hentry","topic-tag-fdtd","topic-tag-matlab","topic-tag-optimization"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":[""],"_bbp_old_reply_author_name_id":["Anonymous"],"_bbp_old_is_reply_anonymous_id":["false"],"_btv_view_count":["481"],"_bbp_likes_count":["0"],"_bbp_subscription":["238865"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["160711"],"_bbp_forum_id":["27833"],"_bbp_engagement":["2592","199697"],"_bbp_voice_count":["2"],"_bbp_reply_count":["1"],"_bbp_last_reply_id":["186771"],"_bbp_last_active_id":["186771"],"_bbp_last_active_time":["2021-07-27 16:55:19"]},"test":"xiaochenxincmailc-carleton-ca"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/160711","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":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/160711\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=160711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}