Photonics

Photonics

Topics related to Lumerical and more.

running repeated FDTD simulation failed using matlab

    • xxc960216
      Subscriber

      Hi everyone, I have encountered unexpected issue when running repeated FDTD 2D simulation using matlab.

      I tried to run the following code from matlab (I have ignored here the loading of the .fsp file)

      The structure and simulation setup code is written inside the "model" object, not in a separate .lsf script file.

      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.

      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.

      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.

    • Guilin Sun
      Ansys Employee
      It is Matlab/System issue to load FDTD files. Lumerical software is designed and well tested for its own script. However, for 3rd party tools, we may not do thoroughfully test to fully utilize their functionalities. I would suggest that you do not use matlab function. Instead, run FDTD in the main code and see if it can successfully work as expected.
      In addition, matlab R2021a is not officially tested for integration purpose at Lumerical. Please visit this page https://support.lumerical.com/hc/en-us/articles/360026142074-MATLAB-script-integration-configuration-guide


Viewing 1 reply thread
  • The topic ‘running repeated FDTD simulation failed using matlab’ is closed to new replies.