- directionDirection in which to send data
C++ Type:MooseEnum
Controllable:No
Description:Direction in which to send data
NekFieldVariable
Description
NekFieldVariable is a FieldTransfer that sends a field variable between NekRS and MOOSE. A field variable is any of the solution fields computed by NekRS, such as temperature, pressure, velocity, and other passive scalars. First, this object creates an AuxVariable using the name of the object; this variable will hold the variable which NekRS reads (for direction = to_nek) or will be written by NekRS (for direction = from_nek). If not provided, the name of the auxiliary variable will be taken as the name of the object, if it can be matched to one of the enumerations for the field.
For direction = from_nek, this class provides an extremely useful manner to obtain the NekRS solution field in MOOSE. For instance, Figure 1 shows the velocity from the NekRS field files (left) and interpolated onto a second-order mesh mirror (right) using a NekFieldVariable. Because this particular example runs NekRS in a higher order than can be represented on a second-order mesh mirror, the interpolated velocity is clearly not an exact representation of the NekRS solution - only an interpolated version of the NekRS solution.

Figure 1: Velocity from the NekRS field files (left) and after interpolation onto a second order mesh mirror (right).
Example Input File Syntax
The following input sections will interpolate the NekRS pressure, velocity, and temperature for the lowMach NekRS example onto a second order representation of the NekRS mesh.
[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
type = NekRSProblem
casename<<<{"description": "Case name for the NekRS input files; this is <case> in <case>.par, <case>.udf, <case>.oudf, and <case>.re2."}>>> = 'lowMach'
[FieldTransfers<<<{"href": "../../syntax/Problem/FieldTransfers/index.html"}>>>]
[temp]
type = NekFieldVariable<<<{"description": "Reads/writes volumetric field data between NekRS and MOOSE."}>>>
direction<<<{"description": "Direction in which to send data"}>>> = from_nek
field<<<{"description": "NekRS field variable to read/write; defaults to the name of the object"}>>> = temperature
[]
[P]
type = NekFieldVariable<<<{"description": "Reads/writes volumetric field data between NekRS and MOOSE."}>>>
direction<<<{"description": "Direction in which to send data"}>>> = from_nek
field<<<{"description": "NekRS field variable to read/write; defaults to the name of the object"}>>> = pressure
[]
[vel_x]
type = NekFieldVariable<<<{"description": "Reads/writes volumetric field data between NekRS and MOOSE."}>>>
direction<<<{"description": "Direction in which to send data"}>>> = from_nek
field<<<{"description": "NekRS field variable to read/write; defaults to the name of the object"}>>> = velocity_x
[]
[vel_y]
type = NekFieldVariable<<<{"description": "Reads/writes volumetric field data between NekRS and MOOSE."}>>>
direction<<<{"description": "Direction in which to send data"}>>> = from_nek
field<<<{"description": "NekRS field variable to read/write; defaults to the name of the object"}>>> = velocity_y
[]
[vel_z]
type = NekFieldVariable<<<{"description": "Reads/writes volumetric field data between NekRS and MOOSE."}>>>
direction<<<{"description": "Direction in which to send data"}>>> = from_nek
field<<<{"description": "NekRS field variable to read/write; defaults to the name of the object"}>>> = velocity_z
[]
[]
[](test/tests/nek_standalone/lowMach/nek.i)Then, the output format specified in the [Output] block will be used. Here, the NekRS solution is projected onto an Exodus mesh.
[Outputs]
exodus = true
[]For instance, Figure 2 shows the pressure from the NekRS field files (left) and interpolated onto a second-order mesh mirror (right). Because this particular example runs NekRS in a higher order than can be represented on a second-order mesh mirror, the interpolated pressure is clearly not an exact representation of the NekRS solution - only an interpolated version of the NekRS solution.

Figure 2: Pressure from the NekRS field files (left) and after interpolation onto a second order mesh mirror (right).
Input Parameters
- fieldNekRS field variable to read/write; defaults to the name of the object
C++ Type:MooseEnum
Options:velocity_x, velocity_y, velocity_z, velocity, velocity_component, velocity_x_squared, velocity_y_squared, velocity_z_squared, temperature, pressure, scalar01, scalar02, scalar03, unity, usrwrk00, usrwrk01, usrwrk02
Controllable:No
Description:NekRS field variable to read/write; defaults to the name of the object
- usrwrk_slotWhen 'direction = to_nek', the slot(s) in the usrwrk array to write the incoming data; provide one entry for each quantity being passed
C++ Type:std::vector<unsigned int>
Controllable:No
Description:When 'direction = to_nek', the slot(s) in the usrwrk array to write the incoming data; provide one entry for each quantity being passed
Optional 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:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (tutorials/fhr_reflector/cht/nek.i)
- (test/tests/userobjects/hexagonal_gap_layered/nek.i)
- (test/tests/nek_temp/first_order/nek_volume.i)
- (test/tests/nek_temp/exact/exact_volume.i)
- (test/tests/cht/multi_cht/nek.i)
- (test/tests/transfers/nek_temperature/volume/nek.i)
- (test/tests/conduction/boundary_and_volume/prism/nek.i)
- (test/tests/postprocessors/nek_pressure_surface_force/nek_nondimensional.i)
- (test/tests/userobjects/sideset_layered/side_average.i)
- (test/tests/nek_standalone/ktauChannel/nek.i)
- (test/tests/nek_stochastic/nek_multi.i)
- (test/tests/nek_stochastic/read/read.i)
- (tutorials/pebble_cht/nek.i)
- (test/tests/nek_temp/exact/exact.i)
- (test/tests/conduction/nonidentical_volume/nondimensional/nek.i)
- (tutorials/gas_compact_multiphysics/nek.i)
- (test/tests/nek_temp/first_order/nek.i)
- (test/tests/conduction/identical_interface/cube/nek.i)
- (test/tests/userobjects/volume/dimensional/nek.i)
- (test/tests/userobjects/layered_layered/nek.i)
- (test/tests/conduction/nonidentical_interface/cylinders/nek_mini.i)
- (test/tests/userobjects/gap/nondimensional/nek.i)
- (test/tests/cht/sfr_pincell/nek_isolated.i)
- (test/tests/nek_standalone/lowMach/nek.i)
- (tutorials/pincell_multiphysics/nek.i)
- (test/tests/nek_output/velocity.i)
- (tutorials/sfr_7pin/nek.i)
- (tutorials/nek_stochastic/nek.i)
- (test/tests/deformation/mesh-velocity-areas/nek.i)
- (test/tests/userobjects/hexagonal_gap_layered/normals/nek.i)
- (test/tests/userobjects/interval/nek_synchronization.i)
- (tutorials/subchannel/nek.i)
- (test/tests/nek_errors/deformation/user/nek.i)
- (tutorials/sfr_7pin/nek_fluxflux.i)
- (test/tests/cht/sfr_pincell/nek.i)
- (test/tests/userobjects/side/dimensional/nek.i)
- (test/tests/userobjects/side/nondimensional/nek.i)
- (test/tests/userobjects/gap/dimensional/nek.i)
- (test/tests/userobjects/subchannel_layered/user_component.i)
- (test/tests/nek_output/nek.i)
- (test/tests/userobjects/hexagonal_gap_layered/nek_axial.i)
- (test/tests/conduction/boundary_and_volume/prism/nek_exact.i)
- (test/tests/nek_standalone/channel/nek.i)
- (test/tests/deformation/simple-cube/nek.i)
- (tutorials/pebble_67/nek.i)
- (test/tests/conduction/zero_flux/nek.i)
- (test/tests/conduction/identical_volume/cube/nek.i)
- (test/tests/cht/pebble/shift/nek.i)
- (tutorials/load_from_exodus/nek.i)
- (test/tests/cht/nondimensional/nek_exact.i)
- (tutorials/turbulence/inlet_outlet/nek.i)
- (test/tests/nek_errors/invalid_field/nonlinear.i)
- (test/tests/multiple_nek_apps/two_channels/nek.i)
- (test/tests/nek_temp/second_order/nek_volume.i)
- (test/tests/cht/sfr_pincell/nek_vpp.i)
- (test/tests/cht/pincell_p_v/nek.i)
- (tutorials/sfr_7pin/nek_vpp.i)
- (test/tests/deformation/vol-areas/nek.i)
- (test/tests/conduction/zero_flux/nek_vpp.i)
- (test/tests/userobjects/hexagonal_gap_layered/normals/nek_axial.i)
- (test/tests/nek_standalone/ethier/nek.i)
- (tutorials/fhr_reflector/conduction/nek.i)
- (tutorials/msfr/nek.i)
- (test/tests/cht/pebble/nek.i)
- (test/tests/nek_standalone/lowMach/nek_boundary.i)
- (test/tests/conduction/nonidentical_interface/cylinders/nek_exact.i)
- (tutorials/standalone/nek.i)
- (test/tests/nek_errors/invalid_field/auxvar.i)
- (test/tests/conduction/reverse_cht/nek.i)
- (test/tests/cht/nondimensional/nek.i)
- (test/tests/transfers/nek_temperature/temp.i)
- (test/tests/nek_stochastic/quiet_init/nek_multi.i)
- (test/tests/conduction/nonidentical_interface/cylinders/nek.i)
- (test/tests/userobjects/hexagonal_gap_layered/user_component.i)
- (test/tests/nek_temp/second_order/nek.i)
- (test/tests/conduction/nonidentical_volume/cylinder/nek.i)
- (test/tests/conduction/nonidentical_volume/cylinder/nek_exact.i)
- (test/tests/transfers/nek_temperature/nek.i)
- (test/tests/nek_stochastic/shift/nek.i)
- (test/tests/conduction/zero_flux/nek_disjoint.i)
- (tutorials/gas_compact_cht/nek.i)
- (tutorials/turbulence/periodic/nek.i)
- (test/tests/nek_output/bad_name.i)
- (test/tests/userobjects/volume/nondimensional/nek.i)
- (test/tests/postprocessors/nek_pressure_surface_force/nek.i)
- (test/tests/conduction/identical_interface/pyramid/nek.i)
(test/tests/nek_standalone/lowMach/nek.i)
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'lowMach'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[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'
[]
(tutorials/fhr_reflector/cht/nek.i)
fluid_solid_interface = '1 2 7'
[Mesh]
type = NekRSMesh
boundary = ${fluid_solid_interface}
scaling = 0.006
[]
[Problem]
type = NekRSProblem
casename = 'fluid'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[Dimensionalize]
U = 0.0575
T = 923.15
dT = 10.0
L = 0.006
rho = 1962.13
Cp = 2416.0
[]
[]
[Executioner]
type = Transient
timestep_tolerance = 1e-9
[./TimeStepper]
type = NekTimeStepper
[../]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[boundary_flux]
type = NekHeatFluxIntegral
boundary = ${fluid_solid_interface}
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[pressure_in]
type = NekSideAverage
field = pressure
boundary = '5'
[]
[mdot_in]
type = NekMassFluxWeightedSideIntegral
field = unity
boundary = '5'
[]
[mdot_out]
type = NekMassFluxWeightedSideIntegral
field = unity
boundary = '6'
[]
[]
(test/tests/userobjects/hexagonal_gap_layered/nek.i)
gap_thickness = ${fparse 0.05 * 7.646e-3}
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[AuxVariables]
[gap_bins]
family = MONOMIAL
order = CONSTANT
[]
[avg_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[gap_bins]
type = SpatialUserObjectAux
variable = gap_bins
user_object = subchannel_binning
[]
[avg_temp]
type = SpatialUserObjectAux
variable = avg_temp
user_object = gap_avg
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelGapBin
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
[]
[gap_avg]
type = NekBinnedPlaneAverage
bins = 'subchannel_binning axial_binning'
field = temperature
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[gap_area]
type = NekBinnedPlaneIntegral
bins = 'subchannel_binning axial_binning'
field = unity
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = gap_avg
to_multi_app = subchannel
variable = gap_avg
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = gap_area
to_multi_app = subchannel
variable = gap_area
[]
[temp_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
variable = temp
source_variable = temp
[]
[]
[VectorPostprocessors]
[avg_temp]
type = SpatialUserObjectVectorPostprocessor
userobject = gap_avg
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/nek_temp/first_order/nek_volume.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = FIRST
volume = true
[]
[AuxVariables]
[analytic]
[]
[error_temp]
order = CONSTANT
family = MONOMIAL
[]
[difference]
[]
[]
[ICs]
[analytic]
type = FunctionIC
variable = analytic
function = analytic
[]
[]
[AuxKernels]
[error_temp]
type = ElementL2ErrorFunctionAux
variable = error_temp
coupled_variable = temp
function = analytic
[]
[difference]
type = ParsedAux
variable = difference
coupled_variables = 'analytic temp'
expression = 'temp-analytic'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'exp(x)+sin(y)+x*y*z'
[]
[]
[Postprocessors]
[l2_error_in_nek_temp]
type = ElementL2Error
variable = temp
function = analytic
[]
[max_diff]
type = NodalExtremeValue
variable = difference
value_type = max
[]
[min_diff]
type = NodalExtremeValue
variable = difference
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/nek_temp/exact/exact_volume.i)
[Problem]
type = NekRSProblem
casename = 'brick'
[FieldTransfers]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
exact = true
volume = true
[]
[AuxVariables]
[analytic]
[]
[error_temp]
order = CONSTANT
family = MONOMIAL
[]
[difference]
[]
[]
[ICs]
[analytic]
type = FunctionIC
variable = analytic
function = analytic
[]
[]
[AuxKernels]
[error_temp]
type = ElementL2ErrorFunctionAux
variable = error_temp
coupled_variable = temp
function = analytic
[]
[difference]
type = ParsedAux
variable = difference
coupled_variables = 'analytic temp'
expression = 'temp-analytic'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'exp(x)+sin(y)+x*y*z'
[]
[]
[Postprocessors]
[l2_error_in_nek_temp]
type = ElementL2Error
variable = temp
function = analytic
[]
[max_diff]
type = NodalExtremeValue
variable = difference
value_type = max
[]
[min_diff]
type = NodalExtremeValue
variable = difference
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
hide = 'difference error_temp analytic'
[]
(test/tests/cht/multi_cht/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'conj_ht'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[scalar01]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[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/transfers/nek_temperature/volume/nek.i)
dTv = 10
Tv = 5
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 1
[FieldTransfers]
[temperature]
type = NekFieldVariable
direction = to_nek
usrwrk_slot = 0
[]
[nek_temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[Dimensionalize]
dT = ${dTv}
T = ${Tv}
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[ICs]
[tv]
type = FunctionIC
variable = temperature
function = tv
[]
[]
[Functions]
[tv] # temperature, dimensional
type = ParsedFunction
expression = 'sin(x)'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[]
[]
[AuxVariables]
[d]
[]
[]
[AuxKernels]
[d]
type = ParsedAux
variable = d
expression = 'nek_temp - temperature'
coupled_variables = 'nek_temp temperature'
[]
[]
[Postprocessors]
[max_error]
type = ElementExtremeValue
variable = d
[]
[]
[Outputs]
csv = true
[]
(test/tests/conduction/boundary_and_volume/prism/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 2
[FieldTransfers]
[flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[heat_source]
type = NekVolumetricSource
usrwrk_slot = 1
direction = to_nek
postprocessor_to_conserve = source_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
boundary = '2'
order = FIRST
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[avg_T_volume]
type = NekVolumeAverage
field = temperature
[]
[heat_flux]
type = NekHeatFluxIntegral
boundary = '2'
[]
[nek_min_1]
type = NekSideExtremeValue
field = temperature
boundary = '3'
value_type = min
[]
[nek_min_2]
type = NekSideExtremeValue
field = temperature
boundary = '4'
value_type = min
[]
[nek_min_3]
type = NekSideExtremeValue
field = temperature
boundary = '5'
value_type = min
[]
[nek_min_4]
type = NekSideExtremeValue
field = temperature
boundary = '6'
value_type = min
[]
[nek_max_1]
type = NekSideExtremeValue
field = temperature
boundary = '3'
[]
[nek_max_2]
type = NekSideExtremeValue
field = temperature
boundary = '4'
[]
[nek_max_3]
type = NekSideExtremeValue
field = temperature
boundary = '5'
[]
[nek_max_4]
type = NekSideExtremeValue
field = temperature
boundary = '6'
[]
[]
[Outputs]
exodus = true
time_step_interval = 30
hide = 'flux_integral source_integral'
[]
(test/tests/postprocessors/nek_pressure_surface_force/nek_nondimensional.i)
[Problem]
type = NekRSProblem
casename = 'brick'
[Dimensionalize]
L = 0.5
U = 0.9
rho = 0.8
[]
[FieldTransfers]
[P]
type = NekFieldVariable
field = pressure
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
scaling = 0.5
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
csv = true
[]
[Postprocessors]
[pressure_x]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'x'
mesh = 'fluid'
[]
[pressure_y]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'y'
mesh = 'fluid'
[]
[pressure_z]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'z'
mesh = 'fluid'
[]
# These are added to compare by hand
[pressure_x_3]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '3'
[]
[pressure_x_4]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '4'
[]
[pressure_x_comp]
type = DifferencePostprocessor
value1 = pressure_x_3
value2 = pressure_x_4
[]
[pressure_y_1]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '1'
[]
[pressure_y_2]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '2'
[]
[pressure_y_comp]
type = DifferencePostprocessor
value1 = pressure_y_1
value2 = pressure_y_2
[]
[pressure_z_6]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '6'
[]
[pressure_z_5]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '5'
[]
[pressure_z_comp]
type = DifferencePostprocessor
value1 = pressure_z_6
value2 = pressure_z_5
[]
[]
(test/tests/userobjects/sideset_layered/side_average.i)
[GlobalParams]
map_space_by_qp = true
check_boundary_restricted = false
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[]
[AuxVariables]
[avg_T_duct_wall]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[avg_T_duct_wall]
type = SpatialUserObjectAux
variable = avg_T_duct_wall
user_object = avg_T_duct_wall
boundary = '2'
[]
[]
[UserObjects]
[x]
type = LayeredBin
direction = x
num_layers = 2
[]
[y]
type = LayeredBin
direction = y
num_layers = 2
[]
[z]
type = LayeredBin
direction = z
num_layers = 3
[]
[avg_T_duct_wall]
type = NekBinnedSideAverage
bins = 'x y z'
field = temperature
boundary = '2'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[VectorPostprocessors]
[temp_duct]
type = SpatialUserObjectVectorPostprocessor
userobject = avg_T_duct_wall
[]
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/nek_standalone/ktauChannel/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'channel'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
[]
[T_at_point]
type = PointValue
variable = temp
point = '4.0 -0.5 0.0'
[]
[pct_change]
type = PercentChangePostprocessor
postprocessor = max_T
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
direction = x
variable = P
num_layers = 4
[]
[]
[AuxVariables]
[layered_p]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[layered_p]
type = SpatialUserObjectAux
variable = layered_p
user_object = layered_average
[]
[]
(test/tests/nek_stochastic/nek_multi.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'ethier'
n_usrwrk_slots = 2
[FieldTransfers]
[scalar02]
type = NekFieldVariable
direction = from_nek
[]
[]
[ScalarTransfers]
[scalar1]
type = NekScalarValue
direction = to_nek
usrwrk_slot = 0
output_postprocessor = s1
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[s1]
type = Receiver
[]
# we use the stochastic value to set the scalar (in the .udf files). Here,
# we are checking that the value of the scalar everywhere is equation to the 's1' postprocessor
[max_scalar]
type = ElementExtremeValue
variable = scalar02
value_type = max
[]
[min_scalar]
type = ElementExtremeValue
variable = scalar02
value_type = min
[]
[]
[Outputs]
csv = true
[]
(test/tests/nek_stochastic/read/read.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'read'
[FieldTransfers]
[scalar02]
type = NekFieldVariable
direction = from_nek
field = scalar02
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_scalar]
type = ElementExtremeValue
variable = scalar02
value_type = max
[]
[min_scalar]
type = ElementExtremeValue
variable = scalar02
value_type = min
[]
[]
[Outputs]
csv = true
[]
(tutorials/pebble_cht/nek.i)
[Mesh]
type = NekRSMesh
# This is the boundary we are coupling via conjugate heat transfer to MOOSE
boundary = '3'
[]
[Problem]
type = NekRSProblem
casename = 'pebble'
n_usrwrk_slots = 1
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[UserObjects]
[layered_bin]
type = LayeredBin
num_layers = 5
direction = z
[]
[wall_temp]
type = NekBinnedSideAverage
bins = 'layered_bin'
boundary = '3'
field = temperature
map_space_by_qp = true
interval = 10
[]
[bulk_temp]
type = NekBinnedVolumeAverage
bins = 'layered_bin'
field = temperature
map_space_by_qp = true
interval = 10
[]
[]
[VectorPostprocessors]
[wall]
type = SpatialUserObjectVectorPostprocessor
userobject = wall_temp
[]
[bulk]
type = SpatialUserObjectVectorPostprocessor
userobject = bulk_temp
[]
[]
[Outputs]
exodus = true
csv = true
interval = 10
hide = 'flux_integral'
[]
(test/tests/nek_temp/exact/exact.i)
[Problem]
type = NekRSProblem
casename = 'brick'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[]
[Mesh]
type = NekRSMesh
exact = true
boundary = '1'
[]
[AuxVariables]
[analytic]
[]
[error_temp]
order = CONSTANT
family = MONOMIAL
[]
[difference]
[]
[]
[ICs]
[analytic]
type = FunctionIC
variable = analytic
function = analytic
[]
[]
[AuxKernels]
[error_temp]
type = ElementL2ErrorFunctionAux
variable = error_temp
coupled_variable = temp
function = analytic
[]
[difference]
type = ParsedAux
variable = difference
coupled_variables = 'analytic temp'
expression = 'temp-analytic'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'exp(x)+sin(y)+x*y*z'
[]
[]
[Postprocessors]
[l2_error_in_nek_temp]
type = ElementL2Error
variable = temp
function = analytic
[]
[max_diff]
type = NodalExtremeValue
variable = difference
value_type = max
[]
[min_diff]
type = NodalExtremeValue
variable = difference
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
hide = 'difference error_temp analytic'
[]
(test/tests/conduction/nonidentical_volume/nondimensional/nek.i)
[Problem]
type = NekRSProblem
casename = 'cylinder'
n_usrwrk_slots = 1
[Dimensionalize]
T = 500.0
dT = 50.0
rho = 5.0
Cp = 6.0
L = 0.5
U = 1.0
[]
[FieldTransfers]
[heat_source]
type = NekVolumetricSource
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = source_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[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'
[]
(tutorials/gas_compact_multiphysics/nek.i)
# copy-pasta from common_input.i
channel_diameter = 0.016 # diameter of the coolant channels (m)
height = 6.343 # height of the full core (m)
inlet_T = 598.0 # inlet fluid temperature (K)
power = 200e6 # full core power (W)
mdot = 117.3 # fluid mass flowrate (kg/s)
fluid_density = 5.5508 # fluid density (kg/m3)
fluid_Cp = 5189.0 # fluid isobaric specific heat (J/kg/K)
n_bundles = 12 # number of bundles in the full core
n_coolant_channels_per_block = 108 # number of coolant channels per assembly
unit_cell_height = 1.6 # unit cell height - arbitrarily selected
[Mesh]
type = NekRSMesh
boundary = '3'
volume = true
scaling = ${channel_diameter}
[]
[Problem]
type = NekRSProblem
casename = 'ranstube'
n_usrwrk_slots = 2
[Dimensionalize]
U = ${fparse mdot / (n_bundles * n_coolant_channels_per_block) / fluid_density / (pi * channel_diameter * channel_diameter / 4.0)}
T = ${inlet_T}
dT = ${fparse power / mdot / fluid_Cp * unit_cell_height / height}
L = ${channel_diameter}
rho = ${fluid_density}
Cp = ${fluid_Cp}
[]
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
synchronization_interval = parent_app
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[screen]
type = Console
hide = 'flux_integral transfer_in'
[]
[csv]
file_base = 'csv/nek'
type = CSV
[]
[]
[Postprocessors]
[inlet_T]
type = NekSideAverage
field = temperature
boundary = '1'
[]
[outlet_T]
type = NekSideAverage
field = temperature
boundary = '2'
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[]
(test/tests/nek_temp/first_order/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = FIRST
boundary = '1 2 3 4 5 6 7 8'
[]
[AuxVariables]
[analytic]
[]
[error_temp]
order = CONSTANT
family = MONOMIAL
[]
[difference]
[]
[avg_flux] # only here to avoid a re-gold; otherwise not necessary
[]
[]
[ICs]
[analytic]
type = FunctionIC
variable = analytic
function = analytic
[]
[]
[AuxKernels]
[error_temp]
type = ElementL2ErrorFunctionAux
variable = error_temp
coupled_variable = temp
function = analytic
[]
[difference]
type = ParsedAux
variable = difference
coupled_variables = 'analytic temp'
expression = 'temp-analytic'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'exp(x)+sin(y)+x*y*z'
[]
[]
[Postprocessors]
[l2_error_in_nek_temp]
type = ElementL2Error
variable = temp
function = analytic
[]
[max_diff]
type = NodalExtremeValue
variable = difference
value_type = max
[]
[min_diff]
type = NodalExtremeValue
variable = difference
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/conduction/identical_interface/cube/nek.i)
[Problem]
type = NekRSProblem
casename = 'cube'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '4'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/userobjects/volume/dimensional/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[avg_T]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[avg_v]
family = MONOMIAL
order = CONSTANT
[]
[integral_T]
family = MONOMIAL
order = CONSTANT
[]
[integral_p]
family = MONOMIAL
order = CONSTANT
[]
[integral_v]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[avg_T]
type = SpatialUserObjectAux
variable = avg_T
user_object = avg_T
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
[]
[avg_v]
type = SpatialUserObjectAux
variable = avg_v
user_object = avg_v
[]
[integral_T]
type = SpatialUserObjectAux
variable = integral_T
user_object = integral_T
[]
[integral_p]
type = SpatialUserObjectAux
variable = integral_p
user_object = integral_p
[]
[integral_v]
type = SpatialUserObjectAux
variable = integral_v
user_object = integral_v
[]
[]
[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
[]
[avg_T]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[avg_p]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[avg_v]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[integral_T]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[integral_p]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[integral_v]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_T
to_multi_app = subchannel
variable = avg_T
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_p
to_multi_app = subchannel
variable = avg_p
[]
[uo3_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_v
to_multi_app = subchannel
variable = avg_v
[]
[uo4_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_T
to_multi_app = subchannel
variable = integral_T
[]
[uo5_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_p
to_multi_app = subchannel
variable = integral_p
[]
[uo6_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_v
to_multi_app = subchannel
variable = integral_v
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
file_base = nek_dim
[]
(test/tests/userobjects/layered_layered/nek.i)
[Problem]
type = NekRSProblem
casename = 'brick'
[Dimensionalize]
L = 2.0
U = 1.0
rho = 834.5
Cp = 1228.0
T = 573.0
dT = 10.0
[]
[FieldTransfers]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[]
[]
[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/conduction/nonidentical_interface/cylinders/nek_mini.i)
[Problem]
type = NekRSProblem
casename = 'cylinder'
synchronization_interval = parent_app
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '2'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/userobjects/gap/nondimensional/nek.i)
[Mesh]
type = NekRSMesh
volume = true
scaling = 7.646e-3
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[Dimensionalize]
L = 7.646e-3
T = 100.0
dT = 50.0
U = 2.0
rho = 834.5
Cp = 1228.0
[]
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[avg_T]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[avg_v]
family = MONOMIAL
order = CONSTANT
[]
[integral_T]
family = MONOMIAL
order = CONSTANT
[]
[integral_p]
family = MONOMIAL
order = CONSTANT
[]
[integral_v]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[avg_T]
type = SpatialUserObjectAux
variable = avg_T
user_object = avg_T
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
[]
[avg_v]
type = SpatialUserObjectAux
variable = avg_v
user_object = avg_v
[]
[integral_T]
type = SpatialUserObjectAux
variable = integral_T
user_object = integral_T
[]
[integral_p]
type = SpatialUserObjectAux
variable = integral_p
user_object = integral_p
[]
[integral_v]
type = SpatialUserObjectAux
variable = integral_v
user_object = integral_v
[]
[]
[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
[]
[avg_T]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[avg_p]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[avg_v]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[integral_T]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[integral_p]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[integral_v]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_T
to_multi_app = subchannel
variable = avg_T
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_p
to_multi_app = subchannel
variable = avg_p
[]
[uo3_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_v
to_multi_app = subchannel
variable = avg_v
[]
[uo4_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_T
to_multi_app = subchannel
variable = integral_T
[]
[uo5_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_p
to_multi_app = subchannel
variable = integral_p
[]
[uo6_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_v
to_multi_app = subchannel
variable = integral_v
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/cht/sfr_pincell/nek_isolated.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
initial_flux_integral = 10
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '1'
[]
[ICs]
[avg_flux]
type = ConstantIC
variable = avg_flux
value = 1.0
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[nek_flux]
type = NekHeatFluxIntegral
boundary = '1'
[]
[]
[Outputs]
csv = true
execute_on = 'final'
[]
(test/tests/nek_standalone/lowMach/nek.i)
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'lowMach'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[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'
[]
(tutorials/pincell_multiphysics/nek.i)
inlet_T = 573.0 # inlet temperature
power = 250 # total power (W)
Re = 500.0 # Reynolds number
pin_diameter = 0.97e-2 # pin outer diameter
pin_pitch = 1.28e-2 # pin pitch
mu = 8.8e-5 # fluid dynamic viscosity
rho = 723.6 # fluid density
Cp = 5512.0 # fluid isobaric specific heat capacity
flow_area = ${fparse pin_pitch * pin_pitch - pi * pin_diameter * pin_diameter / 4.0}
wetted_perimeter = ${fparse pi * pin_diameter}
hydraulic_diameter = ${fparse 4.0 * flow_area / wetted_perimeter}
U_ref = ${fparse Re * mu / rho / hydraulic_diameter}
mdot = ${fparse rho * U_ref * flow_area}
dT = ${fparse power / mdot / Cp}
[Mesh]
type = NekRSMesh
boundary = '1'
scaling = ${hydraulic_diameter}
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'fluid'
n_usrwrk_slots = 1
[Dimensionalize]
L = ${hydraulic_diameter}
T = ${inlet_T}
U = ${U_ref}
dT = ${dT}
rho = ${rho}
Cp = ${Cp}
[]
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
synchronization_interval = parent_app
[]
[Postprocessors]
[outlet_T]
type = NekMassFluxWeightedSideAverage
field = temperature
boundary = '3'
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
interval = 10
[]
(test/tests/nek_output/velocity.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[Dimensionalize]
U = 2.0
[]
[FieldTransfers]
[velocity]
type = NekFieldVariable
direction = from_nek
[]
[velocity_z_squared]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
# dimensional form
[Functions]
[vx]
type = ParsedFunction
expression = 'sin(x)'
[]
[vy]
type = ParsedFunction
expression = '(y+1)*2'
[]
[vz]
type = ParsedFunction
expression = 'exp(x*y*z)*2'
[]
[v]
type = ParsedFunction
expression = 'sqrt(vx*vx+vy*vy+vz*vz)'
symbol_names = 'vx vy vz'
symbol_values = 'vx vy vz'
[]
[vz_2]
type = ParsedFunction
expression = 'vz*vz'
symbol_names = 'vz'
symbol_values = 'vz'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[]
[]
[Postprocessors]
[v_error]
type = ElementL1Error
variable = velocity
function = v
[]
[vz_2_error]
type = ElementL1Error
variable = velocity_z_squared
function = vz_2
[]
[]
[Outputs]
exodus = true
csv = true
[]
(tutorials/sfr_7pin/nek.i)
interval = 100
[Mesh]
type = NekRSMesh
boundary = '1 4'
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
synchronization_interval = parent_app
n_usrwrk_slots = 1
[FieldTransfers]
[heat_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
# this will only display the NekRS output every N time steps; postprocessors
# are still computed on every step, just not output to the console
time_step_interval = ${interval}
[]
[Postprocessors]
[pin_flux_in_nek]
type = NekHeatFluxIntegral
boundary = '1'
[]
[duct_flux_in_nek]
type = NekHeatFluxIntegral
boundary = '4'
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(tutorials/nek_stochastic/nek.i)
[Mesh]
type = NekRSMesh
boundary = '5'
[]
[Problem]
type = NekRSProblem
casename = 'channel'
n_usrwrk_slots = 2
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[ScalarTransfers]
[k]
type = NekScalarValue
direction = to_nek
usrwrk_slot = 1
output_postprocessor = k_from_stm
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_temp]
type = NekVolumeExtremeValue
field = temperature
[]
[k_from_stm] # this will just print to the screen the value of k received
type = Receiver
[]
[expect_max_T]
type = ParsedPostprocessor
expression = '1000.0 / k_from_stm + 500.0'
pp_names = k_from_stm
[]
[]
[Outputs]
csv = true
hide = 'flux_integral'
[]
[Controls]
[stm]
type = SamplerReceiver
[]
[]
(test/tests/deformation/mesh-velocity-areas/nek.i)
[Mesh]
type = NekRSMesh
order = SECOND
boundary = '2'
parallel_type = replicated
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh =true
[]
[Problem]
type = NekRSProblem
casename = 'pipe'
n_usrwrk_slots = 4
[FieldTransfers]
[disp]
type = NekMeshDeformation
direction = to_nek
usrwrk_slot = '1 2 3'
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[Quadrature]
type = GAUSS_LOBATTO
order = SECOND
[]
[]
[Postprocessors]
[nek_area_initial]
type = NekSideIntegral
field = unity
boundary = '2'
execute_on = initial
[]
[nek_area]
type = NekSideIntegral
field = unity
boundary = '2'
[]
[nek_diff]
type = DifferencePostprocessor
value1 = nek_area
value2 = nek_area_initial
[]
[moose_area_initial]
type = VolumePostprocessor # for a side-only mesh, this is area
execute_on = initial
use_displaced_mesh = true
[]
[moose_area]
type = VolumePostprocessor
use_displaced_mesh = true
[]
[moose_diff]
type = DifferencePostprocessor
value1 = moose_area
value2 = moose_area_initial
[]
[]
[Outputs]
csv = true
execute_on = 'final'
hide = 'nek_area_initial nek_area moose_area_initial moose_area'
[]
(test/tests/userobjects/hexagonal_gap_layered/normals/nek.i)
gap_thickness = ${fparse 0.05 * 7.646e-3}
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
# These are just for visualizing the average velocity component with Glyphs in paraview;
# the result of the 'vol_avg' user object will be represented as a vector "uo_" with 3 components
[uo_x]
family = MONOMIAL
order = CONSTANT
[]
[uo_y]
family = MONOMIAL
order = CONSTANT
[]
[uo_z]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[uo_x]
type = NekSpatialBinComponentAux
variable = uo_x
user_object = avg_velocity_component
component = 0
[]
[uo_y]
type = NekSpatialBinComponentAux
variable = uo_y
user_object = avg_velocity_component
component = 1
[]
[uo_z]
type = NekSpatialBinComponentAux
variable = uo_z
user_object = avg_velocity_component
component = 2
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelGapBin
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
[]
[avg_velocity_component]
type = NekBinnedPlaneAverage
bins = 'subchannel_binning'
field = velocity_component
velocity_component = normal
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_velocity_component
to_multi_app = subchannel
variable = avg_velocity_component
[]
[uox_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_x
variable = uo_x
[]
[uoy_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_y
variable = uo_y
[]
[uoz_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_z
variable = uo_z
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/interval/nek_synchronization.i)
[Problem]
type = NekRSProblem
casename = 'brick'
[Dimensionalize]
L = 2.0
U = 1.0
rho = 834.5
Cp = 1228.0
T = 573.0
dT = 10.0
[]
synchronization_interval = constant
constant_interval = 3
[FieldTransfers]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
scaling = 2.0
[]
[Postprocessors]
[vz_in]
type = SideAverageValue
variable = vel_z
boundary = '1'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
csv = true
[]
(tutorials/subchannel/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[velocity_x]
type = NekFieldVariable
direction = from_nek
[]
[velocity_y]
type = NekFieldVariable
direction = from_nek
[]
[velocity_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelBin
bundle_pitch = 0.02583914354890463
pin_pitch = 0.0089656996
pin_diameter = 7.646e-3
n_rings = 2
[]
[subchannel_gap_binning]
type = HexagonalSubchannelGapBin
bundle_pitch = 0.02583914354890463
pin_pitch = 0.0089656996
pin_diameter = 7.646e-3
n_rings = 2
[]
[axial_binning]
type = LayeredBin
direction = z
num_layers = 7
[]
[average_T]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = temperature
map_space_by_qp = true
[]
[average_T_gaps]
type = NekBinnedPlaneAverage
bins = 'subchannel_gap_binning axial_binning'
field = temperature
map_space_by_qp = true
gap_thickness = ${fparse 0.05 * 7.646e-3}
[]
[avg_gap_velocity]
type = NekBinnedPlaneAverage
bins = 'subchannel_gap_binning axial_binning'
field = velocity_component
velocity_component = normal
map_space_by_qp = true
gap_thickness = ${fparse 0.05 * 7.646e-3}
[]
[]
[AuxVariables]
# These are just for visualizing the average velocity component with Glyphs in paraview;
# the result of the 'avg_gap_velocity' user object will be represented as a vector "uo_" with 3 components
[uo_x]
family = MONOMIAL
order = CONSTANT
[]
[uo_y]
family = MONOMIAL
order = CONSTANT
[]
[uo_z]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[uo_x]
type = NekSpatialBinComponentAux
variable = uo_x
user_object = avg_gap_velocity
component = 0
[]
[uo_y]
type = NekSpatialBinComponentAux
variable = uo_y
user_object = avg_gap_velocity
component = 1
[]
[uo_z]
type = NekSpatialBinComponentAux
variable = uo_z
user_object = avg_gap_velocity
component = 2
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
sub_cycling = true
[]
[subchannel_gap]
type = TransientMultiApp
input_files = 'subchannel_gap.i'
execute_on = timestep_end
sub_cycling = true
[]
[]
[Transfers]
[uo_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = average_T
to_multi_app = subchannel
variable = average_T
[]
[uo_to_sub2]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = average_T_gaps
to_multi_app = subchannel_gap
variable = average_T
[]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_gap_velocity
to_multi_app = subchannel_gap
variable = avg_gap_velocity
[]
[uox_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel_gap
source_variable = uo_x
variable = uo_x
[]
[uoy_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel_gap
source_variable = uo_y
variable = uo_y
[]
[]
[VectorPostprocessors]
[avg_T]
type = SpatialUserObjectVectorPostprocessor
userobject = average_T
[]
[avg_T_gaps]
type = SpatialUserObjectVectorPostprocessor
userobject = average_T_gaps
[]
[avg_v_gaps]
type = SpatialUserObjectVectorPostprocessor
userobject = avg_gap_velocity
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
csv = true
[]
(test/tests/nek_errors/deformation/user/nek.i)
[Mesh]
type = NekRSMesh
volume = true
boundary = '2'
parallel_type = replicated
[]
[Problem]
type = NekRSProblem
casename = 'user'
n_usrwrk_slots = 3
[FieldTransfers]
[disp]
type = NekMeshDeformation
direction = to_nek
usrwrk_slot = '0 1 2'
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
(tutorials/sfr_7pin/nek_fluxflux.i)
interval = 100
[Mesh]
type = NekRSMesh
boundary = '1 4'
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
synchronization_interval = parent_app
n_usrwrk_slots = 1
[FieldTransfers]
[heat_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
# this will only display the NekRS output every N time steps; postprocessors
# are still computed on every step, just not output to the console
time_step_interval = ${interval}
[]
[UserObjects]
[axial_bin]
type = LayeredBin
direction = z
num_layers = 20
[]
[volume_bin]
type = HexagonalSubchannelBin
bundle_pitch = ${fparse 0.02625*1.1}
pin_pitch = 0.00904000030292588
pin_diameter = 8e-3
n_rings = 2
[]
[wall_flux]
type = NekBinnedSideAverage
bins = 'axial_bin volume_bin'
boundary = '1'
field = usrwrk00
map_space_by_qp = true
interval = ${interval}
check_zero_contributions = false
[]
[wall_temp]
type = NekBinnedSideAverage
bins = 'axial_bin volume_bin'
boundary = '1'
field = temperature
map_space_by_qp = true
interval = ${interval}
check_zero_contributions = false
[]
[bulk_temp]
type = NekBinnedVolumeAverage
bins = 'axial_bin volume_bin'
field = temperature
map_space_by_qp = true
interval = ${interval}
check_zero_contributions = false
[]
[]
[AuxVariables]
[h]
[]
[]
[AuxKernels]
[h]
type = HeatTransferCoefficientAux
variable = h
wall_T = wall_temp
bulk_T = bulk_temp
heat_flux = wall_flux
[]
[]
[Postprocessors]
[pin_flux_in_nek]
type = NekHeatFluxIntegral
boundary = '1'
[]
[duct_flux_in_nek]
type = NekHeatFluxIntegral
boundary = '4'
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(test/tests/cht/sfr_pincell/nek.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
synchronization_interval = parent_app
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[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'
[]
[]
(test/tests/userobjects/side/dimensional/nek.i)
[GlobalParams]
check_boundary_restricted = false
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[avg_T]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[avg_v]
family = MONOMIAL
order = CONSTANT
[]
[integral_T]
family = MONOMIAL
order = CONSTANT
[]
[integral_p]
family = MONOMIAL
order = CONSTANT
[]
[integral_v]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[avg_T]
type = SpatialUserObjectAux
variable = avg_T
user_object = avg_T
boundary = '2'
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
boundary = '2'
[]
[avg_v]
type = SpatialUserObjectAux
variable = avg_v
user_object = avg_v
boundary = '2'
[]
[integral_T]
type = SpatialUserObjectAux
variable = integral_T
user_object = integral_T
boundary = '2'
[]
[integral_p]
type = SpatialUserObjectAux
variable = integral_p
user_object = integral_p
boundary = '2'
[]
[integral_v]
type = SpatialUserObjectAux
variable = integral_v
user_object = integral_v
boundary = '2'
[]
[]
[UserObjects]
[x]
type = LayeredBin
direction = x
num_layers = 2
[]
[y]
type = LayeredBin
direction = y
num_layers = 2
[]
[z]
type = LayeredBin
direction = z
num_layers = 3
[]
[avg_T]
type = NekBinnedSideAverage
bins = 'x y z'
field = temperature
boundary = '2'
[]
[avg_p]
type = NekBinnedSideAverage
bins = 'x y z'
field = pressure
boundary = '2'
[]
[avg_v]
type = NekBinnedSideAverage
bins = 'x y z'
field = velocity
boundary = '2'
[]
[integral_T]
type = NekBinnedSideIntegral
bins = 'x y z'
field = temperature
boundary = '2'
[]
[integral_p]
type = NekBinnedSideIntegral
bins = 'x y z'
field = pressure
boundary = '2'
[]
[integral_v]
type = NekBinnedSideIntegral
bins = 'x y z'
field = velocity
boundary = '2'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
file_base = nek_dim
[]
(test/tests/userobjects/side/nondimensional/nek.i)
[GlobalParams]
check_boundary_restricted = false
[]
[Mesh]
type = NekRSMesh
volume = true
scaling = 7.646e-3
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[Dimensionalize]
L = 7.646e-3
T = 100.0
dT = 50.0
U = 2.0
rho = 834.5
Cp = 1228.0
[]
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[avg_T]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[avg_v]
family = MONOMIAL
order = CONSTANT
[]
[integral_T]
family = MONOMIAL
order = CONSTANT
[]
[integral_p]
family = MONOMIAL
order = CONSTANT
[]
[integral_v]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[avg_T]
type = SpatialUserObjectAux
variable = avg_T
user_object = avg_T
boundary = '2'
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
boundary = '2'
[]
[avg_v]
type = SpatialUserObjectAux
variable = avg_v
user_object = avg_v
boundary = '2'
[]
[integral_T]
type = SpatialUserObjectAux
variable = integral_T
user_object = integral_T
boundary = '2'
[]
[integral_p]
type = SpatialUserObjectAux
variable = integral_p
user_object = integral_p
boundary = '2'
[]
[integral_v]
type = SpatialUserObjectAux
variable = integral_v
user_object = integral_v
boundary = '2'
[]
[]
[UserObjects]
[x]
type = LayeredBin
direction = x
num_layers = 2
[]
[y]
type = LayeredBin
direction = y
num_layers = 2
[]
[z]
type = LayeredBin
direction = z
num_layers = 3
[]
[avg_T]
type = NekBinnedSideAverage
bins = 'x y z'
field = temperature
boundary = '2'
[]
[avg_p]
type = NekBinnedSideAverage
bins = 'x y z'
field = pressure
boundary = '2'
[]
[avg_v]
type = NekBinnedSideAverage
bins = 'x y z'
field = velocity
boundary = '2'
[]
[integral_T]
type = NekBinnedSideIntegral
bins = 'x y z'
field = temperature
boundary = '2'
[]
[integral_p]
type = NekBinnedSideIntegral
bins = 'x y z'
field = pressure
boundary = '2'
[]
[integral_v]
type = NekBinnedSideIntegral
bins = 'x y z'
field = velocity
boundary = '2'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/gap/dimensional/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[area]
family = MONOMIAL
order = CONSTANT
[]
[avg_T]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[avg_v]
family = MONOMIAL
order = CONSTANT
[]
[integral_T]
family = MONOMIAL
order = CONSTANT
[]
[integral_p]
family = MONOMIAL
order = CONSTANT
[]
[integral_v]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[area]
type = SpatialUserObjectAux
variable = area
user_object = area
[]
[avg_T]
type = SpatialUserObjectAux
variable = avg_T
user_object = avg_T
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
[]
[avg_v]
type = SpatialUserObjectAux
variable = avg_v
user_object = avg_v
[]
[integral_T]
type = SpatialUserObjectAux
variable = integral_T
user_object = integral_T
[]
[integral_p]
type = SpatialUserObjectAux
variable = integral_p
user_object = integral_p
[]
[integral_v]
type = SpatialUserObjectAux
variable = integral_v
user_object = integral_v
[]
[]
[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
[]
[area]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = unity
[]
[avg_T]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[avg_p]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[avg_v]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[integral_T]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[integral_p]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[integral_v]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_T
to_multi_app = subchannel
variable = avg_T
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_p
to_multi_app = subchannel
variable = avg_p
[]
[uo3_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_v
to_multi_app = subchannel
variable = avg_v
[]
[uo4_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_T
to_multi_app = subchannel
variable = integral_T
[]
[uo5_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_p
to_multi_app = subchannel
variable = integral_p
[]
[uo6_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_v
to_multi_app = subchannel
variable = integral_v
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
file_base = nek_dim
[]
(test/tests/userobjects/subchannel_layered/user_component.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[velocity_component]
[]
# These are just for visualizing the average velocity component with Glyphs in paraview;
# the result of the 'vol_avg' user object will be represented as a vector "uo_" with 3 components
[uo_x]
family = MONOMIAL
order = CONSTANT
[]
[uo_y]
family = MONOMIAL
order = CONSTANT
[]
[uo_z]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[velocity_component] # actual velocity component computed directly from interpolated nekRS velocity fields
type = ParsedAux
variable = velocity_component
expression = '(0.1*vel_x-0.2*vel_y+0.3*vel_z)/sqrt(0.1*0.1+0.2*0.2+0.3*0.3)'
coupled_variables = 'vel_x vel_y vel_z'
execute_on = 'timestep_end nonlinear linear'
[]
[uo_x]
type = NekSpatialBinComponentAux
variable = uo_x
user_object = vol_avg
component = 0
[]
[uo_y]
type = NekSpatialBinComponentAux
variable = uo_y
user_object = vol_avg
component = 1
[]
[uo_z]
type = NekSpatialBinComponentAux
variable = uo_z
user_object = vol_avg
component = 2
[]
[]
[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 = velocity_component
velocity_component = user
velocity_direction = '0.1 -0.2 0.3'
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel_b.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = vol_avg
to_multi_app = subchannel
variable = vol_avg
[]
[uox_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = uo_x
to_multi_app = subchannel
variable = uo_x
[]
[uoy_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = uo_y
to_multi_app = subchannel
variable = uo_y
[]
[uoz_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = uo_z
to_multi_app = subchannel
variable = uo_z
[]
[analytic_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = velocity_component
to_multi_app = subchannel
variable = velocity_component
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
# unhide and turn the number of time steps in the .par file to greater than 1 in order to see this
# match the user object
hide = 'velocity_component'
[]
(test/tests/nek_output/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[scalar01]
type = NekFieldVariable
direction = from_nek
[]
[scalar02]
type = NekFieldVariable
direction = from_nek
[]
[scalar03]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Functions]
[s01]
type = ParsedFunction
expression = 'sin(x)'
[]
[s02]
type = ParsedFunction
expression = 'y+1'
[]
[s03]
type = ParsedFunction
expression = 'exp(x*y*z)'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[]
[]
[Postprocessors]
[s01_error]
type = ElementL1Error
variable = scalar01
function = s01
[]
[s02_error]
type = ElementL1Error
variable = scalar02
function = s02
[]
[s03_error]
type = ElementL1Error
variable = scalar03
function = s03
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/userobjects/hexagonal_gap_layered/nek_axial.i)
gap_thickness = ${fparse 0.1 * 7.646e-3}
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[]
[]
[AuxVariables]
[gap_bins]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[gap_bins]
type = SpatialUserObjectAux
variable = gap_bins
user_object = subchannel_binning
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = gap_avg
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelBin
bundle_pitch = 0.02583914354890463
pin_pitch = 0.0089656996
pin_diameter = 7.646e-3
n_rings = 2
[]
[axial_binning]
type = LayeredGapBin
direction = z
num_layers = 6
[]
[gap_avg]
type = NekBinnedPlaneAverage
bins = 'subchannel_binning axial_binning'
field = pressure
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[gap_area]
type = NekBinnedPlaneIntegral
bins = 'subchannel_binning axial_binning'
field = unity
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel_axial.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = gap_avg
to_multi_app = subchannel
variable = gap_avg
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = gap_area
to_multi_app = subchannel
variable = gap_area
[]
[temp_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
variable = P
source_variable = P
[]
[]
[VectorPostprocessors]
[avg_p]
type = SpatialUserObjectVectorPostprocessor
userobject = gap_avg
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/conduction/boundary_and_volume/prism/nek_exact.i)
[Problem]
type = NekRSProblem
casename = 'pyramid_low'
usrwrk_output = '0 1'
usrwrk_output_prefix = 'flx src'
n_usrwrk_slots = 2
[FieldTransfers]
[flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[heat_source]
type = NekVolumetricSource
usrwrk_slot = 1
direction = to_nek
postprocessor_to_conserve = source_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
boundary = '2'
order = FIRST
exact = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[avg_T_volume]
type = NekVolumeAverage
field = temperature
[]
[heat_flux]
type = NekHeatFluxIntegral
boundary = '2'
[]
[nek_min_1]
type = NekSideExtremeValue
field = temperature
boundary = '3'
value_type = min
[]
[nek_min_2]
type = NekSideExtremeValue
field = temperature
boundary = '4'
value_type = min
[]
[nek_min_3]
type = NekSideExtremeValue
field = temperature
boundary = '5'
value_type = min
[]
[nek_min_4]
type = NekSideExtremeValue
field = temperature
boundary = '6'
value_type = min
[]
[nek_max_1]
type = NekSideExtremeValue
field = temperature
boundary = '3'
[]
[nek_max_2]
type = NekSideExtremeValue
field = temperature
boundary = '4'
[]
[nek_max_3]
type = NekSideExtremeValue
field = temperature
boundary = '5'
[]
[nek_max_4]
type = NekSideExtremeValue
field = temperature
boundary = '6'
[]
[]
[Outputs]
exodus = true
time_step_interval = 30
hide = 'flux_integral source_integral'
[]
(test/tests/nek_standalone/channel/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'channel'
[FieldTransfers]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[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/deformation/simple-cube/nek.i)
[Mesh]
type = NekRSMesh
order = SECOND
volume = true
parallel_type = replicated
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
type = NekRSProblem
casename = 'nekbox'
synchronization_interval = parent_app
n_usrwrk_slots = 4
[FieldTransfers]
[heat_source]
type = NekVolumetricSource
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = source_integral
[]
[disp]
type = NekMeshDeformation
usrwrk_slot = '1 2 3'
direction = to_nek
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[AuxVariables]
[temp_ansol]
order = SECOND
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[integral]
type = ElementL2Difference
variable = temp
other_variable = temp_ansol
execute_on = timestep_end
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
execute_on = timestep_end
[]
[min_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
execute_on = timestep_end
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
# uncomment the temp_ansol to see that the solution matches very well
hide = 'heat_source transfer_in source_integral temp_ansol'
[]
(tutorials/pebble_67/nek.i)
Re = 1460.0
dp = 0.06
cylinder_diameter = ${fparse 4.4 * dp}
density = 3.645
C = 3121.0
mu = 2.93e-5
power = 2400.0
inlet_area = ${fparse pi * cylinder_diameter^2 / 4.0}
[Mesh]
type = NekRSMesh
boundary = 4
scaling = ${dp}
[]
[Problem]
type = NekRSProblem
casename = 'pb67'
n_usrwrk_slots = 2
[Dimensionalize]
L = ${dp}
U = ${fparse Re * mu / density / dp}
T = 523.0
dT = ${fparse power * dp / Re / inlet_area / mu / C}
rho = ${density}
Cp = ${C}
[]
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[velocity_x]
type = NekFieldVariable
direction = from_nek
[]
[velocity_y]
type = NekFieldVariable
direction = from_nek
[]
[velocity_z]
type = NekFieldVariable
direction = from_nek
[]
[]
synchronization_interval = parent_app
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
interval = 100
[]
[Postprocessors]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[average_nek_pebble_T]
type = NekSideAverage
boundary = '4'
field = temperature
[]
[]
(test/tests/conduction/zero_flux/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '1 2 3 4 5 6 7 8'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/conduction/identical_volume/cube/nek.i)
[Problem]
type = NekRSProblem
casename = 'cube'
n_usrwrk_slots = 2
[FieldTransfers]
[heat_source]
type = NekVolumetricSource
direction = to_nek
postprocessor_to_conserve = source_integral
usrwrk_slot = 0
normalization_abs_tol = 1e-7
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = SECOND
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[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]
[out]
type = Exodus
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/pebble/shift/nek.i)
[Mesh]
type = NekRSMesh
boundary = '1'
scaling = 100.0
[]
[Problem]
type = NekRSProblem
casename = 'onepebble2'
n_usrwrk_slots = 2
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 1
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[flux_in_nek]
type = NekHeatFluxIntegral
boundary = '1'
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(tutorials/load_from_exodus/nek.i)
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'ethier'
[FieldTransfers]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/cht/nondimensional/nek_exact.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
n_usrwrk_slots = 1
# This input is run in nondimensional form to verify that all the postprocessors
# and data transfers in/out of nekRS are properly dimensionalized.
[Dimensionalize]
U = 0.0950466
T = 628.15
dT = 50.0
L = 0.908e-2
rho = 834.5
Cp = 1228.0
[]
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[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]
[synchronization_in]
type = Receiver
[]
[]
[Outputs]
exodus = true
[screen]
type = Console
hide = 'synchronization_in'
[]
[]
(tutorials/turbulence/inlet_outlet/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = pipe
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Executioner]
type = Transient
steady_state_detection = true
steady_state_tolerance = 1e-3
check_aux = true
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
# this quantity will be 40 if we run to the steady-state
[outlet_bulk_T]
type = NekMassFluxWeightedSideAverage
field = temperature
boundary = '3'
[]
[]
(test/tests/nek_errors/invalid_field/nonlinear.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Variables]
[temp]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
(test/tests/multiple_nek_apps/two_channels/nek.i)
[Mesh]
type = NekRSMesh
boundary = '1'
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'pin'
write_fld_files = true
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
[]
[avg_T]
type = NekVolumeAverage
field = temperature
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
csv = true
execute_on = 'final'
# just to make the gold files smaller
hide = 'avg_flux flux_integral'
[]
(test/tests/nek_temp/second_order/nek_volume.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = SECOND
volume = true
[]
[AuxVariables]
[analytic]
[]
[error_temp]
order = CONSTANT
family = MONOMIAL
[]
[difference]
[]
[]
[ICs]
[analytic]
type = FunctionIC
variable = analytic
function = analytic
[]
[]
[AuxKernels]
[error_temp]
type = ElementL2ErrorFunctionAux
variable = error_temp
coupled_variable = temp
function = analytic
[]
[difference]
type = ParsedAux
variable = difference
coupled_variables = 'analytic temp'
expression = 'temp-analytic'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'exp(x)+sin(y)+x*y*z'
[]
[]
[Postprocessors]
[l2_error_in_nek_temp]
type = ElementL2Error
variable = temp
function = analytic
[]
[max_diff]
type = NodalExtremeValue
variable = difference
value_type = max
[]
[min_diff]
type = NodalExtremeValue
variable = difference
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/cht/sfr_pincell/nek_vpp.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
conserve_flux_by_sideset = true
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[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/cht/pincell_p_v/nek.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Mesh]
type = NekRSMesh
order = SECOND
boundary = '1'
# we dont have any volume-based coupling with NekRS, but by specifying
# volume here, we will extract pressure and velocity on
# a volume mesh mirror
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(tutorials/sfr_7pin/nek_vpp.i)
[Mesh]
type = NekRSMesh
boundary = '1 4'
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
synchronization_interval = parent_app
n_usrwrk_slots = 1
[FieldTransfers]
[heat_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
conserve_flux_by_sideset = true
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
[Postprocessors]
[pin_flux_in_nek]
type = NekHeatFluxIntegral
boundary = '1'
[]
[duct_flux_in_nek]
type = NekHeatFluxIntegral
boundary = '4'
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(test/tests/deformation/vol-areas/nek.i)
[Mesh]
type = NekRSMesh
order = SECOND
volume = true
parallel_type = replicated
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
type = NekRSProblem
casename = 'nekbox'
n_usrwrk_slots = 4
[FieldTransfers]
[heat_source]
type = NekVolumetricSource
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = source_integral
[]
[disp]
type = NekMeshDeformation
usrwrk_slot = '1 2 3'
direction = to_nek
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[Quadrature]
type = GAUSS_LOBATTO
order = SECOND
[]
[]
[Postprocessors]
[nekbdry_icar1]
type = AreaPostprocessor
boundary = '1'
use_displaced_mesh = true
execute_on = INITIAL
[]
[nekbdry_ar1]
type = AreaPostprocessor
boundary = '1'
use_displaced_mesh = true
[]
[nekbdry_ar2]
type = AreaPostprocessor
boundary = '2'
use_displaced_mesh = true
[]
[nekbdry_ar3]
type = AreaPostprocessor
boundary = '3'
use_displaced_mesh = true
[]
[nekbdry_ar4]
type = AreaPostprocessor
boundary = '4'
use_displaced_mesh = true
[]
[nekbdry_ar5]
type = AreaPostprocessor
boundary = '5'
use_displaced_mesh = true
[]
[nekbdry_ar6]
type = AreaPostprocessor
boundary = '6'
use_displaced_mesh = true
[]
[]
[Outputs]
csv = true
execute_on = 'final'
# uncomment the temp_ansol to see that the solution matches very well
hide = 'source_integral heat_source'
[]
(test/tests/conduction/zero_flux/nek_vpp.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
conserve_flux_by_sideset = true
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '1 2 3 4 5 6 7 8'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/hexagonal_gap_layered/normals/nek_axial.i)
gap_thickness = ${fparse 0.05 * 7.646e-3}
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
# These are just for visualizing the average velocity component with Glyphs in paraview;
# the result of the 'vol_avg' user object will be represented as a vector "uo_" with 3 components
[uo_x]
family = MONOMIAL
order = CONSTANT
[]
[uo_y]
family = MONOMIAL
order = CONSTANT
[]
[uo_z]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[uo_x]
type = NekSpatialBinComponentAux
variable = uo_x
user_object = avg_velocity_component
component = 0
[]
[uo_y]
type = NekSpatialBinComponentAux
variable = uo_y
user_object = avg_velocity_component
component = 1
[]
[uo_z]
type = NekSpatialBinComponentAux
variable = uo_z
user_object = avg_velocity_component
component = 2
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelBin
bundle_pitch = 0.02583914354890463
pin_pitch = 0.0089656996
pin_diameter = 7.646e-3
n_rings = 2
[]
[axial_binning]
type = LayeredGapBin
direction = z
num_layers = 6
[]
[avg_velocity_component]
type = NekBinnedPlaneAverage
bins = 'subchannel_binning axial_binning'
field = velocity_component
velocity_component = normal
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel_axial.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uox_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_x
variable = uo_x
[]
[uoy_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_y
variable = uo_y
[]
[uoz_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_z
variable = uo_z
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/nek_standalone/ethier/nek.i)
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'ethier'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[heat_flux]
type = NekHeatFluxIntegral
boundary = '1'
[]
# These postprocessors are just used to verify correct extraction of the
# NekRS solution, because we can directly compare against the values printed
# to stdout by NekRS
[max_Vx]
type = NodalExtremeValue
variable = vel_x
value_type = max
[]
[min_Vx]
type = NodalExtremeValue
variable = vel_x
value_type = min
[]
[max_Vy]
type = NodalExtremeValue
variable = vel_y
value_type = max
[]
[min_Vy]
type = NodalExtremeValue
variable = vel_y
value_type = min
[]
[max_Vz]
type = NodalExtremeValue
variable = vel_z
value_type = max
[]
[min_Vz]
type = NodalExtremeValue
variable = vel_z
value_type = min
[]
[max_p]
type = NodalExtremeValue
variable = P
value_type = max
[]
[min_p]
type = NodalExtremeValue
variable = P
value_type = min
[]
[max_T]
type = NodalExtremeValue
variable = temp
value_type = max
[]
[min_T]
type = NodalExtremeValue
variable = temp
value_type = min
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = 'final'
[]
(tutorials/fhr_reflector/conduction/nek.i)
fluid_solid_interface = '1 2 7'
[Mesh]
type = NekRSMesh
boundary = ${fluid_solid_interface}
scaling = 0.006
[]
[Problem]
type = NekRSProblem
casename = 'fluid'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[Dimensionalize]
U = 0.0575
T = 923.15
dT = 10.0
L = 0.006
rho = 1962.13
Cp = 2416.0
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[boundary_flux]
type = NekHeatFluxIntegral
boundary = ${fluid_solid_interface}
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(tutorials/msfr/nek.i)
Re = 4.8e4 # (-)
mu = 0.011266321 # Pa-s
rho = 4147.3 # kg/m3
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'msfr'
n_usrwrk_slots = 5
synchronization_interval = parent_app
[FieldTransfers]
[source]
type = NekVolumetricSource
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
[Dimensionalize]
L = 1.0
U = ${fparse Re * mu / rho}
T = ${fparse 625.0 + 273.15}
dT = 100.0
rho = ${rho}
Cp = 1524.86 # J/kg/K
[]
normalization_abs_tol = 1e6
normalization_rel_tol = 1e-3
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
min_dt = 1e-10
[]
[]
[Outputs]
exodus = true
hide = 'source_integral'
[]
(test/tests/cht/pebble/nek.i)
[Mesh]
type = NekRSMesh
boundary = '1'
# nekRS solves with a length scale of meters, but nek_master.i is currently solving
# in terms of centimeters. Therefore, just for the sake of data transfers, we need to
# scale NekRSMesh to centimeters.
scaling = 100.0
[]
[Problem]
type = NekRSProblem
casename = 'onepebble2'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
postprocessor_to_conserve = flux_integral
usrwrk_slot = 0
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
# This is the heat flux in the nekRS solution, i.e. it is not an integral
# of nrs->usrwrk, instead this is directly an integral of k*grad(T)*hat(n).
# So this should closely match 'flux_integral'
[flux_in_nek]
type = NekHeatFluxIntegral
boundary = '1'
[]
[max_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_nek_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(test/tests/nek_standalone/lowMach/nek_boundary.i)
[Mesh]
type = NekRSMesh
boundary = '1'
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'lowMach'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_T_side]
type = NekSideExtremeValue
field = temperature
value_type = max
boundary = '1'
[]
[max_T_side_output]
type = NodalExtremeValue
variable = temp
value_type = max
[]
[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
[]
[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
[]
[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
[]
[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
[]
[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
[]
[max_p_side_diff]
type = DifferencePostprocessor
value1 = max_p_side
value2 = max_p_side_output
[]
[avg_T_side]
type = NekSideAverage
field = temperature
boundary = '1'
[]
[avg_T_side_output]
type = ElementAverageValue
variable = temp
[]
[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 = ElementAverageValue
variable = vel_x
[]
[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 = ElementAverageValue
variable = P
[]
[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_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_side avg_Vx_side_output avg_p_side avg_p_side_output max_T_side max_T_side_output min_T_side min_T_side_output avg_T_side avg_T_side_output'
[]
(test/tests/conduction/nonidentical_interface/cylinders/nek_exact.i)
[Problem]
type = NekRSProblem
casename = 'cylinder'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = FIRST
exact = true
boundary = '2'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(tutorials/standalone/nek.i)
[Mesh]
type = NekRSMesh
volume = true
order = SECOND
[]
[Problem]
type = NekRSProblem
casename = 'turbPipe'
[FieldTransfers]
[pressure]
type = NekFieldVariable
direction = from_nek
[]
[velocity_x]
type = NekFieldVariable
direction = from_nek
[]
[velocity_y]
type = NekFieldVariable
direction = from_nek
[]
[velocity_z]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Postprocessors]
[outlet_p]
type = NekSideAverage
boundary = '2'
field = pressure
[]
[inlet_p]
type = NekSideAverage
boundary = '1'
field = pressure
[]
[mdot]
type = NekMassFluxWeightedSideIntegral
boundary = '1'
field = unity
[]
# subtracts the two pressure postprocessors
[dP]
type = DifferencePostprocessor
value1 = outlet_p
value2 = inlet_p
[]
[]
[UserObjects]
[axial_bins]
type = LayeredBin
direction = z
num_layers = 20
[]
[radial_bins]
type = RadialBin
vertical_axis = z
rmax = 0.5
nr = 12
growth_r = 0.9
[]
[volume_averages]
type = NekBinnedVolumeAverage
bins = 'radial_bins axial_bins'
field = velocity_z
map_space_by_qp = true
[]
[]
[AuxVariables]
[volume_averages]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[volume_averages]
type = SpatialUserObjectAux
variable = volume_averages
user_object = volume_averages
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
execute_on = timestep_end
[]
[]
[Transfers]
[uo_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = volume_averages
variable = avg_velocity
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
csv = true
# this hides these values from the screen for neater output
hide = 'outlet_p inlet_p'
[]
(test/tests/nek_errors/invalid_field/auxvar.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[AuxVariables]
[temp]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
(test/tests/conduction/reverse_cht/nek.i)
[Problem]
type = NekRSProblem
casename = 'cube'
n_usrwrk_slots = 2
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = from_nek
[]
[temperature]
type = NekFieldVariable
direction = to_nek
usrwrk_slot = 1
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '4'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[interface_T]
type = NekSideAverage
field = temperature
boundary = '4'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/cht/nondimensional/nek.i)
[Problem]
type = NekRSProblem
casename = 'sfr_pin'
n_usrwrk_slots = 1
# This input is run in nondimensional form to verify that all the postprocessors
# and data transfers in/out of nekRS are properly dimensionalized.
[Dimensionalize]
U = 0.0950466
T = 628.15
dT = 50.0
L = 0.908e-2
rho = 834.5
Cp = 1228.0
[]
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[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/transfers/nek_temperature/temp.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 3
[FieldTransfers]
[T3]
type = NekFieldVariable
direction = to_nek
usrwrk_slot = 2
field = temperature
[]
[T2]
type = NekFieldVariable
direction = to_nek
usrwrk_slot = 1
field = temperature
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '1'
[]
[ICs]
[T2]
type = ConstantIC
variable = T2
value = 20
[]
[T3]
type = ConstantIC
variable = T3
value = 30
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[T3]
type = NekUsrWrkBoundaryIntegral
usrwrk_slot = 2
boundary = '1'
[]
[T2]
type = NekUsrWrkBoundaryIntegral
usrwrk_slot = 1
boundary = '1'
[]
[area]
type = NekSideIntegral
boundary = '1'
field = unity
[]
[]
[Outputs]
csv = true
[]
(test/tests/nek_stochastic/quiet_init/nek_multi.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'ethier'
n_usrwrk_slots = 2
[ScalarTransfers]
[scalar1]
type = NekScalarValue
direction = to_nek
usrwrk_slot = 0
output_postprocessor = s1
[]
[]
[FieldTransfers]
[scalar02]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[s1]
type = Receiver
[]
# we use the stochastic value to set the scalar (in the .udf files). Here,
# we are checking that the value of the scalar everywhere is equation to the 's1' postprocessor
[max_scalar]
type = ElementExtremeValue
variable = scalar02
value_type = max
[]
[min_scalar]
type = ElementExtremeValue
variable = scalar02
value_type = min
[]
[]
[Outputs]
csv = true
[]
(test/tests/conduction/nonidentical_interface/cylinders/nek.i)
[Problem]
type = NekRSProblem
casename = 'cylinder'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = FIRST
boundary = '2'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/userobjects/hexagonal_gap_layered/user_component.i)
gap_thickness = ${fparse 0.05 * 7.646e-3}
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[FieldTransfers]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[velocity_component]
[]
# These are just for visualizing the average velocity component with Glyphs in paraview;
# the result of the 'vol_avg' user object will be represented as a vector "uo_" with 3 components
[uo_x]
family = MONOMIAL
order = CONSTANT
[]
[uo_y]
family = MONOMIAL
order = CONSTANT
[]
[uo_z]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[velocity_component] # actual velocity component computed directly from interpolated nekRS velocity fields
type = ParsedAux
variable = velocity_component
expression = '(0.1*vel_x+0.2*vel_y+0.3*vel_z)/sqrt(0.1*0.1+0.2*0.2+0.3*0.3)'
coupled_variables = 'vel_x vel_y vel_z'
execute_on = 'timestep_end nonlinear linear'
[]
[uo_x]
type = NekSpatialBinComponentAux
variable = uo_x
user_object = avg_velocity_component
component = 0
[]
[uo_y]
type = NekSpatialBinComponentAux
variable = uo_y
user_object = avg_velocity_component
component = 1
[]
[uo_z]
type = NekSpatialBinComponentAux
variable = uo_z
user_object = avg_velocity_component
component = 2
[]
[]
[UserObjects]
[subchannel_binning]
type = HexagonalSubchannelGapBin
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
[]
[avg_velocity_component]
type = NekBinnedPlaneAverage
bins = 'subchannel_binning axial_binning'
field = velocity_component
velocity_component = user
velocity_direction = '0.1 0.2 0.3'
gap_thickness = ${gap_thickness}
map_space_by_qp = true
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel_b.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_velocity_component
to_multi_app = subchannel
variable = avg_velocity_component
[]
[uox_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_x
variable = uo_x
[]
[uoy_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_y
variable = uo_y
[]
[uoz_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = uo_z
variable = uo_z
[]
[actual_velocity_component]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = subchannel
source_variable = velocity_component
variable = velocity_component
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/nek_temp/second_order/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = SECOND
boundary = '1 2 3 4 5 6 7 8'
[]
[AuxVariables]
[analytic]
[]
[error_temp]
order = CONSTANT
family = MONOMIAL
[]
[difference]
[]
[avg_flux] # only here to avoid a re-gold; otherwise not necessary
order = SECOND
family = LAGRANGE
[]
[]
[ICs]
[analytic]
type = FunctionIC
variable = analytic
function = analytic
[]
[]
[AuxKernels]
[error_temp]
type = ElementL2ErrorFunctionAux
variable = error_temp
coupled_variable = temp
function = analytic
[]
[difference]
type = ParsedAux
variable = difference
coupled_variables = 'analytic temp'
expression = 'temp-analytic'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'exp(x)+sin(y)+x*y*z'
[]
[]
[Postprocessors]
[l2_error_in_nek_temp]
type = ElementL2Error
variable = temp
function = analytic
[]
[max_diff]
type = NodalExtremeValue
variable = difference
value_type = max
[]
[min_diff]
type = NodalExtremeValue
variable = difference
value_type = min
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/conduction/nonidentical_volume/cylinder/nek.i)
[Problem]
type = NekRSProblem
casename = 'cylinder'
n_usrwrk_slots = 1
[FieldTransfers]
[heat_source]
type = NekVolumetricSource
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = source_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
order = SECOND
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[avg_T_volume]
type = NekVolumeAverage
field = temperature
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]
(test/tests/conduction/nonidentical_volume/cylinder/nek_exact.i)
[Problem]
type = NekRSProblem
casename = 'cylinder_low'
usrwrk_output = '1'
usrwrk_output_prefix = 'src'
n_usrwrk_slots = 2
[FieldTransfers]
[heat_source]
type = NekVolumetricSource
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = source_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
exact = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[avg_T_volume]
type = NekVolumeAverage
field = temperature
[]
[point]
type = PointValue
variable = temp
point = '0.5 0.0 0.0 '
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
csv = true
[]
(test/tests/transfers/nek_temperature/nek.i)
dTv = 10
Tv = 5
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 2
[FieldTransfers]
[temperature]
type = NekFieldVariable
direction = to_nek
usrwrk_slot = 1
[]
[nek_temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[Dimensionalize]
dT = ${dTv}
T = ${Tv}
[]
[]
[Mesh]
type = NekRSMesh
boundary = '1'
[]
[ICs]
[tv]
type = FunctionIC
variable = temperature
function = tv
[]
[]
[Functions]
[tv] # temperature, dimensional
type = ParsedFunction
expression = 'sin(x)'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[]
[]
[AuxVariables]
[d]
[]
[]
[AuxKernels]
[d]
type = ParsedAux
variable = d
expression = 'nek_temp - temperature'
coupled_variables = 'nek_temp temperature'
[]
[]
[Postprocessors]
[max_error]
type = ElementExtremeValue
variable = d
[]
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/nek_stochastic/shift/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = 'brick'
n_usrwrk_slots = 3
[ScalarTransfers]
[s2]
type = NekScalarValue
direction = to_nek
value = 2.5
usrwrk_slot = 1
output_postprocessor = s2
[]
[s3]
type = NekScalarValue
direction = to_nek
value = 3.5
usrwrk_slot = 1
output_postprocessor = s3
[]
[]
[FieldTransfers]
[scalar01]
type = NekFieldVariable
direction = from_nek
[]
[scalar02]
type = NekFieldVariable
direction = from_nek
[]
[scalar03]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[s2]
type = Receiver
[]
[s3]
type = Receiver
[]
[max_scalar1]
type = NodalExtremeValue
variable = scalar01
value_type = max
[]
[min_scalar1]
type = NodalExtremeValue
variable = scalar01
value_type = min
[]
[max_scalar2]
type = NodalExtremeValue
variable = scalar02
value_type = max
[]
[min_scalar2]
type = NodalExtremeValue
variable = scalar02
value_type = min
[]
[max_scalar3]
type = NodalExtremeValue
variable = scalar03
value_type = max
[]
[min_scalar3]
type = NodalExtremeValue
variable = scalar03
value_type = min
[]
[]
[Outputs]
csv = true
[]
(test/tests/conduction/zero_flux/nek_disjoint.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
conserve_flux_by_sideset = true
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '1 2'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[flux1]
type = NekUsrWrkBoundaryIntegral
usrwrk_slot = 0
boundary = '1'
[]
[flux2]
type = NekUsrWrkBoundaryIntegral
usrwrk_slot = 0
boundary = '2'
[]
[]
(tutorials/gas_compact_cht/nek.i)
!include common_input.i
[Mesh]
type = NekRSMesh
boundary = '3'
volume = true
scaling = ${channel_diameter}
[]
[Problem]
type = NekRSProblem
casename = 'ranstube'
n_usrwrk_slots = 1
[Dimensionalize]
U = ${fparse mdot / (n_bundles * n_coolant_channels_per_block) / fluid_density / (pi * channel_diameter * channel_diameter / 4.0)}
T = ${inlet_T}
dT = ${fparse power / mdot / fluid_Cp * unit_cell_height / height}
L = ${channel_diameter}
rho = ${fluid_density}
Cp = ${fluid_Cp}
[]
[FieldTransfers]
[flux]
type = NekBoundaryFlux
direction = to_nek
usrwrk_slot = 0
[]
[temperature]
type = NekFieldVariable
direction = from_nek
[]
[]
synchronization_interval = parent_app
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
min_dt = 1e-10
[]
[]
[Outputs]
exodus = true
[screen]
type = Console
hide = 'boundary_flux inlet_T outlet_T max_T flux_integral transfer_in'
[]
[csv]
file_base = 'csv/nek'
type = CSV
[]
[]
[Postprocessors]
[boundary_flux]
type = NekHeatFluxIntegral
boundary = '3'
[]
[inlet_T]
type = NekSideAverage
field = temperature
boundary = '1'
[]
[outlet_T]
type = NekSideAverage
field = temperature
boundary = '2'
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[]
[UserObjects]
active = '' # simply comment out this line to evaluate these user objects
[layered_bin]
type = LayeredBin
num_layers = ${num_layers_for_plots}
direction = z
[]
[wall_temp]
type = NekBinnedSideAverage
bins = 'layered_bin'
boundary = '3'
field = temperature
map_space_by_qp = true
[]
[bulk_temp]
type = NekBinnedVolumeAverage
bins = 'layered_bin'
field = temperature
map_space_by_qp = true
[]
[]
[VectorPostprocessors]
active = '' # simply comment out this line to evaluate these user objects
[wall]
type = SpatialUserObjectVectorPostprocessor
userobject = wall_temp
[]
[bulk]
type = SpatialUserObjectVectorPostprocessor
userobject = bulk_temp
[]
[]
(tutorials/turbulence/periodic/nek.i)
[Mesh]
type = NekRSMesh
volume = true
[]
[Problem]
type = NekRSProblem
casename = pipe
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[Executioner]
type = Transient
steady_state_detection = true
steady_state_tolerance = 1e-3
check_aux = true
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[avg_T]
type = NekVolumeAverage
field = temperature
[]
[max_T]
type = NekVolumeExtremeValue
field = temperature
[]
[min_T]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[]
(test/tests/nek_output/bad_name.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
(test/tests/userobjects/volume/nondimensional/nek.i)
[Mesh]
type = NekRSMesh
volume = true
scaling = 7.646e-3
[]
[Problem]
type = NekRSProblem
casename = 'sfr_7pin'
[Dimensionalize]
L = 7.646e-3
T = 100.0
dT = 50.0
U = 2.0
rho = 834.5
Cp = 1228.0
[]
[FieldTransfers]
[temp]
type = NekFieldVariable
direction = from_nek
field = temperature
[]
[P]
type = NekFieldVariable
direction = from_nek
field = pressure
[]
[vel_x]
type = NekFieldVariable
direction = from_nek
field = velocity_x
[]
[vel_y]
type = NekFieldVariable
direction = from_nek
field = velocity_y
[]
[vel_z]
type = NekFieldVariable
direction = from_nek
field = velocity_z
[]
[]
[]
[AuxVariables]
[avg_T]
family = MONOMIAL
order = CONSTANT
[]
[avg_p]
family = MONOMIAL
order = CONSTANT
[]
[avg_v]
family = MONOMIAL
order = CONSTANT
[]
[integral_T]
family = MONOMIAL
order = CONSTANT
[]
[integral_p]
family = MONOMIAL
order = CONSTANT
[]
[integral_v]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[avg_T]
type = SpatialUserObjectAux
variable = avg_T
user_object = avg_T
[]
[avg_p]
type = SpatialUserObjectAux
variable = avg_p
user_object = avg_p
[]
[avg_v]
type = SpatialUserObjectAux
variable = avg_v
user_object = avg_v
[]
[integral_T]
type = SpatialUserObjectAux
variable = integral_T
user_object = integral_T
[]
[integral_p]
type = SpatialUserObjectAux
variable = integral_p
user_object = integral_p
[]
[integral_v]
type = SpatialUserObjectAux
variable = integral_v
user_object = integral_v
[]
[]
[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
[]
[avg_T]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[avg_p]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[avg_v]
type = NekBinnedVolumeAverage
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[integral_T]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = temperature
[]
[integral_p]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = pressure
[]
[integral_v]
type = NekBinnedVolumeIntegral
bins = 'subchannel_binning axial_binning'
field = velocity
[]
[]
[MultiApps]
[subchannel]
type = TransientMultiApp
input_files = 'subchannel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[uo1_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_T
to_multi_app = subchannel
variable = avg_T
[]
[uo2_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_p
to_multi_app = subchannel
variable = avg_p
[]
[uo3_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = avg_v
to_multi_app = subchannel
variable = avg_v
[]
[uo4_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_T
to_multi_app = subchannel
variable = integral_T
[]
[uo5_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_p
to_multi_app = subchannel
variable = integral_p
[]
[uo6_to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = integral_v
to_multi_app = subchannel
variable = integral_v
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nek_pressure_surface_force/nek.i)
[Problem]
type = NekRSProblem
casename = 'brick'
[FieldTransfers]
[P]
type = NekFieldVariable
field = pressure
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
volume = true
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Outputs]
csv = true
[]
[Postprocessors]
[pressure_x]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'x'
mesh = 'fluid'
[]
[pressure_y]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'y'
mesh = 'fluid'
[]
[pressure_z]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'z'
mesh = 'fluid'
[]
[pressure_total]
type = NekPressureSurfaceForce
boundary = '1 2 3 4 5 6'
component = 'total'
mesh = 'fluid'
[]
# These are added to compare by hand
[pressure_x_3]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '3'
[]
[pressure_x_4]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '4'
[]
[pressure_x_comp]
type = DifferencePostprocessor
value1 = pressure_x_3
value2 = pressure_x_4
[]
[pressure_y_1]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '1'
[]
[pressure_y_2]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '2'
[]
[pressure_y_comp]
type = DifferencePostprocessor
value1 = pressure_y_1
value2 = pressure_y_2
[]
[pressure_z_6]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '6'
[]
[pressure_z_5]
type = SideIntegralVariablePostprocessor
variable = P
boundary = '5'
[]
[pressure_z_comp]
type = DifferencePostprocessor
value1 = pressure_z_6
value2 = pressure_z_5
[]
[]
(test/tests/conduction/identical_interface/pyramid/nek.i)
[Problem]
type = NekRSProblem
casename = 'pyramid'
n_usrwrk_slots = 1
[FieldTransfers]
[avg_flux]
type = NekBoundaryFlux
usrwrk_slot = 0
direction = to_nek
postprocessor_to_conserve = flux_integral
[]
[temp]
type = NekFieldVariable
field = temperature
direction = from_nek
[]
[]
[]
[Mesh]
type = NekRSMesh
boundary = '2'
[]
[Executioner]
type = Transient
[TimeStepper]
type = NekTimeStepper
[]
[]
[Postprocessors]
[max_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = max
[]
[min_temp_nek]
type = NekVolumeExtremeValue
field = temperature
value_type = min
[]
[heat_flux]
type = NekHeatFluxIntegral
boundary = '2'
[]
[]
[Outputs]
exodus = true
execute_on = 'final'
[]