Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Photonics

Photonics

Topics related to Lumerical and more.

Save Script Workscape Data As a D-card

    • bartu.yaman
      Subscriber

      Hello,

       

      I already followed the tutorial on importing user defined modes and correctly implemented my mode in Lumerical, EME is working fine with it but since I am working on an edge coupler, I want to use the overlap function in FDE but I am unable to save my custom mode field as a d-card even though it is in the rectilinear dataset format as Lumerical would expect. How can I save an electric field data as a d-card?

    • Guilin Sun
      Ansys Employee

      For FDE, you can specify which mode you want to save by use copydcard: https://optics.ansys.com/hc/en-us/articles/360034930233-copydcard-Script-command

      you may also use savedcard: https://optics.ansys.com/hc/en-us/articles/360034411154-savedcard-Script-command

      Usually I like to do the overlap calculation with script following the formlua, by getting the field components. Please try. you can use getresult, getdata to access the fields.

       

    • bartu.yaman
      Subscriber

      Hello, 

       

      Thank you for the response. The commands you referred to already expects me to have the modes as d-cards if I am not mistaken. My problem is that I have the field data in my script workspace but I can't convert them into d-cards since these fields were not calculated by Lumerical. Is there any way I can save field data that was improted to Lumerical (and not calculated by Lumerical) as d-cards so that I can use them for overlap analysis?

       

      If not, could you send me the overlap calculation script that uses fields instead of d-cards as you mentioned in your message?

    • Guilin Sun
      Ansys Employee

      d-card can only be from monitors or solvers if you want to copy. However you can also save the workspace data 

      https://optics.ansys.com/hc/en-us/articles/360034411154-savedcard-Script-command

      I am not sure if your imported data has the same structure as the built-in data. But you can try. If it does not work, please use script to do the overlap, with known overlap formula:

      https://optics.ansys.com/hc/en-us/articles/360034405254-overlap-Script-command

       

    • bartu.yaman
      Subscriber

      I only have electric field calculated somewhere else, from which I calculate the magnetic field and then turn it into a Rectilinear Dataset so that I can use it inside Lumerical. So what I have, as Lumerical sees it, is "E, H vs x, y, z".

       

      What exactly is the structure of the built-in data? How exactly is a d-card defined? 

       

      I confirmed that I can use a single cell EME simulation instead of the FDE overlap by trial and error but still my life will be much easier if I can save my custom electric field data as a d-card somehow to do overlaps with FDE. 

       

      When I try to run the "savedcard" command, I get this error "all the arguments must be strings" and I can solve this if I know how the d-card is defined.

    • Guilin Sun
      Ansys Employee

      "What exactly is the structure of the built-in data? How exactly is a d-card defined? " they are internal, we do not know. For monitors, it should have all the data the monitor records. WHen it is in d-card, it is similar to the monitor its self, except that you cannot directly visualize it.

      I understand that using the built-in functionalities it is more direct ,easier. However, d-card cannot be built from raw data. This is unfortunate. 

      Maybe you can file a feature request for this. It may take some efforts to allow such manipulation.

      "When I try to run the "savedcard" command, I get this error "all the arguments must be strings" and I can solve this if I know how the d-card is defined."

      Not sure what causes this and how did you use it. savedcard saves all the data in the workspace.

      https://optics.ansys.com/hc/en-us/articles/360034411154-savedcard-Script-command 

       

Viewing 5 reply threads
  • The topic ‘Save Script Workscape Data As a D-card’ is closed to new replies.
[bingo_chatbox]