Meshing and Discretization Error
In the Geometrical Optics interface, rays interact with a surface when they hit a mesh element in that surface’s boundary mesh. When rays need information about the surface they hit, such as the surface normal direction which controls the direction of reflected and refracted rays, this information is also evaluated on the boundary mesh. Thus, having a high-quality mesh is an integral part of ray optics simulation.
The use of a boundary mesh to detect and apply ray-boundary interactions makes the Geometrical Optics interface readily extensible to high-fidelity multiphysics simulation, including such effects as translational motion, rotation, and structural deformation of the geometry (including thermal stress). In addition, this implementation allows rays to be traced through geometric entities of arbitrary shape, not just simple shapes for which a parametric representation is readily available.
Since rays interact with a mesh representation of the geometry, the mesh must be adequately refined so that the coordinates of points along the surface are sufficiently accurate. The level of mesh refinement also affects the accuracy of the tangential and normal unit vectors that are defined on the boundary elements, as well as the Gaussian curvatures that may be used to calculate the intensity along rays. Very high accuracy can be achieved with a coarse mesh on planar surfaces because even a small number of linear boundary elements can represent a planar surface to machine precision. Accurately discretizing the geometry becomes more important when the surfaces are curved, as in spherical lenses and conic mirrors, or when the surfaces may be deformed.
In the following image, the radial position over one boundary element on a coarsely meshed sphere (using quadratic elements) is compared to the exact value for an ideal sphere. The error is on the order of 10-5.
Figure 2-2: Error in the radial displacement over one boundary element of a unit sphere.
A relative error like the one shown above (10-5) might be sufficiently small for some simulation results, but in geometrical optics such an error might translate to tens of additional wavelengths in spot size — large enough to invalidate the results of the simulation entirely, unless adequate precautions are taken. Similarly, in models with mesh deformation, the degrees of freedom for the displacement field must be solved for extremely accurately for the results of a coupled multiphysics model to be trusted. A good practice, as with other types of simulation, is to perform a mesh refinement study, ensuring that the results do not change appreciably when the mesh element size is reduced further.
Note that ray tracing in COMSOL uses double precision floating point arithmetic, in for which machine precision is of order 10-16.