Skip to main content

I get this error :



Error Geometry error : NSC groupe surface 1 source 2 Gem=ometry error object 11 detected



when doing a ray trace. then the ray trace stops and I cannot do a proper analysis as not all the rays have been traced.



object 11 is a prism with a uncommon shape that I imported as a CAD object. The NSC 3D layout shows the correct geometry and no error is reported



what can I do to identify the geometry issue

Hi Anne,



You can check the Ignore Errors checkbox shown in your screenshot. It'll allow you to complete the raytrace regardless. Often time, those errors are harmless. Let the raytrace finish, and read the Lost Energy due to errors, and threshold. If this fraction of energy is insignificant, you can simply ignore the error. If this error matters to you, you can use a Source Ray object, and give it the starting coordinates, and direction as specified in the error dialog box (xyz, lmn), and try to visualize what is happening to the ray. In my experience, when it is a geometry error, what often happens is that a ray is landing on the edge, and Snell's law cannot be computed.



Let me know if this helps (I cannot check your file on the weekend as I don't have my OpticStudio laptop with me).



Take care,



David


Also, in the Setup tab when in Non-Sequential mode, there is a tool to do this last step for you:



 




thank you to both of you, your replies helped me a lot


I used the Creat Error Ray to try and analyse what the issue was, and I don't understand what is wrong with the ray in the file attached. it does not seem to hit an edge for example


Hi Anne,



I'm sorry but I cannot open your file as it is missing its CAD components.



When you want to share a design, please use File...Create Archive. This will produce a *.ZAR file, which is an archive containing all the necessary components of your project.



Once you re-upload the archive, I can try to have a look.



Take care,



David


Hi David,



the file is to big to send here (not sure why though ... ) you can download it here https://owncloud.ias.u-psud.fr/index.php/s/qZMoySZYzzTT6So



if it is a possibility for you



best regards,



Anne


Hi Anne,



Thank you for sharing this file.



Here are some coments based on what I've investigated so far. I'm assuming you are using Sources 2-6 for your design, and the sources at the end of your non-sequential data editor are your attempt to understand the geometry error.



First of all, when running a raytrace with 1E6 rays (arbitrary) from each source 2-6 (1 W each = 6 Win total), and ignoring the errors, I get a Lost energy (errors) value of about 1E-5, which I consider completely negligible with respect to the total 6 W. In fact, since you have 6 Watts total, and 5E6 rays, each ray carries 1.2E-6 Watt, meaning you probably have about 10 rays which are causing you an issue out of the 5 millions.



Second, I've noticed in your NSC 3D Layout, you did not tick Use PolarizationSplit NSC Rays, and Scatter NSC Rays (under Settings), which you should if you want to see the same thing as for your raytrace.



This being said, at first, I wasn't sure what was exactly happening, so let me explain you what I did. I kept only Sources 2-6 with 1E6 ray each because I knew this generated a couple of errors. Before running the raytrace, I also ticked Ignore Errors, and Save Rays. This saves all the rays, even if they generate an error, to a *.ZRD file. Then, I used the Analyze...Ray Database Viewer, and I displayed the first 1 million rays with a String Filter Z. The Z filter string select only rays that produced an error.





This is an example of one such ray (I hope it is large enough for you to read, let me know otherwise):





As you can see, the ray initially managed to be transmitted through Object 15 (segment 7), but then, was reflected off Object 19 (segment 12), went back through Object 15, and bounced a couple of times inside Object 15 before being terminated due to a Missed error (R = Reflect | T = Transmitted).



The scattering, and splitting adds randomness to the rays when they interact with the different objects of your file. If you've enabled the settings of your NSC 3D Layout as I mentioned above, you can refresh this window by double-clicking on it, and it might give you a different ray, based on the scattering it experiences. Do that a couple of time, and a problematic ray will eventually appear:





I  understand that you want to know where those errors are coming from, but when using scattering, and ray splitting, this is bound to happen.



However, since it affect so few rays, it might not be worth the hassle of debugging each ray.



Let me know if this helps.



Take care,



David


Hi all,



Great discussion! Anne - to add on to what David is saying here: sometimes geometry errors are unavoidable. For example, you may see a geometry error when a ray strikes an edge or corner of an object and has no clear path forward. Usually, it is best to analyze the percentage of rays lost to errors first. If the percentage is low (think 1-2% of the total power) then you can reasonably ignore the errors and continue with your simulation. This is discussed in more detail here.



Best,



Allie


Thank you David for the time spent looking at my file, it has been extremely helpful ! for info, the last source is automatically created using the 'create error ray' button Mark suggested



Thank you Allie as well I will continue to ignore errors as long as they are less thant 1%



best regards,



Anne


Reply