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.

Plotting the intensity as a surface plot from a ray tracing computation

Please login with a confirmed email address before reporting spam

Hi, I am new to Comsol Multiphysics and just started to use its ray tracing capabilities. I am sucessfull in propagating some rays over a specified distance which is all I do at the moment. For this purpose I have a working plane with a rectangle as my only element in the geometry. I have defined a surface under the data sets tab in results and now I want to plot the intensity distribution at the working plane as a contour plot. However, when I add a 2d plotting group with a surface plot and try to chose gop.I as the variable to plot, I get an error message:

Cannot evaluate expression. Undefined variable. - Variable: comp1.gop.I - Geometry: geom1 - Boundary: 1 Failed to evaluate expression. - Expression: comp1.gop.I - Plot: surf1 (Surface)

So what am I doing wrong and how can I achieve what I like, which is to plot the intensity of my rays at a specified plane as a contour plot? I attached a .mph file of my attempt.



3 Replies Last Post 21.03.2018, 23:09 GMT-4
Sergei Yushanov Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 09.02.2018, 09:31 GMT-5

Phillip,

Since your geometry is 3D, you should use 3D Plot Grpoup/Surface, as shown in the attached image.

Regards,

Sergei

Phillip, Since your geometry is 3D, you should use 3D Plot Grpoup/Surface, as shown in the attached image. Regards, Sergei


Please login with a confirmed email address before reporting spam

Posted: 7 years ago 26.02.2018, 16:10 GMT-5

I am also new to COMSOL and am having similar issues. I am trying to get a contour plot that shows the spatial density of rays incident upon a plane (surface #6 in the attached model). Here are a few of the details for the model:

I placed a ray detector on surface #6.

I placed a freeze condition on surface #6.

I set 100 rays to release from surface #1.

I created a surface under Results>>Data Sets. This surface references surface #6.

I created a 3D plot group and referenced Study1, which is the Geometrical Optics Study.

I created a contour plot under the 3D plot group that references the surface I created under data sets.

For the contour plot expression, I chose gop.rd1.Nsel. This is the total # of rays in the ray detector expression.

When I try to plot this, nothing appears.

Thanks in advance for the help.

I am also new to COMSOL and am having similar issues. I am trying to get a contour plot that shows the spatial density of rays incident upon a plane (surface #6 in the attached model). Here are a few of the details for the model: I placed a ray detector on surface #6. I placed a freeze condition on surface #6. I set 100 rays to release from surface #1. I created a surface under Results>>Data Sets. This surface references surface #6. I created a 3D plot group and referenced Study1, which is the Geometrical Optics Study. I created a contour plot under the 3D plot group that references the surface I created under data sets. For the contour plot expression, I chose gop.rd1.Nsel. This is the total # of rays in the ray detector expression. When I try to plot this, nothing appears. Thanks in advance for the help.


Please login with a confirmed email address before reporting spam

Posted: 7 years ago 21.03.2018, 23:09 GMT-4
Updated: 7 years ago 21.03.2018, 23:10 GMT-4

Thank you for your information

Actually, i am a beginner of comsol and i want to check the ray intensity after ray passing specific the wall.

Your attachment is upper version than mine so, i cannot refer it

I made 3D model to estimate the ray intensity however whenever i tried to integral all of ray's intensity (using integral), the erroe occured...

could you help me?

Thanks

Thank you for your information Actually, i am a beginner of comsol and i want to check the ray intensity after ray passing specific the wall. Your attachment is upper version than mine so, i cannot refer it I made 3D model to estimate the ray intensity however whenever i tried to integral all of ray's intensity (using integral), the erroe occured... could you help me? Thanks

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.