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 .
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:
VariableIntegralRayKernel for integrating a Variable or an AuxVariable
MaterialIntegralRayKernel for integrating a Material
FunctionIntegralRayKernel for integrating a Function
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]
[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
[]
[]
(moose/modules/ray_tracing/test/tests/raykernels/variable_integral_ray_kernel/variable_integral_ray_kernel.i)