4.4.1.4. Ray Tracing

Aria includes a ray tracing capability that can be used to model the effect of a focused radiation source on a target. Ray tracing works by computing the shortest intersection of a ray and mesh facets in the domain. When an intersection is detected, the ray will interact with the surface, with a portion of its energy deposited to drive a flux boundary condition, and a portion reflected away to potentially interact with other facets. For certain problems, ray tracing can offer performance advantages over enclosure radiation and PMR using MPMD. Specifically, when radiation transport is dominated by focused sources of radiation (like a laser), re-radiation between mesh surfaces can be neglected, and participating media effects can be neglected.

To enable ray tracing, first a ray source must be defined at the equation system level. The ray source defines the origin and distribution of rays that will be traced through the domain. The ray source also defines the surface properties and absorption model that will be used to compute the energy deposition that occurs when a ray interacts with a facet as well as some options that govern the behavior of the ray tracer.

Begin Raytrace Source Ray_Model
  Type = Circular_Gaussian
  Path Function = path
  Direction Function = direction
  Power Function = laserPower
  Radius = 0.1
  Exponential Factor = 2.0
  Maximum Intersections = 10
  Minimum Power Ratio = 0.001
  Discretization = Radial
  Number of Radial Segments = 50
  Number of Circular Segments = 5
  Absorption Model = specular
  Absorption expression = emissivity1
  Parallel Type = scene
End Raytrace Source Ray_model

#The ray source can then be used in a flux BC
BC Flux for Energy on surface_1 = Ray_Trace Ray_Source = Ray_Model

The TYPE specifies the distribution of the rays to be generated. Only circular distributions currently exist and can have either a Gaussian flux distribution (‘CIRCULAR_GAUSSIAN’ option) or constant (‘CIRCULAR’ option). The PATH FUNCTION, DIRECTION FUNCTION, and POWER FUNCTION specify Sierra user functions that govern the center location, initial direction, and total power of all the rays as a function of time. PATH FUNCTION and DIRECTION FUNCTION expect multi-component functions with X, Y, and Z components.

RADIUS and EXPONENTIAL FACTOR govern the Gaussian flux distributions as given by:

q_{gaussian} = \frac{(ExpFactor)(P)}{\pi Radius^2}\exp{\left(-ExpFactor\left(\frac{d^2}{Radius^2}\right)\right)}

where d is the distance to the origin of the circle and P is the current value of power given by the POWER FUNCTION. The constant flux distribution only requires specifying RADIUS and is equal to:

q_{constant} = \frac{P}{\pi Radius^2}

The constant flux distribution also allows the specification of the flux directly using the FLUX FUNCTION command instead of the POWER FUNCTION.

MAXIMUM INTERSCTIONS and MINIMUM POWER RATIO determine cutoff criteria for when rays should no longer be traced.

The DISCRETIZATION command controls how the flux distribution is discretized into rays. Valid options are ‘RADIAL’ and ‘MONTE_CARLO’. For the MONTE_CARLO option, rays origins are randomly generated within a circle of radius RADIUS for constant flux and anywhere in 2D space for Gaussian flux. For constant flux, rays will be uniformly distributed within the circle, whereas for Gaussian flux the distribution will be Gaussian in distance from the center as specified by PATH FUNCTION, meaning more rays will be generated closer to the center. For the ‘MONTE_CARLO’ discretization, the NUMBER OF RAYS option must be given to set the number of random rays to generate. The initial power of each ray will then be the total power specified by the POWER FUNCTION divided by NUMBER OF RAYS.

For the ‘RADIAL’ discretization, a deterministic method is used to generate rays. A circle of radius RADIUS for the constant flux distribution and 2*RADIUS for the Gaussian flux distribution is split into a series of segments as controlled by the NUMBER OF RADIAL SEGMENTS and NUMBER OF CIRCULAR SEGMENTS options. The number of radial segments determines the number of rings the circle is broken into. The number of radial segments determines the number of angular segments in the innermost ring. The number of angular segments per ring increases as the ring radius increases to the area of each segment is approximately equal. The total number of rays generated will be NumberOfRadialSegments^2*NumberOfCircularSegments. The flux distribution is integrated for each segment to give a power and a ray generated from the center of the segment with that power. For the Gaussian distribution, the outermost ring is assumed to extend to infinity for the purposes of integrating the flux, but ends at 2*RADIUS for purposes of determining the ray origin.

The ABSORPTION MODEL option controls how rays will interact with mesh facets they intersect with. The options are ‘SPECULAR’ and ‘FRESNEL’. For the specular model, a fraction of the ray’s power equal to \epsilon will be absorbed and the remaining 1-\epsilon will be reflected to possibly interact with another facet. \epsilon is given by the expression provided in the ABSORPTION EXPRESSION option, allowing a user to define their own user expression if they wish. If this option is omitted, the EMISSIVITY expression will be used.

The ‘FRESNEL’ model calculates the fraction of absorbed ray power based on the angle of incidence of the ray. This is given by:

\alpha = 1 - \frac{1}{2} \left( \frac{1+(1-\epsilon cos \phi)^2}{1+(1+\epsilon cos \phi)^2} + \frac{\epsilon^2-2\epsilon cos \phi + 2 cos^2 \phi}{\epsilon^2+2\epsilon cos \phi + 2 cos^2 \phi} \right)

\alpha is the absorbed power fraction, \phi is the angle between the facet normal and the incoming ray, and \epsilon is again provided by the ABSORPTION EXPRESSION option, which can be user expression or will default to the REFRACTIVE_INDEX_RATIO expression if omitted.

The PARALLEL TYPE option controls how ray trace calculations will be performed on parallel machines. With ‘SCENE’ parallelism, all processors have a copy of all the rays, which they intersect with their local piece of the distributed mesh. A communication is then done to resolve the shortest path when a ray intersection is found on multiple processors. With ‘RAY’ parallelism, all processors have a copy of the facets that the rays could possibly intersect with and the rays to be traced are distributed across processors. ‘RAY’ parallelism is faster, but incurs larger memory overhead, which can cause problems on larger meshes. ‘SCENE’ parallelism is slightly less performant, but requires only minimal additional memory.

Finally, the defined ray source can be used to define a boundary condition on a surface using the RAY_TRACE Flux BC model. Defining a RAY_TRACE BC on a mesh surface will automatically add the facets in that surface to the list of possible facets to intersect with for the specified ray source. The RAY_TRACE BC can optionally include black body emission from the surface using the EMISSION=TRUE option.

4.4.1.4.1. Banded Radiation

The ray tracer also supports banded emissivity models by allowing a user to specify a flux/power per band and an absorption expression per band.

#Define banded wavelength model
begin banded wavelength model test_band
  band first  = 0.0 3.0
  band second = 3.0 5.0
  band third  = 5.0 1000.0
end banded wavelength model test_band

Begin Raytrace Source Ray_Model
  Type = Circular_Gaussian
  Path Function = path
  Direction Function = direction
  Radius = 0.1
  Exponential Factor = 2.0
  Maximum Intersections = 10
  Minimum Power Ratio = 0.001
  Discretization = Radial
  Number of Radial Segments = 50
  Number of Circular Segments = 5
  Banded Wavelength Model = test_band
  Power Function for band first = laserPower1
  Power Function for band second = laserPower2
  Power Function for band third = laserPower3
  Absorption expression for band first = emissivity1
  Absorption expression for band second = emissivity2
  Absorption expression for band third = emissivity3
  Parallel Type = scene
End Raytrace Source Ray_model

#The ray source can then be used in a flux BC
BC Flux for Energy on surface_1 = Ray_Trace Ray_Source = Ray_Model Emission = True

In this case, the ABSORPTION MODEL option is omitted as only specular reflection is supported for banded cases. A banded wavelength model must also be specified in the equation system scope and the name provided to the ray source using the BANDED WAVELENGTH MODEL option. If the emission option is specified in the Flux BC command for a banded wavelength ray source, a band-averaged emissivity will be calculated.