- binsUserobjects providing a spatial bin given a point
C++ Type:std::vector<UserObjectName>
Controllable:No
Description:Userobjects providing a spatial bin given a point
- fieldField to postprocess
C++ Type:MooseEnum
Controllable:No
Description:Field to postprocess
NekBinnedVolumeAverage
Compute the spatially-binned volume average of a field over the NekRS mesh
Description
This user objects performs a volume average of a specified field over bins defined on the NekRS mesh. For a bin on , the user object value in that bin is
where is the value of the user object in bin and is the specified field. To be clear, this user object is not evaluated on the NekRSMesh mesh mirror, but instead on the mesh actually used for computation in NekRS.
The field is specified with the field
parameter, which may be one of:
pressure
temperature
velocity
(magnitude of velocity)velocity_x
(-component of velocity)velocity_y
(-component of velocity)velocity_z
(-component of velocity)velocity_component
(velocity vector projected onto another vector)scalar01
scalar02
scalar03
unity
Setting field = unity
is equivalent to computing 1, since the numerator will be exactly equal to the denominator (unity
is of more use for other postprocessors).
When using field = velocity_component
, the manner in which the velocity direction is selected is given by the velocity_component
parameter, which may be one of:
normal
: normal to the face bins (only valid for the side binning user objects)user
: arbitrary user-specified direction, provided with thevelocity_direction
parameter
When using a velocity component as the field, this user object computes the dot product of the velocity with the specified direction. To retain the components of the dot product, such as for visualizing vector glyphs of the user object result in Paraview, you can use a NekSpatialBinComponentAux.
If running NekRS in non-dimensional form (and you have indicated the appropriate nondimensional scales by setting nondimensional = true
for the [Problem]
, then the value of this postprocessor is shown in dimensional units. On the otherhand, NekRS scalars (scalar01, scalar02 or scalar03) are never dimensionalized because their dimensions are problem-dependent.
The bins are specified by providing a list of binning user objects with the bin
parameter. Available user objects for specifying spatial bins are:
If more than one bin is provided, then the bins are taken as the product of each individual bin distribution.
Example Input Syntax
As an example, the input below defines three individual bin distributions (named x_bins
, y_bins
, and z_bins
to represent 1-D binning in each coordinate direction). These bins are then combined to average over the NekRS mesh in equal-size spatial bins.
[UserObjects]
[x_bins]
type = LayeredBin
direction = x
num_layers = 3
[]
[y_bins]
type = LayeredBin
direction = y
num_layers = 3
[]
[z_bins]
type = LayeredBin
direction = z
num_layers = 12
[]
[vol_integral]
type = NekBinnedVolumeIntegral
bins = 'x_bins y_bins z_bins'
field = unity
[]
[avg_p]
type = NekBinnedVolumeAverage
bins = 'x_bins y_bins z_bins'
field = pressure
[]
[one_bin]
type = LayeredBin
direction = z
num_layers = 1
[]
[reference_vol_integral]
type = NekBinnedVolumeIntegral
bins = 'one_bin'
field = unity
[]
[reference_pressure_avg]
type = NekBinnedVolumeAverage
bins = 'one_bin'
field = pressure
[]
[]
(test/tests/userobjects/layered_layered/nek.i)The result of the user object can then be visualized with a SpatialUserObjectAux.
Input Parameters
- check_zero_contributionsTrueWhether to throw an error if no GLL points/element centroids in the NekRS mesh map to a spatial bin; this can be used to ensure that the bins are sufficiently big to get at least one contributing point from the NekRS mesh.
Default:True
C++ Type:bool
Controllable:No
Description:Whether to throw an error if no GLL points/element centroids in the NekRS mesh map to a spatial bin; this can be used to ensure that the bins are sufficiently big to get at least one contributing point from the NekRS mesh.
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- interval1Frequency (in number of time steps) with which to execute this user object; because Nek uses very small time steps, you need many time steps to reach steady state, and user objects can be expensive and not necessary to evaluate on every single time step. NOTE: you probably want to match this 'interval' in the Output
Default:1
C++ Type:unsigned int
Controllable:No
Description:Frequency (in number of time steps) with which to execute this user object; because Nek uses very small time steps, you need many time steps to reach steady state, and user objects can be expensive and not necessary to evaluate on every single time step. NOTE: you probably want to match this 'interval' in the Output
- map_space_by_qpFalseWhether to map the NekRS spatial domain to a bin according to the element centroids (true) or quadrature point locations (false).
Default:False
C++ Type:bool
Controllable:No
Description:Whether to map the NekRS spatial domain to a bin according to the element centroids (true) or quadrature point locations (false).
- 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
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.
- velocity_componentDirection with which to evaluate velocity when 'field = velocity_component.' Options: user (specify a direction with 'velocity_direction'), normal (normal to side bins)
C++ Type:MooseEnum
Controllable:No
Description:Direction with which to evaluate velocity when 'field = velocity_component.' Options: user (specify a direction with 'velocity_direction'), normal (normal to side bins)
- velocity_directionDirection in which to evaluate velocity, for 'field = velocity_component'. For example, velocity_direction = '1 0 0' will get the x-component of velocity.
C++ Type:libMesh::Point
Controllable:No
Description:Direction in which to evaluate velocity, for 'field = velocity_component'. For example, velocity_direction = '1 0 0' will get the x-component of velocity.
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).
- 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.
- 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
- 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
Input Files
- (tutorials/subchannel/nek.i)
- (tutorials/gas_compact_cht/nek.i)
- (test/tests/userobjects/interval/nek.i)
- (test/tests/userobjects/subchannel_layered/user_component.i)
- (test/tests/userobjects/subchannel_layered/1d.i)
- (tutorials/pebble_cht/nek.i)
- (test/tests/nek_errors/invalid_scalar/nek_uo.i)
- (test/tests/userobjects/subchannel_layered/order_error.i)
- (test/tests/userobjects/gap/nondimensional/nek.i)
- (tutorials/standalone/nek.i)
- (test/tests/userobjects/subchannel_layered/type_error.i)
- (test/tests/userobjects/layered_layered/nek.i)
- (test/tests/userobjects/volume/dimensional/nek.i)
- (test/tests/userobjects/subchannel_layered/nek.i)
- (test/tests/userobjects/subchannel_layered/duplicate_directions.i)
- (test/tests/userobjects/subchannel_layered/wrong_type.i)
- (test/tests/nek_errors/invalid_settings/problem_uo.i)
- (test/tests/nek_errors/invalid_field/nek_uo.i)
- (test/tests/userobjects/volume/nondimensional/nek.i)
- (test/tests/userobjects/gap/dimensional/nek.i)