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.

Question about "release from data file"

Please login with a confirmed email address before reporting spam

I'm trying to introducing some data to COMSOL in ray tracing module, and when I introduce my txt file into it and compute, I can see no light trace like before. I set the Index of first column containing position data as 0 and the Index of first column containing direction data as 3 and my input form is like:
Px Py Pz Kx Ky Kz
I cant figure out where I have made a mistake, because there is no alert or error report.
anyone know the right form of inputting data? Thanks

5 Replies Last Post 12.02.2016, 17:41 GMT-5
COMSOL Moderator

Hello Xinlin Feng

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.


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 29.07.2015, 11:44 GMT-4
I have the same question.

Is there any tutorial or example of this section for the particle tracing?

I have the same question. Is there any tutorial or example of this section for the particle tracing?

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 26.08.2015, 17:49 GMT-4
I also have this problem.

How can COMSOL offer a "release from file" option without telling us how this file should be formatted? The manual only instructs us to specify which column contains the first position coordinate. How about the first direction coordinate? How about delimiters- tab or space or comma? Is this a text file or spreadsheet?

The manual also says that values of auxiliary variables can also be specified. How?
I also have this problem. How can COMSOL offer a "release from file" option without telling us how this file should be formatted? The manual only instructs us to specify which column contains the first position coordinate. How about the first direction coordinate? How about delimiters- tab or space or comma? Is this a text file or spreadsheet? The manual also says that values of auxiliary variables can also be specified. How?

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 26.08.2015, 19:33 GMT-4
Well I've answered some of my question myself. I still don't know about auxiliary definitions, but this has worked:

% Comments can go after "%" symbols
% Data follows with qx,qy,qz each row. Tab works, as well as spaces or commas.
0 0 0
0 0 1
0 0 2
0 0 3
0 1 0

Beware- at least in my model the units in the file are assumed to be meters even though my geometry unit is millimeters. If you aren't seeing any rays maybe its because they're outside the physical domain on which you've defined your geometric ray optics physics.
Well I've answered some of my question myself. I still don't know about auxiliary definitions, but this has worked: % Comments can go after "%" symbols % Data follows with qx,qy,qz each row. Tab works, as well as spaces or commas. 0 0 0 0 0 1 0 0 2 0 0 3 0 1 0 Beware- at least in my model the units in the file are assumed to be meters even though my geometry unit is millimeters. If you aren't seeing any rays maybe its because they're outside the physical domain on which you've defined your geometric ray optics physics.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 07.02.2016, 07:23 GMT-5

Well I've answered some of my question myself. I still don't know about auxiliary definitions, but this has worked:

% Comments can go after "%" symbols
% Data follows with qx,qy,qz each row. Tab works, as well as spaces or commas.
0 0 0
0 0 1
0 0 2
0 0 3
0 1 0

Beware- at least in my model the units in the file are assumed to be meters even though my geometry unit is millimeters. If you aren't seeing any rays maybe its because they're outside the physical domain on which you've defined your geometric ray optics physics.

I confirm that even if your model set in millimeters, when reading from the file your coordinates, COMSOL assumes them as set in meters. Pay attention to the unit system chosen in COMSOL!
[QUOTE] Well I've answered some of my question myself. I still don't know about auxiliary definitions, but this has worked: % Comments can go after "%" symbols % Data follows with qx,qy,qz each row. Tab works, as well as spaces or commas. 0 0 0 0 0 1 0 0 2 0 0 3 0 1 0 Beware- at least in my model the units in the file are assumed to be meters even though my geometry unit is millimeters. If you aren't seeing any rays maybe its because they're outside the physical domain on which you've defined your geometric ray optics physics. [/QUOTE] I confirm that even if your model set in millimeters, when reading from the file your coordinates, COMSOL assumes them as set in meters. Pay attention to the unit system chosen in COMSOL!

Christopher Boucher COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 12.02.2016, 17:41 GMT-5
Hi David, Alexey:

Currently the Release from Data File feature interprets the particle positions using the model base unit, which is defined by selecting an option from the "Unit System" list in the settings window for the root node.

I agree that this behavior is very confusing, especially considering that the Release from Grid node does use the Geometry unit instead of the model base unit -- the exact opposite behavior as the Release from Data File. We hope to make the treatment of length units more consistent among all particle release features in the next version. We will also take steps to make the documentation of the Release from Data File feature more comprehensive.

Best Regards,
Christopher Boucher
Hi David, Alexey: Currently the Release from Data File feature interprets the particle positions using the model base unit, which is defined by selecting an option from the "Unit System" list in the settings window for the root node. I agree that this behavior is very confusing, especially considering that the Release from Grid node does use the Geometry unit instead of the model base unit -- the exact opposite behavior as the Release from Data File. We hope to make the treatment of length units more consistent among all particle release features in the next version. We will also take steps to make the documentation of the Release from Data File feature more comprehensive. Best Regards, Christopher Boucher

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.