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 Geometrical Optics

Please login with a confirmed email address before reporting spam

Hi all,

I'm new to COMSOL MultyPhysics, and I'm writing this email to ask you some questions about my Geometrical Optics simulation.

Please refer to the mph file I've attached.


  1. When I try to use help function, the error below shows up.

*Failed to establish a connection to the documentation server:

"connect timed out"

Try the online help preference setting*

How can I solve this?


  1. Before I start, I'm avoiding using "2D Axisymmetry" geometry since the real simulation I'm trying to run is not axisymmetric. To give you a brief concept of my simple simulation, the light with a uniform density parallel to the +z-axis from the larger surface of the cone passes through the material with a certain attenuation coefficient (or imaginary refractive index) and the intensity is detected at the lower surface of the flat cylinder. I'm trying to get a "light intensity map" from "3D Plot Group 2".

To accomplish this purpose, I'm using an accumulator with these settings Accumulator Type: Density Accumulation over: Rays in boundary elements Accumulated variable name: rpb Source: gop.Q [W] Units: Custom unit [W/m^2] Smoothing radius : 0.02 [m]

However, the tutorial I found ( https://www.comsol.com/video/intro-to-modeling-ray-tracing-with-comsol-multiphysics-nov-22-2018 ) use the following settings

Accumulator Type: Density Accumulation over: Rays in boundary elements Accumulated variable name: rpb Source: gop.logI [1] Units: Custom unit [1/m^2] Smoothing radius : 0 [m]

Is the tutorial correct? In my instinct, it seems like I have to put total power ( gop.Q ) for the source so that the accumulator can calculate the "density" of "power", which is intensity. However, the tutorial is calculating the "density" of the (log of ) intensity over the area [m^2] which is definitely not the intensity itself.

So is my settings appropriate to get the intensity? or the tutorial is right?


  1. For the same purpose, I'm using the 'Density' instead of the default 'projected plane grid' for 'Inlet 1 Settings'. Would this help to generate the light with uniform density?

  2. The result '3D Plot Group - Surface 1' is very 'grainy' and doesn't seem to represent the real result (which should be smooth). Other than making the mesh finer and increasing the number of rays, is there something else I can do to make my simulation actually representing the real physical result?

  3. How can I check the "automatically assigned variables"? Such as gop.I, gop.logI, gop.I0, and gop.Q? I had to find each of them at several tutorials and it would be easier for me if I know how to check them up myself.


  1. From other tutorials regarding thermodynamics, 'T' is used for an automatically assigned variable for the temperature at each point. Is this('T' for temperature) different from the variables mentioned above (gop.I and so on)? The reason for asking this is that when I put in 'gop.I' in the Expression for Surface 1 of 3D Plot Group 2, it gives me an error below.

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

Also, when using Matlab Livelink function,

*mphinterp(model,'T','coord',[0;0;0]) *seems to give the temperature at [0;0;0] point, while

mphinterp(model,'gop.I','coord',[0;0;0]) gives me an error below.

*Error using mphinterp mphinterp (0): Java exception occurred: Exception:

com.comsol.util.exceptions.FlException: Failed to evaluate expression

Messages:

Cannot evaluate expression.

Undefined variable.

  • Variable: comp1.gop.I

  • Geometry: geom1

  • Domain: 1

Failed to evaluate expression.

  • Expression: comp1.gop.I*

How can I solve this? And where can I find these (potentially different types of ) automatically assigned variables ('T' for temperature, 'V' for voltage, and so on...)?


  1. I would like to use the 'mphinterp()' function for the variable 'rpb' I mentioned above. I've tried both 'rpb' and 'gop.wall1.bacc1.rpb', but both doesn't work... What should I put in instead?

  1. I would like to get an "intensity map" I've made in "3D Plot group 2" as a '2D Plot group' format. How can I do this?

9.I'm currently using 'Compute intensity and power' option for 'Geometrical Optics Settings'. Then, I can put in the settings for 'Inlet 1', both the initial light intensity (I_0) and the total source power (P_src) which are definitely correlated. Is the initial light intensity automatically ignored when I put both of them?


  1. From '3D Plot group 2 - Surface 1', I would like to get a (numeric) table of the intensity for each point. Maybe with X=1mm and Y=1mm steps. How can I do this?

Thank you for reading these long questions!

Best regards, Rovert(Hyun Sung) Cho



0 Replies Last Post Nov 18, 2019, 12:42 p.m. EST
COMSOL Moderator

Hello Hyun Sung Cho

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.