IntegralRayKernel

Description

IntegralRayKernel is the base class for integrating a quantity f(r)f(r) along a Ray and accumulating the integral into a data member on the Ray. The integral computed is:

Lf(r) dr,L={r1+tr2t[0,1]},\int_L f(r)~dr, \quad L = \{\vec{r}_1 + t\vec{r}_2 \mid t \in [0, 1]\}\,,

where f(r)f(r) is integrated from r1\vec{r}_1 to r2\vec{r}_2.

commentnote

IntegralRayKernel is not to be used for contributing to a residual or Jacobian along a Ray. For this case, you should derive from RayKernel or ADRayKernel.

For examples, see:

To integrate along a desired quantity, inherit from IntegralRayKernel and override the computeQpIntegral() method in which _qp is the current quadrature point index. For example:

Real
VariableIntegralRayKernel::computeQpIntegral()
{
  return _u[_qp];
}
(contrib/moose/modules/ray_tracing/src/raykernels/VariableIntegralRayKernel.C)

Many other useful member variables exist that describe the Ray segment. For more information, see Using a RayKernel.

The integrated value produced by a class that derives from this should be obtained using the RayIntegralValue postprocessor. For example:

[RayKernels]
  [variable_integral]
    type = VariableIntegralRayKernel
    study = study
    variable = u
  []
  [aux_variable_integral]
    type = VariableIntegralRayKernel
    study = study
    variable = aux
  []
[]

[Postprocessors]
  [diag_value]
    type = RayIntegralValue
    ray_kernel = variable_integral
    ray = diag
  []
  [top_across_value]
    type = RayIntegralValue
    ray_kernel = variable_integral
    ray = top_across
  []
  [bottom_across_value]
    type = RayIntegralValue
    ray_kernel = variable_integral
    ray = bottom_across
  []
  [partial_value]
    type = RayIntegralValue
    ray_kernel = variable_integral
    ray = partial
  []

  [aux_diag_value]
    type = RayIntegralValue
    ray_kernel = aux_variable_integral
    ray = diag
  []
  [aux_top_across_value]
    type = RayIntegralValue
    ray_kernel = aux_variable_integral
    ray = top_across
  []
  [aux_bottom_across_value]
    type = RayIntegralValue
    ray_kernel = aux_variable_integral
    ray = bottom_across
  []
  [aux_partial_value]
    type = RayIntegralValue
    ray_kernel = aux_variable_integral
    ray = partial
  []
[]
(contrib/moose/modules/ray_tracing/test/tests/raykernels/variable_integral_ray_kernel/variable_integral_ray_kernel.i)