- fieldField to integrate
C++ Type:MooseEnum
Controllable:No
Description:Field to integrate
NekVolumeIntegral
Compute the integral of a field over the NekRS mesh
Description
This postprocessor computes the integral of a specified field over the volume of the NekRS mesh,
where is the value of the postprocessor, is the volume of the nekrs mesh, and is the specified field. To be clear, this postprocessor 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 the volume.
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.
Example Input Syntax
As an example, the following code snippet will evaluate the volume and volume-integreated temperature, pressure, and velocity magnitude on the volume of the NekRS mesh.
[Postprocessors]
[volume]
type = NekVolumeIntegral
field = unity
[]
[temp_integral]
type = NekVolumeIntegral
field = temperature
[]
[pressure_integral]
type = NekVolumeIntegral
field = pressure
[]
[velocity_integral]
type = NekVolumeIntegral
field = velocity
[]
[velocity_component]
type = NekVolumeIntegral
field = velocity_component
velocity_direction = '0.1 0.2 0.3'
[]
[]
(test/tests/postprocessors/nek_volume_integral/nek.i)Input Parameters
- 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
Options:NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
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.
- meshallNekRS mesh to compute postprocessor on
Default:all
C++ Type:MooseEnum
Options:fluid, solid, all
Controllable:No
Description:NekRS mesh to compute postprocessor on
- 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_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
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- 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
- (test/tests/deformation/nek_standalone/nek_boundary.i)
- (test/tests/conduction/nonidentical_volume/nondimensional/nek.i)
- (test/tests/userobjects/subchannel_layered/nek.i)
- (test/tests/nek_standalone/lowMach/nek.i)
- (test/tests/cht/sfr_pincell/nek_vpp.i)
- (test/tests/conduction/identical_volume/cube/nek.i)
- (test/tests/cht/nondimensional/nek_exact.i)
- (test/tests/nek_standalone/conj_ht/nek.i)
- (test/tests/deformation/nek_standalone/nek.i)
- (test/tests/nek_standalone/channel/nek.i)
- (test/tests/cht/multi_cht/nek.i)
- (test/tests/userobjects/layered_layered/nek.i)
- (test/tests/cht/nondimensional/nek.i)
- (test/tests/postprocessors/nek_volume_integral/nek.i)
- (test/tests/cht/sfr_pincell/nek.i)
Child Objects
(test/tests/postprocessors/nek_volume_integral/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
[out]
type = CSV
hide = 'source_integral'
execute_on = 'final'
[]
[]
[Postprocessors]
[volume]
type = NekVolumeIntegral
field = unity
[]
[temp_integral]
type = NekVolumeIntegral
field = temperature
[]
[pressure_integral]
type = NekVolumeIntegral
field = pressure
[]
[velocity_integral]
type = NekVolumeIntegral
field = velocity
[]
[velocity_component]
type = NekVolumeIntegral
field = velocity_component
velocity_direction = '0.1 0.2 0.3'
[]
[]
(test/tests/deformation/nek_standalone/nek_boundary.i)
[Mesh]
type = NekRSMesh
boundary = '1 2 3'
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'mv_cyl'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[volume]
type = NekVolumeIntegral
field = unity
[]
[area]
type = NekSideIntegral
field = unity
boundary = '1 2 3'
[]
# these will not reflect the changing mesh, because we do not copy displacements
# from NekRS to MOOSE
[area_moose]
type = VolumePostprocessor
[]
[]
[Outputs]
csv = true
execute_on = 'final'
[]
(test/tests/conduction/nonidentical_volume/nondimensional/nek.i)
[Problem]
type = NekRSProblem
casename = 'cylinder'
nondimensional = true
T_ref = 500.0
dT_ref = 50.0
rho_0 = 5.0
Cp_0 = 6.0
L_ref = 0.5
U_ref = 1.0
[]
[Mesh]
type = NekRSMesh
volume = true
# change to SECOND to exactly match the verification case in ../cylinder; we use
# FIRST here just to reduce the size of the gold file
order = FIRST
# nekRS runs in nondimensional form, so we need to adjust the mesh (in nondimensional
# coordinates) to the dimensional form expected by MOOSE
scaling = 0.5
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[avg_T_volume]
type = NekVolumeAverage
field = temperature
[]
[T_volume]
type = NekVolumeIntegral
field = temperature
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
# we can infer that these variables dont change by ensuring that 'temp' does not change,
# since these other two variables are boundary conditions and source terms for the energy equation
hide = 'heat_source'
[]
(test/tests/userobjects/subchannel_layered/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'sfr_7pin'
output = 'temperature'
[]
[AuxVariables]
[subchannel_bins]
family = MONOMIAL
order = CONSTANT
[]
[axial_bins]
family = MONOMIAL
order = CONSTANT
[]
[total_volume]
family = MONOMIAL
order = CONSTANT
[]
[total_average_T]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[bins1]
type = SpatialUserObjectAux
variable = subchannel_bins
user_object = subchannel_binning
[]
[bins2]
type = SpatialUserObjectAux
variable = axial_bins
user_object = axial_binning
[]
[total_volume]
type = SpatialUserObjectAux
variable = total_volume
user_object = reference_vol_integral
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_average_T]
type = SpatialUserObjectAux
variable = total_average_T
user_object = reference_T_avg
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelBin
bundle_pitch = 0.02583914354890463
pin_pitch = 0.0089656996
pin_diameter = 7.646e-3
n_rings = 2
[]
[axial_binning]
type = LayeredBin
direction = z
num_layers = 6
[]
[vol_avg]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[vol_integral]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = unity
[]
[one_bin]
type = LayeredBin
direction = z
num_layers = 1
[]
[reference_vol_integral]
type = NekBinnedVolumeIntegral
bins = 'one_bin'
field = unity
[]
[reference_T_avg]
type = NekBinnedVolumeAverage
bins = 'one_bin'
field = temperature
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = vol_avg
to_multi_app = subchannel
variable = vol_avg
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = vol_integral
to_multi_app = subchannel
variable = vol_integral
[]
[]
[Postprocessors]
# we compare the integral (with a single bin) with an already-verified postprocessor
# to make sure the actual internals of the binned volume integral are done correctly
[volume_ref] # should match the value in 'total_volume' (computed with 1 bin)
type = NekVolumeIntegral
field = unity
[]
[avg_T_ref] # should match the value in 'total_average_T' (computed with 1 bin)
type = NekVolumeAverage
field = temperature
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
hide = 'temp'
[]
(test/tests/nek_standalone/lowMach/nek.i)
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'lowMach'
output = 'pressure velocity temperature'
# We omit the non-dimensional settings here in order to just extract the
# non-dimensional solution as-is, without dimensionalizing it.
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
# All the following postprocessors are applying operations both (a) directly to the NekRS
# solution arrays, and (b) to the variables extracted with the 'outputs = ...' syntax.
# Rather than check the actual values of these postprocessors (which might change if the
# NekRS development team changes the nature of their CI tests), we can just check that
# the difference between the Nek-style postprocessors from the MOOSE-style postprocessors
# (acting on the extract solution) are nearly zero. We only check the absolute value of
# the min/max volume values for Vx, temperature, and pressure because those values are printed to
# the screen and offer quick confirmation of any changes that are due to changes in NekRS itself.
[max_Vx]
type = NekVolumeExtremeValue
field = velocity_x
value_type = max
[]
[max_Vx_output]
type = NodalExtremeValue
variable = vel_x
value_type = max
[]
[max_Vx_diff]
type = DifferencePostprocessor
value1 = max_Vx
value2 = max_Vx_output
[]
[min_Vx]
type = NekVolumeExtremeValue
field = velocity_x
value_type = min
[]
[min_Vx_output]
type = NodalExtremeValue
variable = vel_x
value_type = min
[]
[min_Vx_diff]
type = DifferencePostprocessor
value1 = min_Vx
value2 = min_Vx_output
[]
[max_p]
type = NekVolumeExtremeValue
field = pressure
value_type = max
[]
[max_p_output]
type = NodalExtremeValue
variable = P
value_type = max
[]
[max_p_diff]
type = DifferencePostprocessor
value1 = max_p
value2 = max_p_output
[]
[min_p]
type = NekVolumeExtremeValue
field = pressure
value_type = min
[]
[min_p_output]
type = NodalExtremeValue
variable = P
value_type = min
[]
[min_p_diff]
type = DifferencePostprocessor
value1 = min_p
value2 = min_p_output
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[max_T_output]
type = NodalExtremeValue
variable = temp
value_type = max
[]
[max_T_diff]
type = DifferencePostprocessor
value1 = max_T
value2 = max_T_output
[]
[min_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[min_T_output]
type = NodalExtremeValue
variable = temp
value_type = min
[]
[min_T_diff]
type = DifferencePostprocessor
value1 = min_T
value2 = min_T_output
[]
[area]
type = NekSideIntegral
field = unity
boundary = '1'
[]
[area_output]
type = AreaPostprocessor
boundary = '1'
[]
[area_diff]
type = DifferencePostprocessor
value1 = area
value2 = area_output
[]
[volume]
type = NekVolumeIntegral
field = unity
[]
[volume_output]
type = VolumePostprocessor
[]
[volume_diff]
type = DifferencePostprocessor
value1 = volume
value2 = volume_output
[]
[max_T_side]
type = NekSideExtremeValue
field = temperature
value_type = max
boundary = '1'
[]
[max_T_side_output]
type = NodalExtremeValue
variable = temp
value_type = max
boundary = '1'
[]
[max_T_side_diff]
type = DifferencePostprocessor
value1 = max_T_side
value2 = max_T_side_output
[]
[min_T_side]
type = NekSideExtremeValue
field = temperature
value_type = min
boundary = '1'
[]
[min_T_side_output]
type = NodalExtremeValue
variable = temp
value_type = min
boundary = '1'
[]
[min_T_side_diff]
type = DifferencePostprocessor
value1 = min_T_side
value2 = min_T_side_output
[]
[max_Vx_side]
type = NekSideExtremeValue
field = velocity_x
value_type = max
boundary = '1'
[]
[max_Vx_side_output]
type = NodalExtremeValue
variable = vel_x
value_type = max
boundary = '1'
[]
[max_Vx_side_diff]
type = DifferencePostprocessor
value1 = max_Vx_side
value2 = max_Vx_side_output
[]
[min_Vx_side]
type = NekSideExtremeValue
field = velocity_x
value_type = min
boundary = '1'
[]
[min_Vx_side_output]
type = NodalExtremeValue
variable = vel_x
value_type = min
boundary = '1'
[]
[min_Vx_side_diff]
type = DifferencePostprocessor
value1 = min_Vx_side
value2 = min_Vx_side_output
[]
[max_p_side]
type = NekSideExtremeValue
field = pressure
value_type = max
boundary = '1'
[]
[max_p_side_output]
type = NodalExtremeValue
variable = P
value_type = max
boundary = '1'
[]
[min_p_side_diff]
type = DifferencePostprocessor
value1 = min_p_side
value2 = min_p_side_output
[]
[min_p_side]
type = NekSideExtremeValue
field = pressure
value_type = min
boundary = '1'
[]
[min_p_side_output]
type = NodalExtremeValue
variable = P
value_type = min
boundary = '1'
[]
[max_p_side_diff]
type = DifferencePostprocessor
value1 = max_p_side
value2 = max_p_side_output
[]
[avg_T]
type = NekVolumeAverage
field = temperature
[]
[avg_T_output]
type = ElementAverageValue
variable = temp
[]
[avg_T_diff]
type = DifferencePostprocessor
value1 = avg_T
value2 = avg_T_output
[]
[avg_Vx]
type = NekVolumeAverage
field = velocity_x
[]
[avg_Vx_output]
type = ElementAverageValue
variable = vel_x
[]
[avg_Vx_diff]
type = DifferencePostprocessor
value1 = avg_Vx
value2 = avg_Vx_output
[]
[avg_T_side]
type = NekSideAverage
field = temperature
boundary = '1'
[]
[avg_T_side_output]
type = SideAverageValue
variable = temp
boundary = '1'
[]
[avg_T_side_diff]
type = DifferencePostprocessor
value1 = avg_T_side
value2 = avg_T_side_output
[]
[avg_Vx_side]
type = NekSideAverage
field = velocity_x
boundary = '1'
[]
[avg_Vx_side_output]
type = SideAverageValue
variable = vel_x
boundary = '1'
[]
[avg_Vx_side_diff]
type = DifferencePostprocessor
value1 = avg_Vx_side
value2 = avg_Vx_side_output
[]
[avg_p_side]
type = NekSideAverage
field = pressure
boundary = '1'
[]
[avg_p_side_output]
type = SideAverageValue
variable = P
boundary = '1'
[]
[avg_p_side_diff]
type = DifferencePostprocessor
value1 = avg_p_side
value2 = avg_p_side_output
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = 'final'
hide = 'max_Vx_output min_Vx_output max_p_output min_p_output area_output volume_output max_Vx_side max_Vx_side_output max_p_side max_p_side_output min_Vx_side min_Vx_side_output min_p_side min_p_side_output avg_Vx avg_Vx_output avg_Vx_side avg_Vx_side_output avg_p_side avg_p_side_output max_T_output min_T_output max_T_side max_T_side_output min_T_side min_T_side_output avg_T avg_T_output avg_T_side avg_T_side_output'
[]
(test/tests/cht/sfr_pincell/nek_vpp.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
conserve_flux_by_sideset = true
# we only technically need one scratch space slot for this problem,
# so we can skip allocating extra
n_usrwrk_slots = 1
[]
[Mesh]
type = NekRSMesh
boundary = '1'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[nek_flux]
type = NekHeatFluxIntegral
boundary = '1'
[]
[average_inlet_T]
type = NekSideAverage
field = temperature
boundary = '3'
execute_on = initial
[]
[average_outlet_T]
type = NekSideAverage
field = temperature
boundary = '4'
[]
[dT]
type = DifferencePostprocessor
value1 = average_outlet_T
value2 = average_inlet_T
[]
[inlet_mdot]
type = NekMassFluxWeightedSideIntegral
field = unity
boundary = '3'
execute_on = initial
[]
# postprocessors for comparing against non-dimensional version in ../nondimensional
# --> uncomment in order to get the reference values that the nondimensional boundary coupling
# was verified against
#
# # side integral
# [area_1]
# type = NekSideIntegral
# field = unity
# boundary = '1'
# []
# [pressure_1]
# type = NekSideIntegral
# field = pressure
# boundary = '1'
# []
# [temperature_1]
# type = NekSideIntegral
# field = temperature
# boundary = '1'
# []
# # side average
# [avg_area_1]
# type = NekSideAverage
# field = unity
# boundary = '1'
# []
# [avg_pressure_1]
# type = NekSideAverage
# field = pressure
# boundary = '1'
# []
# [avg_temperature_1]
# type = NekSideAverage
# field = temperature
# boundary = '1'
# []
# # volume integral
# [volume]
# type = NekVolumeIntegral
# field = unity
# []
# [pressure_vol]
# type = NekVolumeIntegral
# field = pressure
# []
# [temperature_vol]
# type = NekVolumeIntegral
# field = temperature
# []
# # volume average
# [avg_volume]
# type = NekVolumeAverage
# field = unity
# []
# [avg_pressure_vol]
# type = NekVolumeAverage
# field = pressure
# []
# [avg_temperature_vol]
# type = NekVolumeAverage
# field = temperature
# []
# # heat flux integral
# [nek_flux]
# type = NekHeatFluxIntegral
# boundary = '1'
# []
# # mass flux weighted integral
# [inlet_mdot]
# type = NekMassFluxWeightedSideIntegral
# field = unity
# boundary = '3'
# execute_on = initial
# []
# [outlet_T]
# type = NekMassFluxWeightedSideIntegral
# field = temperature
# boundary = '4'
# []
# [inlet_P]
# type = NekMassFluxWeightedSideIntegral
# field = pressure
# boundary = '4'
# []
# # mass flux weighted integral
# [inlet_mdot_avg]
# type = NekMassFluxWeightedSideAverage
# field = unity
# boundary = '3'
# execute_on = initial
# []
# [outlet_T_avg]
# type = NekMassFluxWeightedSideAverage
# field = temperature
# boundary = '4'
# []
# [inlet_P_avg]
# type = NekMassFluxWeightedSideAverage
# field = pressure
# boundary = '4'
# []
# # extreme value postprocessors - VOLUME
# [max_T]
# type = NekVolumeExtremeValue
# field = temperature
# value_type = max
# []
# [min_T]
# type = NekVolumeExtremeValue
# field = temperature
# value_type = min
# []
# [max_p]
# type = NekVolumeExtremeValue
# field = pressure
# value_type = max
# []
# [min_p]
# type = NekVolumeExtremeValue
# field = pressure
# value_type = min
# []
# [max_1]
# type = NekVolumeExtremeValue
# field = unity
# value_type = max
# []
# [min_1]
# type = NekVolumeExtremeValue
# field = unity
# value_type = min
# []
# # extreme value postprocessors - SIDE
# [max_T_out]
# type = NekSideExtremeValue
# field = temperature
# boundary = '4'
# value_type = max
# []
# [min_T_out]
# type = NekSideExtremeValue
# field = temperature
# boundary = '4'
# value_type = min
# []
# [max_p_in]
# type = NekSideExtremeValue
# field = pressure
# boundary = '3'
# value_type = max
# []
# [min_p_in]
# type = NekSideExtremeValue
# field = pressure
# boundary = '3'
# value_type = min
# []
# [max_1_in]
# type = NekSideExtremeValue
# field = unity
# boundary = '3'
# value_type = max
# []
# [min_1_in]
# type = NekSideExtremeValue
# field = unity
# boundary = '3'
# value_type = min
# []
[]
[Outputs]
exodus = true
execute_on = 'final'
csv = true
[screen]
type = Console
hide = 'average_inlet_T average_outlet_T'
[]
[]
(test/tests/conduction/identical_volume/cube/nek.i)
[Problem]
type = NekRSProblem
casename = 'cube'
# we only technically need two scratch space slots for this problem,
# (the first is reserved for heat flux, but ultimately not used in this
# volume-only problem, while the second is reserved for the volumetric heat
# source, which is actually used),
# so we can skip allocating extra
n_usrwrk_slots = 2
[]
[Mesh]
type = NekRSMesh
order = SECOND
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[flux_out]
type = NekHeatFluxIntegral
boundary = '1 2 3 4 5 6'
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[avg_T_volume]
type = NekVolumeIntegral
field = temperature
[]
[avg_T_back]
type = NekSideAverage
field = temperature
boundary = '6'
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
# for this tests purposes, we only want to check temperature. This keeps the gold file smaller
hide = 'heat_source'
[]
(test/tests/cht/nondimensional/nek_exact.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
# This input is run in nondimensional form to verify that all the postprocessors
# and data transfers in/out of nekRS are properly dimensionalized.
nondimensional = true
U_ref = 0.0950466
T_ref = 628.15
dT_ref = 50.0
L_ref = 0.908e-2
rho_0 = 834.5
Cp_0 = 1228.0
[]
[Mesh]
type = NekRSMesh
boundary = '1'
exact = true
# nekRS runs in non-dimensional form, which means that we shrunk the mesh
# from physical units of meters to our characteristic scale of 0.908e-2 m
# (the pin pitch, arbitrarily chosen). That means that we must multiply
# the nekRS mesh by 0.908e-2 to get back in units of meters that BISON is
# running in.
scaling = 0.908e-2
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
# pressure is not a reliable quantity to compare in a short, few-timestep regression test.
# This line can be uncommented for comparing with the dimensional version.
inactive = 'avg_pressure_1 avg_pressure_vol max_p max_p_in min_p_in pressure_1 pressure_vol'
[synchronization_in]
type = Receiver
[]
# side integral
[area_1]
type = NekSideIntegral
field = unity
boundary = '1'
[]
[pressure_1]
type = NekSideIntegral
field = pressure
boundary = '1'
[]
[temperature_1]
type = NekSideIntegral
field = temperature
boundary = '1'
[]
# side average
[avg_area_1]
type = NekSideAverage
field = unity
boundary = '1'
[]
[avg_pressure_1]
type = NekSideAverage
field = pressure
boundary = '1'
[]
[avg_temperature_1]
type = NekSideAverage
field = temperature
boundary = '1'
[]
# volume integral
[volume]
type = NekVolumeIntegral
field = unity
[]
[pressure_vol]
type = NekVolumeIntegral
field = pressure
[]
[temperature_vol]
type = NekVolumeIntegral
field = temperature
[]
# volume average
[avg_volume]
type = NekVolumeAverage
field = unity
[]
[avg_pressure_vol]
type = NekVolumeAverage
field = pressure
[]
[avg_temperature_vol]
type = NekVolumeAverage
field = temperature
[]
# heat flux integral
[nek_flux]
type = NekHeatFluxIntegral
boundary = '1'
[]
# mass flux weighted integral
[inlet_mdot]
type = NekMassFluxWeightedSideIntegral
field = unity
boundary = '3'
execute_on = initial
[]
[outlet_T]
type = NekMassFluxWeightedSideIntegral
field = temperature
boundary = '4'
[]
[inlet_P]
type = NekMassFluxWeightedSideIntegral
field = pressure
boundary = '4'
[]
# mass flux weighted integral
[inlet_mdot_avg]
type = NekMassFluxWeightedSideAverage
field = unity
boundary = '3'
execute_on = initial
[]
[outlet_T_avg]
type = NekMassFluxWeightedSideAverage
field = temperature
boundary = '4'
[]
[inlet_P_avg]
type = NekMassFluxWeightedSideAverage
field = pressure
boundary = '4'
[]
# extreme value postprocessors - VOLUME
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[max_p]
type = NekVolumeExtremeValue
field = pressure
value_type = max
[]
[min_p]
type = NekVolumeExtremeValue
field = pressure
value_type = min
[]
[max_1]
type = NekVolumeExtremeValue
field = unity
value_type = max
[]
[min_1]
type = NekVolumeExtremeValue
field = unity
value_type = min
[]
# extreme value postprocessors - SIDE
[max_T_out]
type = NekSideExtremeValue
field = temperature
boundary = '4'
value_type = max
[]
[min_T_out]
type = NekSideExtremeValue
field = temperature
boundary = '4'
value_type = min
[]
[max_p_in]
type = NekSideExtremeValue
field = pressure
boundary = '3'
value_type = max
[]
[min_p_in]
type = NekSideExtremeValue
field = pressure
boundary = '3'
value_type = min
[]
[max_1_in]
type = NekSideExtremeValue
field = unity
boundary = '3'
value_type = max
[]
[min_1_in]
type = NekSideExtremeValue
field = unity
boundary = '3'
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
csv = true
[screen]
type = Console
hide = 'synchronization_in'
[]
[]
(test/tests/nek_standalone/conj_ht/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'conj_ht'
output = 'temperature'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[Area_BC3_flow]
type = NekSideIntegral
boundary = '3'
field = unity
mesh = 'fluid'
[]
[Area_BC3_all]
type = NekSideIntegral
boundary = '3'
field = unity
mesh = 'all'
[]
[SideAverage_T_BC3_flow]
type = NekSideAverage
boundary = '3'
field = temperature
mesh = 'fluid'
[]
[SideAverage_T_BC3_all]
type = NekSideAverage
boundary = '3'
field = temperature
mesh = 'all'
[]
[HeatFluxIntegral_BC3_flow]
type = NekHeatFluxIntegral
boundary = '3'
mesh = 'fluid'
[]
[HeatFluxIntegral_BC3_all]
type = NekHeatFluxIntegral
boundary = '3'
mesh = 'all'
[]
[MassFlowRate_BC1_flow]
type = NekMassFluxWeightedSideIntegral
boundary = '1'
field = unity
mesh = 'fluid'
[]
[MassFlowRate_BC1_all]
type = NekMassFluxWeightedSideIntegral
boundary = '1'
field = unity
mesh = 'all'
[]
[MflowAvgTemp_BC2_flow]
type = NekMassFluxWeightedSideAverage
boundary = '2'
field = temperature
mesh = 'fluid'
[]
[MflowAvgTemp_BC2_all]
type = NekMassFluxWeightedSideAverage
boundary = '2'
field = temperature
mesh = 'all'
[]
[Reynolds_BC1_flow]
type = ReynoldsNumber
boundary = '1'
L_ref = 0.5
mesh = 'fluid'
[]
[Reynolds_BC1_all]
type = ReynoldsNumber
boundary = '1'
L_ref = 0.5
mesh = 'all'
[]
[Peclet_BC1_flow]
type = PecletNumber
boundary = '1'
L_ref = 0.5
mesh = 'fluid'
[]
[Peclet_BC1_all]
type = PecletNumber
boundary = '1'
L_ref = 0.5
mesh = 'all'
[]
#
# Volume post processors
#
[Vol_flow]
type = NekVolumeIntegral
field = unity
mesh = 'fluid'
[]
[Vol_all]
type = NekVolumeIntegral
field = unity
mesh = 'all'
[]
[maxVol_T_flow]
type = NekVolumeExtremeValue
field = temperature
value_type = max
mesh = 'fluid'
[]
[maxVol_T_all]
type = NekVolumeExtremeValue
field = temperature
value_type = max
mesh = 'all'
[]
[avgVol_T_flow]
type = NekVolumeAverage
field = temperature
mesh = 'fluid'
[]
[avgVol_T_all]
type = NekVolumeAverage
field = temperature
mesh = 'all'
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = final
[]
(test/tests/deformation/nek_standalone/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'mv_cyl'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[volume]
type = NekVolumeIntegral
field = unity
[]
[area]
type = NekSideIntegral
field = unity
boundary = '1 2 3'
[]
# these will not reflect the changing mesh, because we do not copy displacements
# from NekRS to MOOSE
[volume_moose]
type = VolumePostprocessor
[]
[area_moose]
type = AreaPostprocessor
boundary = '1 2 3'
[]
[]
[Outputs]
csv = true
execute_on = 'final'
[]
(test/tests/nek_standalone/channel/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'channel'
output = 'pressure velocity'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_Vx]
type = NekVolumeExtremeValue
field = velocity_x
value_type = max
[]
[max_Vx_output]
type = NodalExtremeValue
variable = vel_x
value_type = max
[]
[max_Vx_diff]
type = DifferencePostprocessor
value1 = max_Vx
value2 = max_Vx_output
[]
[min_Vx]
type = NekVolumeExtremeValue
field = velocity_x
value_type = min
[]
[min_Vx_output]
type = NodalExtremeValue
variable = vel_x
value_type = min
[]
[min_Vx_diff]
type = DifferencePostprocessor
value1 = min_Vx
value2 = min_Vx_output
[]
[max_Vy]
type = NekVolumeExtremeValue
field = velocity_y
value_type = max
[]
[max_Vy_output]
type = NodalExtremeValue
variable = vel_y
value_type = max
[]
[max_Vy_diff]
type = DifferencePostprocessor
value1 = max_Vy
value2 = max_Vy_output
[]
[min_Vy]
type = NekVolumeExtremeValue
field = velocity_y
value_type = min
[]
[min_Vy_output]
type = NodalExtremeValue
variable = vel_y
value_type = min
[]
[max_p]
type = NekVolumeExtremeValue
field = pressure
value_type = max
[]
[max_p_output]
type = NodalExtremeValue
variable = P
value_type = max
[]
[max_p_diff]
type = DifferencePostprocessor
value1 = max_p
value2 = max_p_output
[]
[min_p]
type = NekVolumeExtremeValue
field = pressure
value_type = min
[]
[min_p_output]
type = NodalExtremeValue
variable = P
value_type = min
[]
[min_p_diff]
type = DifferencePostprocessor
value1 = min_p
value2 = min_p_output
[]
[area]
type = NekSideIntegral
field = unity
boundary = '1'
[]
[area_output]
type = AreaPostprocessor
boundary = '1'
[]
[area_diff]
type = DifferencePostprocessor
value1 = area
value2 = area_output
[]
[volume]
type = NekVolumeIntegral
field = unity
[]
[volume_output]
type = VolumePostprocessor
[]
[volume_diff]
type = DifferencePostprocessor
value1 = volume
value2 = volume_output
[]
[max_Vx_side]
type = NekSideExtremeValue
field = velocity_x
value_type = max
boundary = '1'
[]
[max_Vx_side_output]
type = NodalExtremeValue
variable = vel_x
value_type = max
boundary = '1'
[]
[max_Vx_side_diff]
type = DifferencePostprocessor
value1 = max_Vx_side
value2 = max_Vx_side_output
[]
[max_Vy_side]
type = NekSideExtremeValue
field = velocity_y
value_type = max
boundary = '1'
[]
[max_Vy_side_output]
type = NodalExtremeValue
variable = vel_y
value_type = max
boundary = '1'
[]
[max_Vy_side_diff]
type = DifferencePostprocessor
value1 = max_Vy_side
value2 = max_Vy_side_output
[]
[min_Vx_side]
type = NekSideExtremeValue
field = velocity_x
value_type = min
boundary = '1'
[]
[min_Vx_side_output]
type = NodalExtremeValue
variable = vel_x
value_type = min
boundary = '1'
[]
[min_Vx_side_diff]
type = DifferencePostprocessor
value1 = min_Vx_side
value2 = min_Vx_side_output
[]
[min_Vy_side]
type = NekSideExtremeValue
field = velocity_y
value_type = min
boundary = '1'
[]
[min_Vy_side_output]
type = NodalExtremeValue
variable = vel_y
value_type = min
boundary = '1'
[]
[min_Vy_side_diff]
type = DifferencePostprocessor
value1 = min_Vy_side
value2 = min_Vy_side_output
[]
[max_p_side]
type = NekSideExtremeValue
field = pressure
value_type = max
boundary = '1'
[]
[max_p_side_output]
type = NodalExtremeValue
variable = P
value_type = max
boundary = '1'
[]
[min_p_side_diff]
type = DifferencePostprocessor
value1 = min_p_side
value2 = min_p_side_output
[]
[min_p_side]
type = NekSideExtremeValue
field = pressure
value_type = min
boundary = '1'
[]
[min_p_side_output]
type = NodalExtremeValue
variable = P
value_type = min
boundary = '1'
[]
[max_p_side_diff]
type = DifferencePostprocessor
value1 = max_p_side
value2 = max_p_side_output
[]
[avg_p]
type = NekVolumeAverage
field = pressure
[]
[avg_p_output]
type = ElementAverageValue
variable = P
[]
[avg_p_diff]
type = DifferencePostprocessor
value1 = avg_p
value2 = avg_p_output
[]
[avg_Vx]
type = NekVolumeAverage
field = velocity_x
[]
[avg_Vx_output]
type = ElementAverageValue
variable = vel_x
[]
[avg_Vx_diff]
type = DifferencePostprocessor
value1 = avg_Vx
value2 = avg_Vx_output
[]
[avg_Vy]
type = NekVolumeAverage
field = velocity_y
[]
[avg_Vy_output]
type = ElementAverageValue
variable = vel_y
[]
[avg_Vy_diff]
type = DifferencePostprocessor
value1 = avg_Vy
value2 = avg_Vy_output
[]
[avg_Vx_side]
type = NekSideAverage
field = velocity_x
boundary = '1'
[]
[avg_Vx_side_output]
type = SideAverageValue
variable = vel_x
boundary = '1'
[]
[avg_Vx_side_diff]
type = DifferencePostprocessor
value1 = avg_Vx_side
value2 = avg_Vx_side_output
[]
[avg_Vy_side]
type = NekSideAverage
field = velocity_y
boundary = '1'
[]
[avg_Vy_side_output]
type = SideAverageValue
variable = vel_y
boundary = '1'
[]
[avg_Vy_side_diff]
type = DifferencePostprocessor
value1 = avg_Vy_side
value2 = avg_Vy_side_output
[]
[avg_p_side]
type = NekSideAverage
field = pressure
boundary = '1'
[]
[avg_p_side_output]
type = SideAverageValue
variable = P
boundary = '1'
[]
[avg_p_side_diff]
type = DifferencePostprocessor
value1 = avg_p_side
value2 = avg_p_side_output
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = 'final'
hide = 'max_Vx_output min_Vx_output max_Vy_output min_Vy_output max_p_output min_p_output area_output volume_output max_Vx_side max_Vx_side_output max_Vy_side max_Vy_side_output max_p_side max_p_side_output min_Vx_side min_Vx_side_output min_Vy_side min_Vy_side_output min_p_side min_p_side_output avg_p avg_p_output avg_Vx avg_Vx_output avg_Vy avg_Vy_output avg_Vx_side avg_Vx_side_output avg_Vy_side avg_Vy_side_output avg_p_side avg_p_side_output max_Vx max_Vy max_p min_Vx min_Vy min_p area'
[]
(test/tests/cht/multi_cht/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSStandaloneProblem
casename = 'conj_ht'
output = 'temperature pressure scalar01'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[volume_nek_fluid]
type = NekVolumeIntegral
field = unity
mesh = fluid
[]
[volume_nek_solid]
type = NekVolumeIntegral
field = unity
mesh = solid
[]
[volume_nek_all]
type = NekVolumeIntegral
field = unity
mesh = all
[]
[volume_moose_fluid]
type = VolumePostprocessor
block = '0'
[]
[volume_moose_solid]
type = VolumePostprocessor
block = '1'
[]
[volume_moose_all]
type = VolumePostprocessor
[]
[int_T_nek_fluid]
type = NekVolumeIntegral
field = temperature
mesh = fluid
[]
[int_T_nek_solid]
type = NekVolumeIntegral
field = temperature
mesh = solid
[]
[int_T_nek_all]
type = NekVolumeIntegral
field = temperature
mesh = all
[]
[int_T_moose_fluid]
type = ElementIntegralVariablePostprocessor
variable = temp
block = '0'
[]
[int_T_moose_solid]
type = ElementIntegralVariablePostprocessor
variable = temp
block = '1'
[]
[int_T_moose_all]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[int_p_nek_fluid]
type = NekVolumeIntegral
field = pressure
mesh = fluid
[]
[int_p_nek_solid]
type = NekVolumeIntegral
field = pressure
mesh = solid
[]
[int_p_nek_all]
type = NekVolumeIntegral
field = pressure
mesh = all
[]
[int_p_moose_fluid]
type = ElementIntegralVariablePostprocessor
variable =P
block = '0'
[]
[int_p_moose_solid]
type = ElementIntegralVariablePostprocessor
variable = P
block = '1'
[]
[int_p_moose_all]
type = ElementIntegralVariablePostprocessor
variable = P
[]
[volume_avg_nek_fluid]
type = NekVolumeAverage
field = unity
mesh = fluid
[]
[volume_avg_nek_solid]
type = NekVolumeAverage
field = unity
mesh = solid
[]
[volume_avg_nek_all]
type = NekVolumeAverage
field = unity
mesh = all
[]
[avg_T_nek_fluid]
type = NekVolumeAverage
field = temperature
mesh = fluid
[]
[avg_T_nek_solid]
type = NekVolumeAverage
field = temperature
mesh = solid
[]
[avg_T_nek_all]
type = NekVolumeAverage
field = temperature
mesh = all
[]
[avg_T_moose_fluid]
type = ElementAverageValue
variable = temp
block = '0'
[]
[avg_T_moose_solid]
type = ElementAverageValue
variable = temp
block = '1'
[]
[avg_T_moose_all]
type = ElementAverageValue
variable = temp
[]
[avg_p_nek_fluid]
type = NekVolumeAverage
field = pressure
mesh = fluid
[]
[avg_p_nek_solid]
type = NekVolumeAverage
field = pressure
mesh = solid
[]
[avg_p_nek_all]
type = NekVolumeAverage
field = pressure
mesh = all
[]
[avg_p_moose_fluid]
type = ElementAverageValue
variable = P
block = '0'
[]
[avg_p_moose_solid]
type = ElementAverageValue
variable = P
block = '1'
[]
[avg_p_moose_all]
type = ElementAverageValue
variable = P
[]
[max_T_nek_fluid]
type = NekVolumeExtremeValue
field = temperature
mesh = fluid
[]
[max_T_nek_solid]
type = NekVolumeExtremeValue
field = temperature
mesh = solid
[]
[max_T_nek_all]
type = NekVolumeExtremeValue
field = temperature
mesh = all
[]
[max_T_moose_fluid]
type = NodalExtremeValue
variable = temp
block = '0'
[]
[max_T_moose_solid]
type = NodalExtremeValue
variable = temp
block = '1'
[]
[max_T_moose_all]
type = NodalExtremeValue
variable = temp
[]
[min_T_nek_fluid]
type = NekVolumeExtremeValue
field = temperature
value_type = min
mesh = fluid
[]
[min_T_nek_solid]
type = NekVolumeExtremeValue
field = temperature
value_type = min
mesh = solid
[]
[min_T_nek_all]
type = NekVolumeExtremeValue
field = temperature
value_type = min
mesh = all
[]
[min_T_moose_fluid]
type = NodalExtremeValue
variable = temp
value_type = min
block = '0'
[]
[min_T_moose_solid]
type = NodalExtremeValue
variable = temp
value_type = min
block = '1'
[]
[min_T_moose_all]
type = NodalExtremeValue
variable = temp
value_type = min
[]
# we include these to show that the extrema postprocessors do properly fetch the true max/min
# when the max/min is in either the solid or the fluid domain
[min_q_nek_fluid]
type = NekVolumeExtremeValue
field = scalar01
value_type = min
mesh = fluid
[]
[min_q_nek_solid]
type = NekVolumeExtremeValue
field = scalar01
value_type = min
mesh = solid
[]
[min_q_nek_all]
type = NekVolumeExtremeValue
field = scalar01
value_type = min
mesh = all
[]
[min_q_moose_fluid]
type = NodalExtremeValue
variable = scalar01
value_type = min
block = '0'
[]
[min_q_moose_solid]
type = NodalExtremeValue
variable = scalar01
value_type = min
block = '1'
[]
[min_q_moose_all]
type = NodalExtremeValue
variable = scalar01
value_type = min
[]
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/userobjects/layered_layered/nek.i)
[Problem]
type = NekRSStandaloneProblem
casename = 'brick'
output = 'pressure'
nondimensional = true
L_ref = 2.0
U_ref = 1.0
rho_0 = 834.5
Cp_0 = 1228.0
T_ref = 573.0
dT_ref = 10.0
[]
[Mesh]
type = NekRSMesh
volume = true
scaling = 2.0
[]
[AuxVariables]
[bin_volumes]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[total_volume]
family = MONOMIAL
order = CONSTANT
[]
[total_average_p]
family = MONOMIAL
order = CONSTANT
[]
# just for visualization of the binning
[x_bins]
family = MONOMIAL
order = CONSTANT
[]
[y_bins]
family = MONOMIAL
order = CONSTANT
[]
[z_bins]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
# just for visualization of the binning
[x_bins]
type = SpatialUserObjectAux
variable = x_bins
user_object = x_bins
execute_on = INITIAL
[]
[y_bins]
type = SpatialUserObjectAux
variable = y_bins
user_object = y_bins
execute_on = INITIAL
[]
[z_bins]
type = SpatialUserObjectAux
variable = z_bins
user_object = z_bins
execute_on = INITIAL
[]
[bin_volumes]
type = SpatialUserObjectAux
variable = bin_volumes
user_object = vol_integral
execute_on = 'INITIAL TIMESTEP_END'
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_volume]
type = SpatialUserObjectAux
variable = total_volume
user_object = reference_vol_integral
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_average_p]
type = SpatialUserObjectAux
variable = total_average_p
user_object = reference_pressure_avg
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[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
[]
[]
[Postprocessors]
# we compare the integral (with a single bin) with an already-verified postprocessor
# to make sure the actual internals of the binned volume integral are done correctly
[volume_ref] # should match the value in 'total_volume' (computed with 1 bin)
type = NekVolumeIntegral
field = unity
[]
[avg_p_ref] # should match the value in 'total_average_p' (computed with 1 bin)
type = NekVolumeAverage
field = pressure
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/cht/nondimensional/nek.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
# This input is run in nondimensional form to verify that all the postprocessors
# and data transfers in/out of nekRS are properly dimensionalized.
nondimensional = true
U_ref = 0.0950466
T_ref = 628.15
dT_ref = 50.0
L_ref = 0.908e-2
rho_0 = 834.5
Cp_0 = 1228.0
[]
[Mesh]
type = NekRSMesh
boundary = '1'
# nekRS runs in non-dimensional form, which means that we shrunk the mesh
# from physical units of meters to our characteristic scale of 0.908e-2 m
# (the pin pitch, arbitrarily chosen). That means that we must multiply
# the nekRS mesh by 0.908e-2 to get back in units of meters that BISON is
# running in.
scaling = 0.908e-2
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[synchronization_in]
type = Receiver
[]
# side integral
[area_1]
type = NekSideIntegral
field = unity
boundary = '1'
[]
[pressure_1]
type = NekSideIntegral
field = pressure
boundary = '1'
[]
[temperature_1]
type = NekSideIntegral
field = temperature
boundary = '1'
[]
# side average
[avg_area_1]
type = NekSideAverage
field = unity
boundary = '1'
[]
[avg_pressure_1]
type = NekSideAverage
field = pressure
boundary = '1'
[]
[avg_temperature_1]
type = NekSideAverage
field = temperature
boundary = '1'
[]
# volume integral
[volume]
type = NekVolumeIntegral
field = unity
[]
[pressure_vol]
type = NekVolumeIntegral
field = pressure
[]
[temperature_vol]
type = NekVolumeIntegral
field = temperature
[]
# volume average
[avg_volume]
type = NekVolumeAverage
field = unity
[]
[avg_pressure_vol]
type = NekVolumeAverage
field = pressure
[]
[avg_temperature_vol]
type = NekVolumeAverage
field = temperature
[]
# heat flux integral
[nek_flux]
type = NekHeatFluxIntegral
boundary = '1'
[]
# mass flux weighted integral
[inlet_mdot]
type = NekMassFluxWeightedSideIntegral
field = unity
boundary = '3'
execute_on = initial
[]
[outlet_T]
type = NekMassFluxWeightedSideIntegral
field = temperature
boundary = '4'
[]
[inlet_P]
type = NekMassFluxWeightedSideIntegral
field = pressure
boundary = '4'
[]
# mass flux weighted integral
[inlet_mdot_avg]
type = NekMassFluxWeightedSideAverage
field = unity
boundary = '3'
execute_on = initial
[]
[outlet_T_avg]
type = NekMassFluxWeightedSideAverage
field = temperature
boundary = '4'
[]
[inlet_P_avg]
type = NekMassFluxWeightedSideAverage
field = pressure
boundary = '4'
[]
# extreme value postprocessors - VOLUME
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[max_p]
type = NekVolumeExtremeValue
field = pressure
value_type = max
[]
[min_p]
type = NekVolumeExtremeValue
field = pressure
value_type = min
[]
[max_1]
type = NekVolumeExtremeValue
field = unity
value_type = max
[]
[min_1]
type = NekVolumeExtremeValue
field = unity
value_type = min
[]
# extreme value postprocessors - SIDE
[max_T_out]
type = NekSideExtremeValue
field = temperature
boundary = '4'
value_type = max
[]
[min_T_out]
type = NekSideExtremeValue
field = temperature
boundary = '4'
value_type = min
[]
[max_p_in]
type = NekSideExtremeValue
field = pressure
boundary = '3'
value_type = max
[]
[min_p_in]
type = NekSideExtremeValue
field = pressure
boundary = '3'
value_type = min
[]
[max_1_in]
type = NekSideExtremeValue
field = unity
boundary = '3'
value_type = max
[]
[min_1_in]
type = NekSideExtremeValue
field = unity
boundary = '3'
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[screen]
type = Console
hide = 'synchronization_in'
[]
[]
(test/tests/postprocessors/nek_volume_integral/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
[out]
type = CSV
hide = 'source_integral'
execute_on = 'final'
[]
[]
[Postprocessors]
[volume]
type = NekVolumeIntegral
field = unity
[]
[temp_integral]
type = NekVolumeIntegral
field = temperature
[]
[pressure_integral]
type = NekVolumeIntegral
field = pressure
[]
[velocity_integral]
type = NekVolumeIntegral
field = velocity
[]
[velocity_component]
type = NekVolumeIntegral
field = velocity_component
velocity_direction = '0.1 0.2 0.3'
[]
[]
(test/tests/cht/sfr_pincell/nek.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
synchronization_interval = parent_app
# we only technically need one scratch space slot for this problem,
# so we can skip allocating extra
n_usrwrk_slots = 1
[]
[Mesh]
type = NekRSMesh
boundary = '1'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[nek_flux]
type = NekHeatFluxIntegral
boundary = '1'
[]
[average_inlet_T]
type = NekSideAverage
field = temperature
boundary = '3'
execute_on = initial
[]
[average_outlet_T]
type = NekSideAverage
field = temperature
boundary = '4'
[]
[dT]
type = DifferencePostprocessor
value1 = average_outlet_T
value2 = average_inlet_T
[]
[inlet_mdot]
type = NekMassFluxWeightedSideIntegral
field = unity
boundary = '3'
execute_on = initial
[]
# postprocessors for comparing against non-dimensional version in ../nondimensional
# --> uncomment in order to get the reference values that the nondimensional boundary coupling
# was verified against
#
# # side integral
# [area_1]
# type = NekSideIntegral
# field = unity
# boundary = '1'
# []
# [pressure_1]
# type = NekSideIntegral
# field = pressure
# boundary = '1'
# []
# [temperature_1]
# type = NekSideIntegral
# field = temperature
# boundary = '1'
# []
# # side average
# [avg_area_1]
# type = NekSideAverage
# field = unity
# boundary = '1'
# []
# [avg_pressure_1]
# type = NekSideAverage
# field = pressure
# boundary = '1'
# []
# [avg_temperature_1]
# type = NekSideAverage
# field = temperature
# boundary = '1'
# []
# # volume integral
# [volume]
# type = NekVolumeIntegral
# field = unity
# []
# [pressure_vol]
# type = NekVolumeIntegral
# field = pressure
# []
# [temperature_vol]
# type = NekVolumeIntegral
# field = temperature
# []
# # volume average
# [avg_volume]
# type = NekVolumeAverage
# field = unity
# []
# [avg_pressure_vol]
# type = NekVolumeAverage
# field = pressure
# []
# [avg_temperature_vol]
# type = NekVolumeAverage
# field = temperature
# []
# # heat flux integral
# [nek_flux]
# type = NekHeatFluxIntegral
# boundary = '1'
# []
# # mass flux weighted integral
# [inlet_mdot]
# type = NekMassFluxWeightedSideIntegral
# field = unity
# boundary = '3'
# execute_on = initial
# []
# [outlet_T]
# type = NekMassFluxWeightedSideIntegral
# field = temperature
# boundary = '4'
# []
# [inlet_P]
# type = NekMassFluxWeightedSideIntegral
# field = pressure
# boundary = '4'
# []
# # mass flux weighted integral
# [inlet_mdot_avg]
# type = NekMassFluxWeightedSideAverage
# field = unity
# boundary = '3'
# execute_on = initial
# []
# [outlet_T_avg]
# type = NekMassFluxWeightedSideAverage
# field = temperature
# boundary = '4'
# []
# [inlet_P_avg]
# type = NekMassFluxWeightedSideAverage
# field = pressure
# boundary = '4'
# []
# # extreme value postprocessors - VOLUME
# [max_T]
# type = NekVolumeExtremeValue
# field = temperature
# value_type = max
# []
# [min_T]
# type = NekVolumeExtremeValue
# field = temperature
# value_type = min
# []
# [max_p]
# type = NekVolumeExtremeValue
# field = pressure
# value_type = max
# []
# [min_p]
# type = NekVolumeExtremeValue
# field = pressure
# value_type = min
# []
# [max_1]
# type = NekVolumeExtremeValue
# field = unity
# value_type = max
# []
# [min_1]
# type = NekVolumeExtremeValue
# field = unity
# value_type = min
# []
# # extreme value postprocessors - SIDE
# [max_T_out]
# type = NekSideExtremeValue
# field = temperature
# boundary = '4'
# value_type = max
# []
# [min_T_out]
# type = NekSideExtremeValue
# field = temperature
# boundary = '4'
# value_type = min
# []
# [max_p_in]
# type = NekSideExtremeValue
# field = pressure
# boundary = '3'
# value_type = max
# []
# [min_p_in]
# type = NekSideExtremeValue
# field = pressure
# boundary = '3'
# value_type = min
# []
# [max_1_in]
# type = NekSideExtremeValue
# field = unity
# boundary = '3'
# value_type = max
# []
# [min_1_in]
# type = NekSideExtremeValue
# field = unity
# boundary = '3'
# value_type = min
# []
[]
[Outputs]
exodus = true
execute_on = 'final'
csv = true
[screen]
type = Console
hide = 'average_inlet_T average_outlet_T transfer_in'
[]
[]
(include/postprocessors/NekVolumeAverage.h)
/********************************************************************/
/* SOFTWARE COPYRIGHT NOTIFICATION */
/* Cardinal */
/* */
/* (c) 2021 UChicago Argonne, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by UChicago Argonne, LLC */
/* Under Contract No. DE-AC02-06CH11357 */
/* With the U. S. Department of Energy */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See LICENSE for full restrictions */
/********************************************************************/
#pragma once
#include "NekVolumeIntegral.h"
/**
* Compute the average of a specified quantity over the volume of
* the nekRS mesh, \f$\frac{\int_\Omega f d\Omega}{\int_\Omega d\Omega}\f$,
* where \f$f\f$ is the field to be integrated, and \f$\Omega\f$ is the volume.
*
* Note that this calculation is done directly on the mesh that nekRS solves on,
* _not_ the mesh created for solution transfer in NekRSMesh.
*/
class NekVolumeAverage : public NekVolumeIntegral
{
public:
static InputParameters validParams();
NekVolumeAverage(const InputParameters & parameters);
virtual Real getValue() const override;
};