HexagonalSubchannelBin

Creates a unique spatial bin for each subchannel in a hexagonal lattice

Description

This user object bins the spatial domain according to a unique index for each channel in a subchannel discretization of an array of pins in a triangular lattice enclosed by a hexagonal prism. Subchannels are numbered first for the interior channels, followed by the edge channels, and concluded with the corner channels. Numbering moves in a counterclockwise direction.

Alternatively, if you set pin_centered_bins to true, then the bins are centered on the pins (as opposed to a channel-based discretization). This will create one hexagonal prism around each pin, with a single bin area forming any remaining area of the bundle (i.e. between the outer ring of pins and the duct). The bins are numbered first by ring and then in a counterclockwise direction.

When using pin_centered_bins = false, this user object can be paired with integrals/averages over subchannels. When using pin_centered_bins = true, this user object can be paired with side integrals/averages to compute quantities on the pin surfaces.

schooltip

To help with debugging, you can visualize this user object (i.e., the bin indices) using a SpatialUserObjectAux.

Example Input Syntax

Below is an example input file that computes channel indices (bins) for a subchannel discretization.

[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
  [subchannel_bins]
    type = HexagonalSubchannelBin<<<{"description": "Creates a unique spatial bin for each subchannel in a hexagonal lattice", "href": "HexagonalSubchannelBin.html"}>>>
    bundle_pitch<<<{"description": "Bundle pitch, or flat-to-flat distance across bundle"}>>> = ${bundle_pitch}
    pin_pitch<<<{"description": "Pin pitch, or distance between pin centers"}>>> = 0.0089656996
    pin_diameter<<<{"description": "Pin outer diameter"}>>> = 7.646e-3
    n_rings<<<{"description": "Number of pin rings, including the centermost pin as a 'ring'"}>>> = 3
  []
[]
(cardinal/test/tests/userobjects/hexagonal_subchannel_bin/subchannel.i)

The value of the userobject is shown below; numbers superimposed over each channel are the channel indices for this 19-pin geometry.

Figure 1: Subchannel bin indices for a 19-pin hexagonal geometry

Below is a second example that sets pin_centered_bins to true, which instead defines bins as hexagons centered on the pins.

bundle_pitch = 4.0
pin_pitch = 0.8
pin_diameter = 0.6

[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
  [graphite_pin]
    type = PolygonConcentricCircleMeshGenerator<<<{"description": "This PolygonConcentricCircleMeshGenerator object is designed to mesh a polygon geometry with optional rings centered inside.", "href": "../meshgenerators/PolygonConcentricCircleMeshGenerator.html"}>>>
    num_sides<<<{"description": "Number of sides of the polygon."}>>> = 6
    polygon_size<<<{"description": "Size of the polygon to be generated (given as either apothem or radius depending on polygon_size_style)."}>>> = ${fparse pin_pitch / 2.0}
    num_sectors_per_side<<<{"description": "Number of azimuthal sectors per polygon side (rotating counterclockwise from top right face)."}>>> = '2 2 2 2 2 2'
  []
  [bundle]
    type = PatternedHexMeshGenerator<<<{"description": "This PatternedHexMeshGenerator source code assembles hexagonal meshes into a hexagonal grid and optionally forces the outer boundary to be hexagonal and/or adds a duct.", "href": "../meshgenerators/PatternedHexMeshGenerator.html"}>>>
    inputs<<<{"description": "The input MeshGenerators."}>>> = 'graphite_pin'
    hexagon_size<<<{"description": "Size of the outmost hexagon boundary to be generated; this is required only when pattern type is 'hexagon'."}>>> = ${fparse bundle_pitch / 2.0}
    pattern<<<{"description": "A double-indexed hexagonal-shaped array starting with the upper-left corner."}>>> = '0 0 0;
              0 0 0 0;
             0 0 0 0 0;
              0 0 0 0;
               0 0 0'
    rotate_angle<<<{"description": "Rotate the entire patterned mesh by a certain degrees that is defined here."}>>> = 0
  []
  [extrude]
    type = AdvancedExtruderGenerator<<<{"description": "Extrudes a 1D mesh into 2D, or a 2D mesh into 3D, can have a variable height for each elevation, variable number of layers within each elevation, variable growth factors of axial element sizes within each elevation and remap subdomain_ids, boundary_ids and element extra integers within each elevation as well as interface boundaries between neighboring elevation layers.", "href": "../meshgenerators/AdvancedExtruderGenerator.html"}>>>
    input<<<{"description": "The mesh to extrude"}>>> = bundle
    heights<<<{"description": "The height of each elevation"}>>> = 0.5
    num_layers<<<{"description": "The number of layers for each elevation - must be num_elevations in length!"}>>> = 2
    direction<<<{"description": "A vector that points in the direction to extrude (note, this will be normalized internally - so don't worry about it here)"}>>> = '0 0 1'
  []
[]

[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
  solve = false
  type = FEProblem
[]

[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
  [bin]
    family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
    order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
  []
[]

[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
  [bin]
    type = SpatialUserObjectAux<<<{"description": "Populates an auxiliary variable with a spatial value returned from a UserObject spatialValue method.", "href": "../auxkernels/SpatialUserObjectAux.html"}>>>
    variable<<<{"description": "The name of the variable that this object applies to"}>>> = bin
    user_object<<<{"description": "The UserObject UserObject to get values from.  Note that the UserObject _must_ implement the spatialValue() virtual function!"}>>> = subchannel_bins
  []
[]

[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
  [subchannel_bins]
    type = HexagonalSubchannelBin<<<{"description": "Creates a unique spatial bin for each subchannel in a hexagonal lattice", "href": "HexagonalSubchannelBin.html"}>>>
    bundle_pitch<<<{"description": "Bundle pitch, or flat-to-flat distance across bundle"}>>> = ${bundle_pitch}
    pin_pitch<<<{"description": "Pin pitch, or distance between pin centers"}>>> = ${pin_pitch}
    pin_diameter<<<{"description": "Pin outer diameter"}>>> = ${pin_diameter}
    n_rings<<<{"description": "Number of pin rings, including the centermost pin as a 'ring'"}>>> = 3
    pin_centered_bins<<<{"description": "Whether the bins should be channel-centered (false) or pin-centered (true)"}>>> = true
  []
[]

[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
  type = Steady
[]

[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
  exodus<<<{"description": "Output the results using the default settings for Exodus output."}>>> = true
[]
(cardinal/test/tests/userobjects/hexagonal_subchannel_bin/pin_centered_3.i)

The value of the userobject is shown below; numbers superimposed over each bin are the pin indices (plus one additional index for the peripheral region) for this 19-pin geometry.

Figure 2: Pin-centered bin indices for a 19-pin hexagonal geometry

Input Parameters

  • bundle_pitchBundle pitch, or flat-to-flat distance across bundle

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Bundle pitch, or flat-to-flat distance across bundle

  • n_ringsNumber of pin rings, including the centermost pin as a 'ring'

    C++ Type:unsigned int

    Controllable:No

    Description:Number of pin rings, including the centermost pin as a 'ring'

  • pin_diameterPin outer diameter

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Pin outer diameter

  • pin_pitchPin pitch, or distance between pin centers

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Pin pitch, or distance between pin centers

Required Parameters

  • axiszvertical axis of the reactor (x, y, or z) along which pins are aligned

    Default:z

    C++ Type:MooseEnum

    Options:x, y, z

    Controllable:No

    Description:vertical axis of the reactor (x, y, or z) along which pins are aligned

  • pin_centered_binsFalseWhether the bins should be channel-centered (false) or pin-centered (true)

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether the bins should be channel-centered (false) or pin-centered (true)

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

    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).

  • 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

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

    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.

  • 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

    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

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

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

    Default:False

    C++ Type:bool

    Controllable:No

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

Execution Scheduling Parameters

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

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

    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

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • 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

    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.

Advanced Parameters

  • 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.

  • 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

    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.

Material Property Retrieval Parameters