Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Iterate over ray dataset/Access ray by index

Please login with a confirmed email address before reporting spam

I am trying to analyze the results of my ray-tracing simulation in Comsol itself (i.e. not relying on "Export" nodes). As part of my analysis, I need a table where each row corresponds to a ray, and with several columns for several properties of each ray. For example, lets say I want a list of rays were for each ray, I have the x-position and optical path length in the table.

It seems to me that this should be straightforward, but I have been unable to find a solution. Here is where I have failed so far:

  • The "Ray evaluation" node doesn't allow for mulitple values to be computed.
  • The "Global evaluation sweep" node can't access the individual rays (I couldn't figure out how to use the with/withsol/... operators at least)
  • The "Evaluation group" node doesn't behave as expected when "Transpose" is activated - instead of yielding a table with two columns, I get a table with one column, where the individual results are concatenated
  • The "Export" node doesn't allow me to use the data within Comsol itself

Is there any way to create such a table?


0 Replies Last Post 09.03.2020, 11:06 GMT-4
COMSOL Moderator

Hello Lukas Lang

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.