IntegralRayKernel

Description

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

where is integrated from to .

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];
}
(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<<<{"href": "../../syntax/RayKernels/index.html"}>>>]
  [variable_integral]
    type = VariableIntegralRayKernel<<<{"description": "Integrates a Variable or AuxVariable along a Ray.", "href": "VariableIntegralRayKernel.html"}>>>
    study<<<{"description": "The RayTracingStudy associated with this object. If none provided, this will default to the one study that exists."}>>> = study
    variable<<<{"description": "The name of the variable to integrate"}>>> = u
  []
  [aux_variable_integral]
    type = VariableIntegralRayKernel<<<{"description": "Integrates a Variable or AuxVariable along a Ray.", "href": "VariableIntegralRayKernel.html"}>>>
    study<<<{"description": "The RayTracingStudy associated with this object. If none provided, this will default to the one study that exists."}>>> = study
    variable<<<{"description": "The name of the variable to integrate"}>>> = aux
  []
[]

[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
  [diag_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = diag
  []
  [top_across_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = top_across
  []
  [bottom_across_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = bottom_across
  []
  [partial_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = partial
  []

  [aux_diag_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = aux_variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = diag
  []
  [aux_top_across_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = aux_variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = top_across
  []
  [aux_bottom_across_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = aux_variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = bottom_across
  []
  [aux_partial_value]
    type = RayIntegralValue<<<{"description": "Obtains the integrated value accumulated into a Ray from an IntegralRayKernel-derived class.", "href": "../postprocessors/RayIntegralValue.html"}>>>
    ray_kernel<<<{"description": "The name of the IntegralRayKernel-derived RayKernel to obtain the integral value of"}>>> = aux_variable_integral
    ray<<<{"description": "Name of the Ray to get the final integral value from"}>>> = partial
  []
[]
(moose/modules/ray_tracing/test/tests/raykernels/variable_integral_ray_kernel/variable_integral_ray_kernel.i)