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.

Exporting Charge data through scripting not working

    • noumanzia
      Subscriber

      Hello,

      I am trying to export charge data using the concepts I learnt from FDTD and Mode

      jn= getdata("CHARGE", "charge", "Jn"); Jn_pinch= pinch(jn, value1, value2);

      However, there are few issues:

      1) Jn data I obtained is quite different from what I visualize in charge directly.

      2) It's also a 1D matrix instead of 2D.

      There is also no Matlab export option that I can use here. Can someone comment on how can I export charge Jn /Jp data as 2D matrix correctly?

    • kghaffari
      Ansys Employee
      Hi,
      Thanks for reaching out. I think the issue here is that youÔÇÖre exporting only the charge density results and not including the spatial information. To create a dataset similar to what is visualized in the solver object, you would need to create an unstructured dataset that includes at least, x,y,z (or two of them if simulation is 2D), the connectivity matrix, and the results (here charge density).
      This article provides a good example on how to create such a dataset. All the needed data for your matrix (e.g. x,y, z) can be extracted from the solver using the getresult command.
      Best regards
Viewing 1 reply thread
  • The topic ‘Exporting Charge data through scripting not working’ is closed to new replies.
[bingo_chatbox]