Home Forums FDTD Power Function

Viewing 6 reply threads
  • Author
    Posts
    • #40840
      Daniel Davies
      Participant

      Hi
      I am trying to use the function
      observation_area.CalculatePowerRatioCWTotal()
      to output the power from a 3D simulation to a text file and it is only returning the value -2 each time.
      Is there a certain setup that is necessary to get this function to work?

      Thanks,
      Daniel

    • #40927
      Damian Marek
      Participant

      Is your observation area set to record the data for the Poynting vector? If you open up the properties box and the tab Data Components, make sure they are all checked. If that does not work attach your project file here.

    • #40946
      Daniel Davies
      Participant

      I have the observation areas collecting all possible components. Here is a file with the script I am trying to use.

    • #40972
      Damian Marek
      Participant

      Daniel,

      I’m sorry about the late reply. I thought I had sent one, but I don’t see it here!! I tried your file and I had to change two lines where you had “ios.Close” outside the scope of an if statement. Try this attached file.

      Regards

    • #41058
      Daniel Davies
      Participant

      Hi Damian,

      Thank you for your help!

      I was playing around with Optiwave, and it appears that the code works on the full version of the program but not the free 32-bit program. Is there a reason for this, or should it work the same on both?

      Thanks,
      Daniel

    • #41387
      Paulo Lourenco
      Participant

      Hi guys.

      I have a similar problem. Can’t get past “Analyzing the data file” even when using the already corrected above mentioned script. Attached you can find a print screen of the message window and I am also attaching the .fdt file.
      Thank you for any help/comment.

    • #41393
      Paulo Lourenco
      Participant

      Hi again.

      Just to say that I have, at least, one misdefined variable on the script. Inside the for next loop, in the first line, there should be “ParamMgr.SetParam “width”, width” instead of “ParamMgr.SetParam “wavelength”, width”. I found this one but there might be more and I apologise for that, it is my lack of experience…

      Best regards.

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