ViewFactorRayStudy

This ray study is used to compute view factors in cavities with obstruction. It sends out rays from surfaces bounding the radiation cavity into a set of directions determined by an angular quadrature. The rays are tracked and view factors are computed by determining the surface where the ray dies.

Description

ViewFactorRayStudy computes view factors in a cavity enclosed by sidesets. The view factors are computed by sending out rays from a sidesets along directions determined by an angular quadrature. Rays are followed and traced through the cavity until they hit any sideset that is not declared a "symmetry sideset". The view factor between the sending and receiving sidesets is computed from the number of rays starting from one and ending on the other side.

ViewFactorRayStudy uses ray tracing for computing view factors in two-dimensional and three-dimensional cavities. It does not impose any restrictions on the geometry of the cavity; in particular it allows non-planar surfaces in radiative exchange, non-convex cavities, and obstruction of view between two surfaces by a third surface.

Theory

The central idea for computing view factors using ray tracing is to transform the integral over the target area into an integral over angular direction (i.e., an integral over the field of view of any infinitesimal element on the starting surface). An angular quadrature is used to numerically approximate the angular integral. To this end, the ray tracing module is used to follow rays along the directions of the angular quadrature and determine which surface they intersect first. The ray is terminated on that surface and the contribution to the view factor between the surface of origin and this surface is incremented.

The view factor, , is defined as a double integral over patches and . In 3D geometries, the view factor, , is computed by: (1) where the integral is taken over points on and on on patches and . For each combination of points and , we define:

where is the normal vector on patch pointing into the cavity and is the corresponding counterpart on patch .

To facilitate the computation of view factors, we change the integration variable from to angular direction . The infinitesimal element becomes: where and is the azimuthal angle of measured in a plane orthogonal to with respect to an arbitrarily chosen vector in that plane. The view factor is then computed by: where are all angular directions (starting from ) that intersect before intersecting any other radiation patch. We define and finally obtain: (2)

Before discretizing Eq. (2), we rewrite it slightly by introducing the function which is if a ray starting from location into direction makes its first intersection with surface . Then Eq. (2) becomes

(3)

The integral in Eq. (3) is discretized using a spatial quadrature over the area and an angular quadrature over :

(4)

where enumerates the spatial quadrature points, enumerates the angular directions, is the location of spatial quadrature point , is the normal at spatial quadrature point , and is the k-th angular direction. The role of ray tracing in Eq. (4) is to evaluate .

ViewFactorRayStudy uses Gaussian product quadratures for integrals in space, and a half-range Gauss-Chebyshev quadrature in angle. The selected angular quadrature is a half-range Gauss-Legendre-Chebyshev quadrature adopted from (Walters, 1987) by first restricting the polar range to and rotating the angular directions so that the polar angle is measured with respect to instead of .

Symmetry surfaces require special treatment. The difference between surfaces that participate in the radiative transfer and symmetry surfaces is that view factors are not computed for symmetry surfaces (i.e. if either surface or in is a symmetry surface, the view factor is not computed). Rays neither start nor end on symmetry surfaces. Instead, rays are specularly reflected off of symmetry surfaces. This is facilitated by the ray tracing module by using the ReflectRayBC.

Example Input syntax

[GlobalParams]
  view_factor_object_name = unobstructed_vf
[]

[Mesh]
  type = GeneratedMesh
  dim = 2
  xmin = 0
  xmax = 2
  ymin = 0
  ymax = 1
  nx = 2
  ny = 2
[]

[UserObjects]
  active = 'unobstructed_vf'

  [unobstructed_vf]
    type = UnobstructedPlanarViewFactor
    boundary = 'top left right bottom'
    execute_on = INITIAL
  []

  [vf_study]
    type = ViewFactorRayStudy
    execute_on = initial
    boundary = 'left right bottom top'
    face_order = TENTH
    polar_quad_order = 80
  []

  [rt_vf]
    type = RayTracingViewFactor
    boundary = 'left right bottom top'
    execute_on = INITIAL
    normalize_view_factor = false
    ray_study_name = vf_study
  []
[]

##
## Reference: bottom -> left/right = 0.19098
##            bottom -> top = 0.61803
## Result at spatial order 20, angular order 200 & -r2
##            bottom -> left/right = 0.1911
##            bottom -> top = 0.6177
##
## For convenience, the "view_factor_object_name" for these
## PPs are set in global params for switching between methods
##
[Postprocessors]
  [left_right]
    type = ViewFactorPP
    from_boundary = left
    to_boundary = right
  []

  [left_top]
    type = ViewFactorPP
    from_boundary = left
    to_boundary = top
  []

  [left_bottom]
    type = ViewFactorPP
    from_boundary = left
    to_boundary = bottom
  [../]

  [bottom_left]
    type = ViewFactorPP
    from_boundary = bottom
    to_boundary = left
  []

  [bottom_right]
    type = ViewFactorPP
    from_boundary = bottom
    to_boundary = right
  []

  [bottom_top]
    type = ViewFactorPP
    from_boundary = bottom
    to_boundary = top
  []
[]

[Problem]
  solve = false
[]

[Executioner]
  type = Steady
  [Quadrature] # higher order quadrature for unobstructed
    order = SECOND
  []
[]

[Outputs]
  csv = true
[]
(moose/modules/heat_transfer/test/tests/view_factors/view_factor_2d.i)

Input Parameters

  • boundaryThe list of boundaries where view factors are desired

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The list of boundaries where view factors are desired

Required Parameters

  • allow_other_flags_with_prekernelsFalseWhether or not to allow the list of execution flags to have PRE_KERNELS mixed with other flags. If this parameter is not set then if PRE_KERNELS is provided it must be the only execution flag.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to allow the list of execution flags to have PRE_KERNELS mixed with other flags. If this parameter is not set then if PRE_KERNELS is provided it must be the only execution flag.

  • azimuthal_quad_order8Order of the azimuthal quadrature per quadrant [azimuthal angle is measured in a plane perpendicular to the normal].

    Default:8

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Order of the azimuthal quadrature per quadrant [azimuthal angle is measured in a plane perpendicular to the normal].

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_KERNELS

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • face_orderCONSTANTThe face quadrature rule order

    Default:CONSTANT

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:CONSTANT, FIRST, SECOND, THIRD, FOURTH, FIFTH, SIXTH, SEVENTH, EIGHTH, NINTH, TENTH, ELEVENTH, TWELFTH, THIRTEENTH, FOURTEENTH, FIFTEENTH, SIXTEENTH, SEVENTEENTH, EIGHTTEENTH, NINTEENTH, TWENTIETH

    Controllable:No

    Description:The face quadrature rule order

  • face_typeGRIDThe face quadrature type

    Default:GRID

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:GAUSS, GRID

    Controllable:No

    Description:The face quadrature type

  • internal_conventionpositiveThe convention for spawning rays from internal sidesets; denotes the sign of the dot product between a ray and the internal sideset side normal

    Default:positive

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:positive, negative

    Controllable:No

    Description:The convention for spawning rays from internal sidesets; denotes the sign of the dot product between a ray and the internal sideset side normal

  • polar_quad_order16Order of the polar quadrature [polar angle is between ray and normal]. Must be even.

    Default:16

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Order of the polar quadrature [polar angle is between ray and normal]. Must be even.

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • ray_distance1.79769e+308The maximum distance all Rays can travel

    Default:1.79769e+308

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The maximum distance all Rays can travel

  • tolerate_failureFalseWhether or not to tolerate a ray tracing failure

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to tolerate a ray tracing failure

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • allow_new_work_during_executionTrueWhether or not to allow the addition of new work to the work buffer during execution

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to allow the addition of new work to the work buffer during execution

  • buffer_growth_multiplier2How much to grow a SendBuffer by if the buffer completely fills and dumps. Will max at send_buffer_size

    Default:2

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:How much to grow a SendBuffer by if the buffer completely fills and dumps. Will max at send_buffer_size

  • buffer_shrink_multiplier0.5Multiplier (between 0 and 1) to apply to the current buffer size if it is force dumped. Will stop at min_buffer_size.

    Default:0.5

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Multiplier (between 0 and 1) to apply to the current buffer size if it is force dumped. Will stop at min_buffer_size.

  • chunk_size100The number of objects to process at one time during execution

    Default:100

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:The number of objects to process at one time during execution

  • clicks_per_communication10Iterations to wait before communicating

    Default:10

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Iterations to wait before communicating

  • clicks_per_receive1Iterations to wait before checking for new objects

    Default:1

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Iterations to wait before checking for new objects

  • clicks_per_root_communication10Iterations to wait before communicating with root

    Default:10

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Iterations to wait before communicating with root

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • methodsmartThe algorithm to use

    Default:smart

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:smart, harm, bs

    Controllable:No

    Description:The algorithm to use

  • min_buffer_sizeThe initial size of the SendBuffer and the floor for shrinking it. This defaults to send_buffer_size if not set (i.e. the buffer won't change size)

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:The initial size of the SendBuffer and the floor for shrinking it. This defaults to send_buffer_size if not set (i.e. the buffer won't change size)

  • send_buffer_size100The size of the send buffer

    Default:100

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:The size of the send buffer

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

  • work_buffer_typecircularThe work buffer type to use

    Default:circular

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:lifo, circular

    Controllable:No

    Description:The work buffer type to use

Advanced Parameters

  • always_cache_tracesFalseWhether or not to cache the Ray traces on every execution, primarily for use in output. Warning: this can get expensive very quick with a large number of rays!

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to cache the Ray traces on every execution, primarily for use in output. Warning: this can get expensive very quick with a large number of rays!

  • aux_data_on_cache_tracesFalseWhether or not to also cache the Ray's aux data when caching its traces

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to also cache the Ray's aux data when caching its traces

  • data_on_cache_tracesFalseWhether or not to also cache the Ray's data when caching its traces

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to also cache the Ray's data when caching its traces

  • segments_on_cache_tracesTrueWhether or not to cache individual segments when trace caching is enabled. If false, we will instead cache a segment for each part of the trace where the direction is the same. This minimizes the number of segments requied to represent the Ray's path, but removes the ability to show Ray field data on each segment through an element.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to cache individual segments when trace caching is enabled. If false, we will instead cache a segment for each part of the trace where the direction is the same. This minimizes the number of segments requied to represent the Ray's path, but removes the ability to show Ray field data on each segment through an element.

Trace Cache Parameters

  • verify_raysFalseWhether or not to verify the generated Rays. This includes checking their starting information and the uniqueness of Rays before and after execution. This is also used by derived studies for more specific verification.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to verify the generated Rays. This includes checking their starting information and the uniqueness of Rays before and after execution. This is also used by derived studies for more specific verification.

  • verify_trace_intersectionsTrueWhether or not to verify the trace intersections in devel and dbg modes. Trace intersections are not verified regardless of this parameter in optimized modes (opt, oprof).

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to verify the trace intersections in devel and dbg modes. Trace intersections are not verified regardless of this parameter in optimized modes (opt, oprof).

Checks And Verifications Parameters

  • warn_non_planarTrueWhether or not to produce a warning if any element faces are non-planar.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to produce a warning if any element faces are non-planar.

  • warn_subdomain_hmaxTrueWhether or not to warn if the approximated hmax (constant on subdomain) varies significantly for an element

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to warn if the approximated hmax (constant on subdomain) varies significantly for an element

Tracing Warnings Parameters

References

  1. W F Walters. Use of the chebyshev-legendre quadrature set in discrete-ordinate codes. In Conference: Computational methods in high temperature physics. 1987.[BibTeX]