Home Forums FDTD Parameter Sweep with Scripted Layout

Viewing 4 reply threads
  • Author
    Posts
    • #79926

      Hello,

      I am currently exploring using OptiFDTD on the 64bit evaluation license. I have gone through some of the tutorials and have developed a decent, though far from complete, understanding of the functionalities. I have put together a 2D simulation for an Oband grating coupler which where i want to perform a parameter sweep in combination with the scripted layout in the “scripting” tab to capture the transmission spectra on the observation line as a function of a given parameter ( say the period in this case ).

      When i change the parameter using the “edit parameter” tab and then click “test script” to rebuild the geometry before actually preforming an individual ( not a sweep ) 2D simulation, it works fine. However, when i try to utilize the parameter sweep function, to sweep the period parameter, and make sure “collect power results” is checked, the simulation does not work correctly. It seems to run a sweep ( simulating the desired number of iterations ). However afterwards when i open the final iteration in the analyzer and use the “Power Sweep Viewer” to view the results of the sweep, every simulation despite having listed different parameters, has the same results? Why is this? It seems as though it is not rebuilding the layout between each change of parameters, as if I manually edit the parameters and simulate each case individually it works. Of course such manual sweeping of parameters is completely un-feasible.

      What is the correct way to do this?

      Thank you very much for your help!

      Dr Alex Friedman

    • #81019
      Scott Newman
      Moderator

      Hello Alex,

      It sounds like a conflict between the parameter sweep and scripting. Please let me take a look at the design. One solution would be to do all of it within the script.

      Scott

    • #83623
      Scott Newman
      Moderator

      Hello Alex,

      It sounds like a conflict between the parameter sweep and scripting. Please let me take a look at the design. One solution would be to do all of it within the script.

      Scott

    • #81035
      Scott Newman
      Moderator

      The problem is that you cannot tell the product to use a sweep on a structure that is build with a script. Instead you need to use a script. If you copy and paste your script to notepad and then take your design and check “Generate User Script” in the Parameter Sweep window it will generate a script that will iterate through your parameter sweep and generate the output files (they are .psr files just open them in notepad or similar product). To include your build script you add a function to the generated script for building and you make a call to the script in the for loop. Then run the simulation using the script.

      I have an example of this using your design file attached.

      Scott

    • #83639
      Scott Newman
      Moderator

      The problem is that you cannot tell the product to use a sweep on a structure that is build with a script. Instead you need to use a script. If you copy and paste your script to notepad and then take your design and check “Generate User Script” in the Parameter Sweep window it will generate a script that will iterate through your parameter sweep and generate the output files (they are .psr files just open them in notepad or similar product). To include your build script you add a function to the generated script for building and you make a call to the script in the for loop. Then run the simulation using the script.

      I have an example of this using your design file attached.

      Scott

Viewing 4 reply threads
  • You must be logged in to reply to this topic.