Primary and Secondary Ray Releases
During the process of reflection and refraction described in the previous section, interaction with a boundary caused one ray to split into two. Hence, this boundary condition also functions as a ray release feature.
In the Geometrical Optics interface, rays are designated as either primary or secondary. Similarly, the physics features that produce them are called primary release features or secondary release features. The above is an example of a secondary release.
Primary Rays
A primary release feature allows the initial position and direction of rays to be specified directly. For the release positions, either specify the grid points directly (as in the Release from Grid feature) or choose the geometric entities that produce the rays (as in the Release, Inlet, Release from Edge, and Release from Point features). The initial direction can be specified directly or sampled from a distribution.
Primary rays are released directly by a release feature. They are called primary rays because their release is not contingent on the prior existence of any other ray.
Secondary Rays
Secondary rays are only released when an existing ray is subjected to certain boundary conditions. This existing ray might be a primary ray, or it could be a different secondary ray that was released earlier in the simulation.
For example, the following diagram shows an incident ray being split into reflected and refracted rays at a Material Discontinuity where the refractive indices on either side differ. The Geometrical Optics interface always applies deterministic ray splitting at such boundaries, so when one ray reaches the surface, two rays emerge from it. The refracted ray is a continuation of the incident ray because it has the same index and uses the same degrees of freedom. The reflected ray is a secondary ray.
Note that total internal reflection is automatically detected, and in this case no secondary emission takes place.
Allocation of Secondary DOFs
The number of degrees of freedom allocated to secondary rays is determined when the study begins, and if this maximum number is ever reached, then no additional secondary rays will be released. In other words, if a large number of reflected rays have been produced at material discontinuities in a model, at some point no more reflected rays will be produced. In this case, a Warning will appear in the solver sequence. The maximum number of secondary rays that can be produced in a model is controlled by the Maximum number of secondary rays field in the physics interface Ray Release and Propagation section.
Similarly, the Grating boundary condition can release both reflected and transmitted rays of many diffraction orders. One of these reflected or transmitted rays uses the degrees of freedom of the incident ray, and the rest must be taken from the preallocated secondary degrees of freedom.