- user_objectThe UserObject UserObject to get values from. Note that the UserObject _must_ implement the spatialValue() virtual function!
C++ Type:UserObjectName
Controllable:No
Description:The UserObject UserObject to get values from. Note that the UserObject _must_ implement the spatialValue() virtual function!
- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Controllable:No
Description:The name of the variable that this object applies to
SpatialUserObjectAux
Populates an auxiliary variable with a spatial value returned from a UserObject spatialValue method.
User objects are generally more flexible than auxiliary kernels, and this object creates allows to connect them to the Variables
system.
The UserObject
must implement the spatialValue()
virtual function. In the framework, the following objects can currently be used:
LayeredIntegral-derived objects such as LayeredAverage and LayeredIntegral
LayeredSideIntegral-derived objects such as LayeredSideAverage and LayeredSideIntegral
NearestPointBase-derived objects such as NearestPointLayeredAverage
FXIntegralBaseUserObject
Additional objects may be implemented in an application.
Example syntax
In this example, a SpatialUserObjectAux
is being used to store in an auxiliary variable the averages of another variable, u, on multiple layers along the right
boundary in the y
direction.
[AuxKernels]
[./lsia]
type = SpatialUserObjectAux
variable = layered_side_average
boundary = right
user_object = layered_side_average
[../]
[]
[UserObjects]
[./layered_side_average]
type = LayeredSideAverage
direction = y
num_layers = 3
variable = u
execute_on = linear
boundary = right
[../]
[]
(test/tests/userobjects/layered_side_integral/layered_side_average.i)Automatic differentiation is not supported in the auxiliary variable system, so using a SpatialUserObjectAux
will not propagate derivatives.
Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
Default:True
C++ Type:bool
Controllable:No
Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
- execute_onLINEAR TIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE.
Default:LINEAR TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
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:Yes
Description:Set the enabled status of the MooseObject.
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (test/tests/userobjects/layered_base_restartable/layered_base_restartable.i)
- (test/tests/userobjects/force_aux_ordering/force_postaux.i)
- (test/tests/userobjects/layered_average/layered_average_block.i)
- (test/tests/userobjects/nearest_point_layered_side_integral/nearest_point_layered_side_integral.i)
- (test/tests/userobjects/function_layered_integral/function_layered_integral.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/pressure_outlet/subsonic_nozzle_fixed_inflow_hllc.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_parent.i)
- (test/tests/userobjects/nearest_point_layered_side_integral_functor/nearest_point_layered_side_integral_functor.i)
- (test/tests/transfers/coord_transform/both-transformed/user_object/sub-app.i)
- (test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average.i)
- (test/tests/userobjects/layered_side_average_functor/layered_side_average_functor.i)
- (test/tests/userobjects/layered_average/layered_average.i)
- (test/tests/userobjects/nearest_point_layered_average/radius_points_from_uo.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_parent.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/cached_multiple_apps/main.i)
- (test/tests/userobjects/layered_side_integral/layered_side_average.i)
- (test/tests/userobjects/layered_integral/layered_integral_test.i)
- (test/tests/vectorpostprocessors/spatial_userobject_vector_postprocessor/spatial_userobject.i)
- (test/tests/transfers/multiapp_userobject_transfer/sub.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_parent.i)
- (test/tests/userobjects/nearest_point_layered_average/nearest_point_layered_average.i)
- (test/tests/vectorpostprocessors/nearest_point_integral/nearest_point_integral.i)
- (test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average_fv.i)
- (test/tests/userobjects/layered_integral/layered_integral_fv_test.i)
- (test/tests/userobjects/nearest_point_layered_side_average_functor/nearest_point_layered_side_average_functor.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/stagnation_inlet/supersonic_nozzle_hllc.i)
- (test/tests/userobjects/nearest_point_layered_integral/nearest_point_layered_integral.i)
- (test/tests/userobjects/layered_side_integral/layered_side_integral.i)
- (test/tests/userobjects/nearest_point_average/nearest_point_average.i)
- (test/tests/userobjects/layered_average/layered_average_interpolate.i)
- (test/tests/userobjects/layered_average/layered_average_bounding_block.i)
- (test/tests/userobjects/layered_average/layered_average_1d_displaced.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_userobject.i)
- (test/tests/userobjects/layered_side_integral/layered_side_integral_fv.i)
- (modules/thermal_hydraulics/test/tests/userobjects/layered_avg_rz/test.i)
- (test/tests/userobjects/nearest_point_layered_side_diffusive_flux_average/nearest_point_layered_side_diffusive_flux_average.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/sub.i)
- (test/tests/userobjects/nearest_point_layered_average/points_from_uo.i)
- (test/tests/userobjects/nearest_point_layered_average/nearest_radius_layered_average.i)
- (test/tests/userobjects/layered_average/block_restricted.i)
- (test/tests/userobjects/nearest_point_layered_side_average/nearest_point_layered_side_average.i)
- (test/tests/userobjects/layered_integral/average_sample.i)
- (modules/thermal_hydraulics/test/tests/userobjects/layered_flow_area_change/layered_flow_area_2D.i)
- (test/tests/userobjects/layered_side_integral_functor/layered_side_integral_functor.i)
- (test/tests/userobjects/layered_extremum/layered_extremum_matprop.i)
- (test/tests/userobjects/nearest_point_layered_integral/points_from_uo.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_parent.i)
- (test/tests/userobjects/layered_average/layered_average_bounds_error.i)
- (test/tests/userobjects/layered_average/layered_average_bounds.i)
- (test/tests/userobjects/layered_integral/cumulative_layered_integral.i)
(test/tests/userobjects/layered_side_integral/layered_side_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_side_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./lsia]
type = SpatialUserObjectAux
variable = layered_side_average
boundary = right
user_object = layered_side_average
[../]
[]
[UserObjects]
[./layered_side_average]
type = LayeredSideAverage
direction = y
num_layers = 3
variable = u
execute_on = linear
boundary = right
[../]
[]
[VectorPostprocessors]
[avg]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_side_average
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/userobjects/layered_base_restartable/layered_base_restartable.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./np_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = 'timestep_begin'
user_object = npla
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 10
[../]
[./one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 12
[../]
[]
[UserObjects]
[./npla]
type = NearestPointLayeredAverage
direction = y
points = '0.25 0 0.25 0.75 0 0.25 0.25 0 0.75 0.75 0 0.75'
num_layers = 10
variable = u
execute_on = 'timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 8
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/force_aux_ordering/force_postaux.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 5
ymin = 0
ymax = 1
ny = 5
allow_renumbering = false
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 1
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
# spatial_uo_1/2 are executed preaux by default because spatial_uo_aux1/2 depend on them
# We force 1 to be executed postaux, so the auxkernel will use the old value, and the
# corresponding post processor, value2, will get an old value as well
[UserObjects]
[spatial_uo_1]
type = LayeredSideAverage
variable = u
direction = y
num_layers = 3
boundary = 'left'
force_postaux = true
[]
[spatial_uo_2]
type = LayeredSideAverage
variable = u
direction = y
num_layers = 3
boundary = 'left'
[]
[]
[AuxVariables]
[v1]
[]
[v2]
[]
[]
[AuxKernels]
[spatial_uo_aux_1]
type = SpatialUserObjectAux
variable = v1
user_object = 'spatial_uo_1'
[]
[spatial_uo_aux_2]
type = SpatialUserObjectAux
variable = v2
user_object = 'spatial_uo_2'
[]
[]
[Postprocessors]
[value1]
type = NodalVariableValue
variable = v1
nodeid = 3
force_preaux = true
[]
[value2]
type = NodalVariableValue
variable = v2
nodeid = 3
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 2.0
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/layered_average/layered_average_block.i)
#
# The mesh consists of two blocks. Block 1 is from y=0 to y=2, and
# block 2 is from y=3 to y=4. Elements are 0.25 high. The solution
# is u = 4y.
#
# Two sets of LayeredAverage values are computed. In both cases, four
# layers are used. In 'unrestricted', the layers span the entire mesh.
# In 'restricted', the layers cover only block 1.
#
# For 'unrestricted', the result is a value of 2 from 0<y<1 , a value
# of 6 from 1<y<2, and a value of 14 from 3<y<4.
#
# For 'restricted', the result is a value of 1 from 0<y<0.5, a value of
# 3 from 0.5<y<1, a value of 5 from 1<y<1.5, and a value of 7 for y>1.5.
#
[Mesh]
file = layered_average_block.e
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./restricted]
order = CONSTANT
family = MONOMIAL
[../]
[./unrestricted]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./restricted]
type = SpatialUserObjectAux
variable = restricted
execute_on = timestep_end
user_object = restricted
[../]
[./unrestricted]
type = SpatialUserObjectAux
variable = unrestricted
execute_on = timestep_end
user_object = unrestricted
[../]
[]
[BCs]
[./ll]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./lu]
type = DirichletBC
variable = u
boundary = 2
value = 8
[../]
[./ul]
type = DirichletBC
variable = u
boundary = 3
value = 12
[../]
[./uu]
type = DirichletBC
variable = u
boundary = 4
value = 16
[../]
[]
[UserObjects]
[./restricted]
type = LayeredAverage
direction = y
num_layers = 4
variable = u
execute_on = linear
block = 1
[../]
[./unrestricted]
type = LayeredAverage
direction = y
num_layers = 4
variable = u
execute_on = linear
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/nearest_point_layered_side_integral/nearest_point_layered_side_integral.i)
# This input computes both a layered average and layered integral with the
# same direction, points, and number of layers. The layered integral for "bin"
# i is directly equal to the layered average for "bin" i multiplied by
# by 0.05 (side length of 1 divided by 10 layers X side length of 1 divided by 2 points).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[u]
[]
[]
[AuxVariables]
[np_layered_integral]
order = CONSTANT
family = MONOMIAL
[]
[np_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u
[]
[np_layered_integral]
type = SpatialUserObjectAux
variable = np_layered_integral
user_object = npli
boundary = 'front'
execute_on = timestep_end
[]
[np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
user_object = npla
boundary = 'front'
execute_on = timestep_end
[]
[]
[Functions]
[u]
type = ParsedFunction
expression = 'x+2*y+3*z'
[]
[]
[UserObjects]
[npla]
type = NearestPointLayeredSideAverage
direction = x
points = '0.5 0.25 0.5
0.5 0.75 0.5'
num_layers = 10
variable = u
boundary = 'front'
[]
[npli]
type = NearestPointLayeredSideIntegral
direction = x
points = '0.5 0.25 0.5
0.5 0.75 0.5'
num_layers = 10
variable = u
boundary = 'front'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'dummy'
[]
(test/tests/userobjects/function_layered_integral/function_layered_integral.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 20
nz = 2
[]
[Problem]
type = FEProblem
solve = false
[]
[AuxVariables]
[layered_integral]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[liaux]
type = SpatialUserObjectAux
variable = layered_integral
execute_on = timestep_end
user_object = layered_integral
[]
[]
[UserObjects]
# the results of the layered integral are directly compared against the analytic integral
# of sin(y) from a to b, or cos(a) - cos(b)
[layered_integral]
type = FunctionLayeredIntegral
direction = y
num_layers = 20
function = 'sin(y)'
[]
[]
[VectorPostprocessors]
[li]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_integral
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/pressure_outlet/subsonic_nozzle_fixed_inflow_hllc.i)
inlet_vel = 120
rho_in = 0.8719748696
H_in = 4.0138771448e+05
gamma = 1.4
R = 8.3145
molar_mass = 29e-3
R_specific = ${fparse R / molar_mass}
cp = ${fparse gamma * R_specific / (gamma - 1)}
cv = ${fparse cp / gamma}
T_in = ${fparse H_in / gamma / cv}
mass_flux = ${fparse inlet_vel * rho_in}
outlet_pressure = 0.9e5
[GlobalParams]
fp = fp
[]
[Debug]
show_material_props = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = subsonic_nozzle.e
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8719748696
[]
[rho_u]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1e-4
[]
[rho_v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[rho_E]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 2.5e5
[]
[]
[FVKernels]
# Mass conservation
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
# Momentum x conservation
[momentum_x_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
# Momentum y conservation
[momentum_y_time]
type = FVTimeKernel
variable = rho_v
[]
[momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[]
# Fluid energy conservation
[fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[]
[]
[FVBCs]
## inflow boundaries
[mass_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
variable = rho
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
[]
[momentum_x_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
variable = rho_u
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
momentum_component = x
[]
[momentum_y_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
variable = rho_v
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
momentum_component = y
[]
[fluid_energy_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
variable = rho_E
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
[]
## outflow conditions
[mass_outflow]
type = CNSFVHLLCSpecifiedPressureMassBC
variable = rho
boundary = right
pressure = ${outlet_pressure}
[]
[momentum_x_outflow]
type = CNSFVHLLCSpecifiedPressureMomentumBC
variable = rho_u
boundary = right
momentum_component = x
pressure = ${outlet_pressure}
[]
[momentum_y_outflow]
type = CNSFVHLLCSpecifiedPressureMomentumBC
variable = rho_v
boundary = right
momentum_component = y
pressure = ${outlet_pressure}
[]
[fluid_energy_outflow]
type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
variable = rho_E
boundary = right
pressure = ${outlet_pressure}
[]
# wall conditions
[momentum_x_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_u
momentum_component = x
boundary = wall
[]
[momentum_y_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = wall
[]
[]
[AuxVariables]
[Ma]
family = MONOMIAL
order = CONSTANT
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[Ma_layered]
family = MONOMIAL
order = CONSTANT
[]
[]
[UserObjects]
[layered_Ma_UO]
type = LayeredAverage
variable = Ma
num_layers = 10
direction = x
[]
[]
[AuxKernels]
[Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[]
[p_aux]
type = ADMaterialRealAux
variable = p
property = pressure
[]
[Ma_layered_aux]
type = SpatialUserObjectAux
variable = Ma_layered
user_object = layered_Ma_UO
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
[]
[sound_speed]
type = SoundspeedMat
[]
[]
[Postprocessors]
[outflow_Ma]
type = SideAverageValue
variable = Ma
boundary = right
[]
[outflow_pressure]
type = SideAverageValue
variable = p
boundary = right
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
end_time = 10
solve_type = NEWTON
nl_abs_tol = 1e-7
[TimeIntegrator]
type = ImplicitEuler
[]
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-3
optimal_iterations = 6
growth_factor = 1.5
[]
[]
[VectorPostprocessors]
[Ma_layered]
type = LineValueSampler
variable = Ma_layered
start_point = '0 0 0'
end_point = '3 0 0'
num_points = 100
sort_by = x
warn_discontinuous_face_values = false
[]
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = tosub_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
user_object = layered_average
variable = multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
user_object = layered_average
variable = element_multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[]
(test/tests/userobjects/nearest_point_layered_side_integral_functor/nearest_point_layered_side_integral_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_integral]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_integral_kern]
type = SpatialUserObjectAux
variable = u_layered_integral
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = NearestPointLayeredSideIntegralFunctor
direction = x
points='
0.25 0 0.25
0.75 0 0.25
0.25 0 0.75
0.75 0 0.75'
# Each layer has exactly 4 elements in the x direction. Note that to avoid inconsistent
# results, we should always avoid aligning layer edges with element centroids.
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_integral
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/transfers/coord_transform/both-transformed/user_object/sub-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 0
ymin = 0
ymax = 1
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[v][]
[]
[AuxVariables]
[sub_app_var][]
[sub_app_var_elem]
order = CONSTANT
family = MONOMIAL
[]
[check][]
[]
[AuxKernels]
[uo]
type = SpatialUserObjectAux
variable = check
user_object = 'sub_app_uo'
[][]
[UserObjects]
[sub_app_uo]
type = LayeredAverage
direction = y
variable = v
num_layers = 5
execute_on = TIMESTEP_END
use_displaced_mesh = true
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = bottom
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = top
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_side_flux_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./lsfa]
type = SpatialUserObjectAux
variable = layered_side_flux_average
boundary = top
user_object = layered_side_flux_average
[../]
[]
[Materials]
[./gcm]
type = GenericConstantMaterial
prop_values = 2
prop_names = diffusivity
boundary = 'right top'
[../]
[]
[UserObjects]
[./layered_side_flux_average]
type = LayeredSideDiffusiveFluxAverage
direction = y
diffusivity = diffusivity
num_layers = 1
variable = u
execute_on = linear
boundary = top
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
[Debug]
show_material_props = true
[]
(test/tests/userobjects/layered_side_average_functor/layered_side_average_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_average_kern]
type = SpatialUserObjectAux
variable = u_layered_average
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = LayeredSideAverageFunctor
direction = x
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_average
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/userobjects/layered_average/layered_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_average]
type = SpatialUserObjectAux
variable = layered_average
execute_on = timestep_end
user_object = average
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[]
[UserObjects]
[./average]
type = LayeredAverage
variable = u
direction = y
num_layers = 2
[../]
[]
[VectorPostprocessors]
[avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/userobjects/nearest_point_layered_average/radius_points_from_uo.i)
[Mesh]
[ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '0.1 0.2 0.3 0.4 0.5'
rings = '2 2 2 2 2'
has_outer_square = false
preserve_volumes = true
smoothing_max_it = 3
[]
[extruder]
type = MeshExtruderGenerator
input = ccmg
extrusion_vector = '0 0 1'
num_layers = 4
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[ring_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[reac]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = func
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'sqrt(x * x + y * y) + z'
[]
[]
[AuxKernels]
[np_layered_average]
type = SpatialUserObjectAux
variable = ring_average
execute_on = timestep_end
user_object = nrla
[]
[]
[UserObjects]
[nrla]
type = NearestRadiusLayeredAverage
direction = z
num_layers = 2
points = '0.05 0 0
0.15 0 0
0.25 0 0
0.35 0 0
0.45 0 0'
variable = u
[]
[]
[VectorPostprocessors]
# getting the points from the user object itself is here exactly equivalent to the points
# provided in the 'spatial_manually_provided' vector postprocessor
[spatial_from_uo]
type = SpatialUserObjectVectorPostprocessor
userobject = nrla
[]
[spatial_manually_provided]
type = SpatialUserObjectVectorPostprocessor
userobject = nrla
points = '0.05 0 0.25
0.05 0 0.75
0.15 0 0.25
0.15 0 0.75
0.25 0 0.25
0.25 0 0.75
0.35 0 0.25
0.35 0 0.75
0.45 0 0.25
0.45 0 0.75'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
exodus = true
execute_on = final
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
# The MultiAppUserObjectTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0 0 0'
type = TransientMultiApp
input_files = tosub_displaced_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
user_object = layered_average
variable = multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
user_object = layered_average
variable = element_multi_layered_average
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[]
(test/tests/transfers/multiapp_nearest_node_transfer/cached_multiple_apps/main.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 3
dx = 2
dy = 2
dz = 2
ix = 1
iy = 5
iz = 5
[]
[translate]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-1 -1 -1'
[]
[]
[Variables]
[dummy]
[]
[]
[AuxVariables]
[Temperature]
[]
[Layered_Average]
[]
[Layered_Average_elem]
family = MONOMIAL
order = CONSTANT
[]
[Subapp_Temp]
[]
[Subapp_Temp_elem]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[extra]
type = ADDiffusion
variable = dummy
[]
[]
[AuxKernels]
[Location_Based]
type = ParsedAux
variable = Temperature
expression = 'x+y+z'
use_xyzt = true
[]
[Layered_Average_User_Object]
type = SpatialUserObjectAux
variable = Layered_Average
user_object = Tfuel_UO
[]
[Layered_Average_User_Object_elem]
type = SpatialUserObjectAux
variable = Layered_Average_elem
user_object = Tfuel_UO
[]
[]
[UserObjects]
[Tfuel_UO]
type = NearestPointLayeredAverage
variable = Temperature
direction = x
num_layers = 1
points_file = 'locations.txt'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[TF_sub]
type = FullSolveMultiApp
positions_file = 'locations.txt'
input_files = 'child.i'
execute_on = 'TIMESTEP_END'
[]
[]
[GlobalParams]
bbox_factor = 2
[]
[Transfers]
[to_sub_layers]
type = MultiAppNearestNodeTransfer
to_multi_app = TF_sub
source_variable = Layered_Average
variable = Temperature
fixed_meshes = True
[]
[to_sub_layers_elem]
type = MultiAppNearestNodeTransfer
to_multi_app = TF_sub
source_variable = Layered_Average_elem
variable = Temperature_elem
[]
[from_sub_recover_layers]
type = MultiAppNearestNodeTransfer
from_multi_app = TF_sub
source_variable = Temperature
variable = Subapp_Temp
[]
[from_sub_recover_layers_elem]
type = MultiAppNearestNodeTransfer
from_multi_app = TF_sub
source_variable = Temperature_elem
variable = Subapp_Temp_elem
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# First step does not use Transfers caching
# Second step does
num_steps = 2
[]
[Outputs]
[out]
type = Exodus
hide = 'dummy Temperature Layered_Average Layered_Average_elem'
[]
[]
(test/tests/userobjects/layered_side_integral/layered_side_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_side_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./lsia]
type = SpatialUserObjectAux
variable = layered_side_average
boundary = right
user_object = layered_side_average
[../]
[]
[UserObjects]
[./layered_side_average]
type = LayeredSideAverage
direction = y
num_layers = 3
variable = u
execute_on = linear
boundary = right
[../]
[]
[VectorPostprocessors]
[avg]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_side_average
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/userobjects/layered_integral/layered_integral_test.i)
###########################################################
# This is a test of the UserObject System. The
# LayeredIntegral UserObject executes independently during
# the solve to compute a user-defined value. In this case
# an integral value in discrete layers along a vector
# in the domain. (Type: ElementalUserObject)
#
# @Requirement F6.40
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_integral]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./liaux]
type = SpatialUserObjectAux
variable = layered_integral
execute_on = timestep_end
user_object = layered_integral
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_integral]
type = LayeredIntegral
direction = y
num_layers = 3
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[int]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_integral
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = out
exodus = true
csv = true
[]
(test/tests/vectorpostprocessors/spatial_userobject_vector_postprocessor/spatial_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[u]
[]
[np_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u
[]
[np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
user_object = npla
execute_on = timestep_end
[]
[]
[Functions]
[u]
type = ParsedFunction
expression = 'x+2*y+3*z'
[]
[]
[UserObjects]
[npla]
type = NearestPointLayeredAverage
direction = x
points = '0.5 0.25 0.25
0.5 0.75 0.25
0.5 0.25 0.75
0.5 0.75 0.75'
num_layers = 3
variable = u
[]
[]
[VectorPostprocessors]
[vpp]
type = SpatialUserObjectVectorPostprocessor
userobject = npla
points_file = points.txt
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'final'
hide = 'dummy'
[]
(test/tests/transfers/multiapp_userobject_transfer/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
type = FEProblem
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0 0 0'
type = TransientMultiApp
input_files = tosub_displaced_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
source_user_object = layered_average
variable = multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
source_user_object = layered_average
variable = element_multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
displaced_target_mesh = true
skip_coordinate_collapsing = true
[../]
[]
(test/tests/userobjects/nearest_point_layered_average/nearest_point_layered_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./np_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = timestep_end
user_object = npla
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[../]
[]
[UserObjects]
[./npla]
type = NearestPointLayeredAverage
direction = y
num_layers = 10
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/vectorpostprocessors/nearest_point_integral/nearest_point_integral.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[np_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = timestep_end
user_object = npi
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 1.5
[]
[one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[]
[]
[VectorPostprocessors]
[npi]
type = NearestPointIntegralVariablePostprocessor
variable = u
points = '0.25 0.25 0.25
0.75 0.25 0.25
0.25 0.75 0.75
0.75 0.75 0.75'
[]
# getting the points from the user object itself is here exactly equivalent to the points
# provided in the 'spatial_manually_provided' vector postprocessor
[spatial_from_uo]
type = SpatialUserObjectVectorPostprocessor
userobject = npi
[]
[spatial_manually_provided]
type = SpatialUserObjectVectorPostprocessor
userobject = npi
points = '0.25 0.25 0.25
0.75 0.25 0.25
0.25 0.75 0.75
0.75 0.75 0.75'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
execute_on = final
[]
(test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[]
[AuxVariables]
[./layered_side_flux_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[]
[FVBCs]
[./bottom]
type = FVDirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = FVDirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./lsfa]
type = SpatialUserObjectAux
variable = layered_side_flux_average
boundary = top
user_object = layered_side_flux_average
[../]
[]
[Materials]
[./gcm]
type = GenericConstantMaterial
prop_values = 2
prop_names = diffusivity
boundary = 'right top'
[../]
[]
[UserObjects]
[./layered_side_flux_average]
type = LayeredSideDiffusiveFluxAverage
direction = y
diffusivity = diffusivity
num_layers = 1
variable = u
execute_on = linear
boundary = top
[../]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-14
nl_rel_tol = 1e-14
l_abs_tol = 1e-14
l_tol = 1e-6
[]
[Outputs]
exodus = true
[]
[Debug]
show_material_props = true
[]
(test/tests/userobjects/layered_integral/layered_integral_fv_test.i)
###########################################################
# This is a test of the UserObject System. The
# LayeredIntegral UserObject executes independently during
# the solve to compute a user-defined value. In this case
# an integral value in discrete layers along a vector
# in the domain. (Type: ElementalUserObject)
#
# @Requirement F6.40
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[]
[AuxVariables]
[./layered_integral]
order = CONSTANT
family = MONOMIAL
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[]
[AuxKernels]
[./liaux]
type = SpatialUserObjectAux
variable = layered_integral
execute_on = timestep_end
user_object = layered_integral
[../]
[]
[FVBCs]
[./bottom]
type = FVDirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = FVDirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_integral]
type = LayeredIntegral
direction = y
num_layers = 3
variable = u
execute_on = linear
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = fv_out
exodus = true
[]
(test/tests/userobjects/nearest_point_layered_side_average_functor/nearest_point_layered_side_average_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_average_kern]
type = SpatialUserObjectAux
variable = u_layered_average
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = NearestPointLayeredSideAverageFunctor
direction = x
points='
0.25 0 0.25
0.75 0 0.25
0.25 0 0.75
0.75 0 0.75'
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_average
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = layered_average_value
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = 'nonlinear TIMESTEP_END'
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/stagnation_inlet/supersonic_nozzle_hllc.i)
stagnation_pressure = 1
stagnation_temperature = 1
[GlobalParams]
fp = fp
[]
[Debug]
show_material_props = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = supersonic_nozzle.e
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.0034
[]
[rho_u]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1e-4
outputs = none
[]
[rho_v]
family = MONOMIAL
order = CONSTANT
fv = true
outputs = none
[]
[rho_E]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 2.5
[]
[]
[FVKernels]
# Mass conservation
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
# Momentum x conservation
[momentum_x_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
# Momentum y conservation
[momentum_y_time]
type = FVTimeKernel
variable = rho_v
[]
[momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[]
# Fluid energy conservation
[fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[]
[]
[FVBCs]
## inflow stagnation boundaries
[mass_stagnation_inflow]
type = CNSFVHLLCMassStagnationInletBC
variable = rho
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[]
[momentum_x_stagnation_inflow]
type = CNSFVHLLCMomentumStagnationInletBC
variable = rho_u
momentum_component = x
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[]
[momentum_y_stagnation_inflow]
type = CNSFVHLLCMomentumStagnationInletBC
variable = rho_v
momentum_component = y
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[../]
[fluid_energy_stagnation_inflow]
type = CNSFVHLLCFluidEnergyStagnationInletBC
variable = rho_E
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[]
## outflow implicit conditions
[mass_outflow]
type = CNSFVHLLCMassImplicitBC
variable = rho
boundary = right
[]
[momentum_x_outflow]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_u
momentum_component = x
boundary = right
[]
[momentum_y_outflow]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_v
momentum_component = y
boundary = right
[]
[fluid_energy_outflow]
type = CNSFVHLLCFluidEnergyImplicitBC
variable = rho_E
boundary = right
[]
# wall conditions
[momentum_x_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_u
momentum_component = x
boundary = wall
[]
[momentum_y_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = wall
[]
[]
[AuxVariables]
[Ma]
family = MONOMIAL
order = CONSTANT
[]
[Ma_layered]
family = MONOMIAL
order = CONSTANT
[]
[]
[UserObjects]
[layered_Ma_UO]
type = LayeredAverage
variable = Ma
num_layers = 100
direction = x
[]
[]
[AuxKernels]
[Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[]
[Ma_layered_aux]
type = SpatialUserObjectAux
variable = Ma_layered
user_object = layered_Ma_UO
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
[]
[fluid_props]
type = GeneralFluidProps
porosity = 1
characteristic_length = 1
[]
[sound_speed]
type = SoundspeedMat
fp = fp
[]
[]
[Postprocessors]
[cfl_dt]
type = ADCFLTimeStepSize
c_names = 'sound_speed'
vel_names = 'speed'
CFL = 0.5
[]
[outflow_Ma]
type = SideAverageValue
variable = Ma
boundary = right
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
end_time = 0.1
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
[TimeStepper]
type = PostprocessorDT
postprocessor = cfl_dt
[]
[]
[VectorPostprocessors]
[Ma_layered]
type = LineValueSampler
variable = Ma_layered
start_point = '0 0 0'
end_point = '10 0 0'
num_points = 100
sort_by = x
[]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/nearest_point_layered_integral/nearest_point_layered_integral.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 1.5
ymax = 1.5
zmax = 1.2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./np_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = timestep_end
user_object = npla
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[../]
[]
[UserObjects]
[./npla]
type = NearestPointLayeredIntegral
direction = y
num_layers = 10
variable = u
points_file = points.txt
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_side_integral/layered_side_integral.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_integral]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./liaux]
type = SpatialUserObjectAux
variable = layered_integral
boundary = right
user_object = layered_integral
[../]
[]
[UserObjects]
[./layered_integral]
type = LayeredSideIntegral
direction = y
num_layers = 3
variable = u
execute_on = linear
boundary = right
[../]
[]
[VectorPostprocessors]
[int]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_integral
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/userobjects/nearest_point_average/nearest_point_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 8
ny = 8
nz = 8
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[np_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[v]
type = FunctionIC
variable = v
function = v
[]
[]
[Functions]
[v]
type = ParsedFunction
expression = x+y-sin(z)
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[np_average]
type = SpatialUserObjectAux
variable = np_average
execute_on = timestep_end
user_object = npa
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[]
[UserObjects]
[npa]
type = NearestPointAverage
points_file = points.txt
variable = v
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
hide = 'u'
[]
(test/tests/userobjects/layered_average/layered_average_interpolate.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[./nodal_layered_average]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_average]
type = SpatialUserObjectAux
variable = layered_average
execute_on = timestep_end
user_object = average
[../]
[./nodal_layered_average]
type = SpatialUserObjectAux
variable = nodal_layered_average
execute_on = timestep_end
user_object = average
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[]
[UserObjects]
[./average]
type = LayeredAverage
variable = u
direction = y
num_layers = 19
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_average/layered_average_bounding_block.i)
#
# The mesh consists of two blocks. Block 1 has a height and width of 1 whereas
# block 2 has a height of 2 and width of 1. A gap of 1 exists between the two
# blocks in the x direction. Elements are 0.25 high and 1 wide. The solution
# in block 1 is u = y and block 2 is u = 4y.
#
# Two sets of LayeredAverage values are computed. In both cases, four
# layers are used. In 'bounding_block1', the LayeredAverage values are computed
# on block 1 using the bounds (dimensions of block 2). In 'bounding_block2',
# the LayeredAverage values are computed on block 2 using the bounds (dimensions
# of block 1).
#
# In 'bounding_block1', since the layers are defined by the dimensions of block
# 2 only two layers appear in block one. The values in block 1 are thus:
# 0.25 for 0<y<0.5 and 0.75 for 0.5<y<1.
#
# In 'bounding_block2', since the layers are defined by the dimensions of block
# 1 four layers appear in block two. Any place over and above the top of the
# uppermost layer is included in the uppermost layer. Therefore, the first 3
# layers are 1/4 of the height of block 1 (0.25) whereas the 4th layer has a
# height of 1/4 of block 1 (0.25) plus the additional region in block 2 outside
# the bounds of block 1 (1.0) for a total height of 1.24.
# The values in block 2 are thus:
# 0.5 from 0<y<0.25, 1.5 from 0.25<y<0.5, 2.5 from 0.5<y<0.75, and 5.5 from
# y>0.75.
#
#
[Mesh]
file = layered_average_bounding_block.e
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bounding_block1]
order = CONSTANT
family = MONOMIAL
[../]
[./bounding_block2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./bounding_block1]
type = SpatialUserObjectAux
block = 1
variable = bounding_block1
execute_on = timestep_end
user_object = bounding_block1
[../]
[./bounding_block2]
type = SpatialUserObjectAux
block = 2
variable = bounding_block2
execute_on = timestep_end
user_object = bounding_block2
[../]
[]
[BCs]
[./ll]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./lu]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[./ul]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./uu]
type = DirichletBC
variable = u
boundary = 4
value = 8
[../]
[]
[UserObjects]
[./bounding_block1]
type = LayeredAverage
direction = y
num_layers = 4
variable = u
execute_on = linear
block = 1
layer_bounding_block = 2
[../]
[./bounding_block2]
type = LayeredAverage
direction = y
num_layers = 4
block = 2
layer_bounding_block = 1
variable = u
execute_on = linear
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_average/layered_average_1d_displaced.i)
# This tests that Layered user objects work with displaced meshes. Originally,
# the mesh is aligned with x-axis. Then we displace the mesh to be aligned with
# z-axis and sample along the z-direction.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
elem_type = EDGE2
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./left_fn]
type = ParsedFunction
expression = 't + 1'
[../]
[./disp_x_fn]
type = ParsedFunction
expression = '-x'
[../]
[./disp_z_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
[AuxVariables]
[./la]
family = MONOMIAL
order = CONSTANT
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxKernels]
[./la_ak]
type = SpatialUserObjectAux
variable = la
user_object = la_uo
execute_on = TIMESTEP_END
use_displaced_mesh = true
[../]
[./disp_x_ak]
type = FunctionAux
variable = disp_x
function = 'disp_x_fn'
[../]
[./disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[../]
[./disp_z_ak]
type = FunctionAux
variable = disp_z
function = 'disp_z_fn'
[../]
[]
[UserObjects]
[./la_uo]
type = LayeredAverage
direction = z
variable = u
num_layers = 5
execute_on = TIMESTEP_END
use_displaced_mesh = true
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_fn
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 2
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
parallel_type = replicated
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[./multi_layered_average]
family = LAGRANGE
order = FIRST
[../]
[]
[UserObjects]
[./multi_layered_average]
type = LayeredAverage
variable = power_density
direction = y
num_layers = 4
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = multi_layered_average
execute_on = 'nonlinear TIMESTEP_END'
user_object = multi_layered_average
[../]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[layered_avg]
type = ElementAverageValue
block = '0'
variable = multi_layered_average
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppUserObjectTransfer
user_object = multi_layered_average
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/userobjects/layered_side_integral/layered_side_integral_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[]
[AuxVariables]
[./layered_integral]
order = CONSTANT
family = MONOMIAL
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[]
[FVBCs]
[./bottom]
type = FVDirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = FVDirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./liaux]
type = SpatialUserObjectAux
variable = layered_integral
boundary = right
user_object = layered_integral
[../]
[]
[UserObjects]
[./layered_integral]
type = LayeredSideIntegral
direction = y
num_layers = 3
variable = u
execute_on = linear
boundary = right
[../]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-14
nl_rel_tol = 1e-14
l_abs_tol = 1e-14
l_tol = 1e-6
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/userobjects/layered_avg_rz/test.i)
length = 4
[GlobalParams]
[]
[UserObjects]
[average_temp_uo]
type = LayeredAverageRZ
execute_on = 'initial timestep_end'
direction = z
variable = T_solid
block = hs:1
num_layers = 10
axis_point = '0 0 0'
axis_dir = '0 0 1'
length = ${length}
[]
[]
[AuxVariables]
[average_temp]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[layered_average]
type = SpatialUserObjectAux
variable = average_temp
execute_on = 'initial timestep_end'
user_object = average_temp_uo
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[mat2]
type = ThermalFunctionSolidProperties
k = 0.6
cp = 1.
rho = 1.
[]
[mat3]
type = ThermalFunctionSolidProperties
k = 21.5
cp = 350.
rho = 6.55e3
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = 20
initial_T = '300 + 10 * sin(0.5 * z * pi / 3.865)'
names = '1 2 3'
widths = '0.004 0.0001 0.0005'
n_part_elems = '10 1 2'
solid_properties = 'mat1 mat2 mat3'
solid_properties_T_ref = '300 300 300'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.5
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
show = 'average_temp'
[]
(test/tests/userobjects/nearest_point_layered_side_diffusive_flux_average/nearest_point_layered_side_diffusive_flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 4
nz = 4
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./np_layered_flux_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./np_layered_flux_average]
type = SpatialUserObjectAux
variable = np_layered_flux_average
execute_on = timestep_end
user_object = nplsfa
boundary = 'bottom top'
[../]
[]
[UserObjects]
[./nplsfa]
type = NearestPointLayeredSideDiffusiveFluxAverage
direction = x
points='0.25 0 0.25 0.75 0 0.25 0.25 0 0.75 0.75 0 0.75'
num_layers = 10
variable = u
diffusivity = 1.0
execute_on = linear
boundary = 'bottom top'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/nearest_point_layered_average/points_from_uo.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 1.5
ymax = 1.5
zmax = 1.2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[np_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = timestep_end
user_object = npla
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[]
[]
[UserObjects]
[npla]
type = NearestPointLayeredAverage
direction = y
num_layers = 3
variable = u
points = '0.375 0.0 0.3
1.125 0.0 0.3
0.375 0.0 0.9
1.125 0.0 0.9'
[]
[]
[VectorPostprocessors]
# getting the points from the user object itself is here exactly equivalent to the points
# provided in the 'spatial_manually_provided' vector postprocessor
[spatial_from_uo]
type = SpatialUserObjectVectorPostprocessor
userobject = npla
[]
[spatial_manually_provided]
type = SpatialUserObjectVectorPostprocessor
userobject = npla
points = '0.375 0.25 0.3
0.375 0.75 0.3
0.375 1.25 0.3
1.125 0.25 0.3
1.125 0.75 0.3
1.125 1.25 0.3
0.375 0.25 0.9
0.375 0.75 0.9
0.375 1.25 0.9
1.125 0.25 0.9
1.125 0.75 0.9
1.125 1.25 0.9'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
execute_on = 'final'
[]
(test/tests/userobjects/nearest_point_layered_average/nearest_radius_layered_average.i)
# This input tests the NearestRadiusLayeredAverage object by taking the average
# of layered rings and using the variable u(x,y,x) = r + z, where r sqrt(x^2 + y^2)
# Given a ring of inner and outer radii r1 and r2, respectively, and of height z1 and z2,
# the analytical solution is given by:
# avg(r1,r2,z1,z2) = 2/3 * (r1^2 + r1*r2 + r2^2) / (r1 + r2) + (z1 + z2) / 2
# Convergence to these values as num_sectors is increased is verified.
[Mesh]
[./ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '0.1 0.2 0.3 0.4 0.5'
rings = '2 2 2 2 2'
has_outer_square = false
preserve_volumes = true
smoothing_max_it = 3
[]
[./extruder]
type = MeshExtruderGenerator
input = ccmg
extrusion_vector = '0 0 1'
num_layers = 4
[]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ring_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./reac]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = func
[../]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'sqrt(x * x + y * y) + z'
[]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = ring_average
execute_on = timestep_end
user_object = nrla
[../]
[]
[UserObjects]
[./nrla]
type = NearestRadiusLayeredAverage
direction = z
num_layers = 2
points = '0.05 0 0
0.15 0 0
0.25 0 0
0.35 0 0
0.45 0 0'
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_average/block_restricted.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[middle]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
top_right = '0.6 0.6 0'
bottom_left = '0.4 0.4 0'
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[master_app_var]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = master_app_var
execute_on = 'timestep_end'
user_object = main_uo
block = '1'
[]
[]
[UserObjects]
[main_uo]
type = LayeredAverage
direction = x
variable = 'u'
block = '1'
# Note: 'bounds' or 'num_layers' are provided as CLI args
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 100
[]
[]
[Executioner]
type = Transient
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
num_steps = 1
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-8
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = 'u'
execute_on = 'initial timestep_end'
[]
[final_avg]
type = ElementAverageValue
variable = 'master_app_var'
execute_on = 'initial timestep_end'
block = '1'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/nearest_point_layered_side_average/nearest_point_layered_side_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./np_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
execute_on = timestep_end
user_object = npla
boundary = 'bottom top'
[../]
[]
[UserObjects]
[./npla]
type = NearestPointLayeredSideAverage
direction = x
points='0.25 0 0.25 0.75 0 0.25 0.25 0 0.75 0.75 0 0.75'
num_layers = 10
variable = u
execute_on = linear
boundary = 'bottom top'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_integral/average_sample.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 30
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_integral]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./liaux]
type = SpatialUserObjectAux
variable = layered_integral
execute_on = timestep_end
user_object = layered_integral
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_integral]
type = LayeredIntegral
direction = y
num_layers = 5
variable = u
execute_on = linear
sample_type = average
average_radius = 2
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/userobjects/layered_flow_area_change/layered_flow_area_2D.i)
[Mesh]
[generated]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '4'
ix = '1 1 1'
iy = '40'
subdomain_id = '1 2 1'
[]
[interior_walls]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = interior
input = generated
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[disp_x]
[]
[disp_y]
[]
[channel_dA]
[]
[]
[ICs]
[disp_x_ic]
type = FunctionIC
variable = disp_x
function = 'if (x < 1.5, 0.5 * (y - 2) * 0.1, 0)'
[]
[]
[AuxKernels]
[channel_dA_aux]
type = SpatialUserObjectAux
variable = channel_dA
user_object = layered_area_change
[]
[]
[UserObjects]
[layered_area_change]
type = LayeredFlowAreaChange
direction = y
displacements = 'disp_x disp_y'
boundary = interior
num_layers = 40
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_side_integral_functor/layered_side_integral_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_average_kern]
type = SpatialUserObjectAux
variable = u_layered_average
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = LayeredSideIntegralFunctor
direction = x
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_average
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/userobjects/layered_extremum/layered_extremum_matprop.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 13
nz = 6
[]
[AuxVariables]
[layered_extremum]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[liaux]
type = SpatialUserObjectAux
variable = layered_extremum
user_object = layered_uo
execute_on = 'INITIAL LINEAR'
[]
[]
[UserObjects]
[layered_uo]
type = LayeredExtremumMaterialProperty
direction = y
num_layers = 10
mat_prop = mat
value_type = 'min'
execute_on = 'INITIAL LINEAR'
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = 'mat'
prop_values = 'linear_one'
output_properties = 'mat'
outputs = 'exodus'
[]
[]
[Functions]
[linear_one]
type = ParsedFunction
expression = 'x + 2*y + 1'
[]
[]
[VectorPostprocessors]
[output]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_uo
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
file_base = out
exodus = true
csv = true
[]
(test/tests/userobjects/nearest_point_layered_integral/points_from_uo.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 1.5
ymax = 1.5
zmax = 1.2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[np_layered_integral]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[np_layered_integral]
type = SpatialUserObjectAux
variable = np_layered_integral
execute_on = timestep_end
user_object = npla
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[one]
type = DirichletBC
variable = u
boundary = 'right back top'
value = 1
[]
[]
[UserObjects]
[npla]
type = NearestPointLayeredIntegral
direction = y
num_layers = 3
variable = u
points = '0.375 0.0 0.3
1.125 0.0 0.3
0.375 0.0 0.9
1.125 0.0 0.9'
[]
[]
[VectorPostprocessors]
# getting the points from the user object itself is here exactly equivalent to the points
# provided in the 'spatial_manually_provided' vector postprocessor
[spatial_from_uo]
type = SpatialUserObjectVectorPostprocessor
userobject = npla
[]
[spatial_manually_provided]
type = SpatialUserObjectVectorPostprocessor
userobject = npla
points = '0.375 0.25 0.3
0.375 0.75 0.3
0.375 1.25 0.3
1.125 0.25 0.3
1.125 0.75 0.3
1.125 1.25 0.3
0.375 0.25 0.9
0.375 0.75 0.9
0.375 1.25 0.9
1.125 0.25 0.9
1.125 0.75 0.9
1.125 1.25 0.9'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
execute_on = 'final'
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub_app]
execute_on = timestep_end
positions = '0.3 0.1 0.3 0.7 0.1 0.3'
type = TransientMultiApp
input_files = tosub_sub.i
app_type = MooseTestApp
[../]
[]
[Transfers]
[./layered_transfer]
source_user_object = layered_average
variable = multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[./element_layered_transfer]
source_user_object = layered_average
variable = element_multi_layered_average
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub_app
skip_coordinate_collapsing = true
[../]
[]
(test/tests/userobjects/layered_average/layered_average_bounds_error.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_average]
type = SpatialUserObjectAux
variable = layered_average
execute_on = timestep_end
user_object = average
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[]
[UserObjects]
[./average]
type = LayeredAverage
variable = u
direction = y
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_average/layered_average_bounds.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./layered_average]
type = SpatialUserObjectAux
variable = layered_average
execute_on = timestep_end
user_object = average
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[]
[UserObjects]
[./average]
type = LayeredAverage
variable = u
direction = y
bounds = '0 0.2 0.5 1'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_integral/cumulative_layered_integral.i)
# ##########################################################
# This is a test of the UserObject System. The
# LayeredIntegral UserObject executes independently during
# the solve to compute a user-defined value. In this case
# an integral value in discrete layers along a vector
# in the domain. (Type: ElementalUserObject)
#
# @Requirement F6.40
# ##########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_integral]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./liaux]
type = SpatialUserObjectAux
variable = layered_integral
execute_on = timestep_end
user_object = layered_integral
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[UserObjects]
[./layered_integral]
type = LayeredIntegral
direction = y
num_layers = 3
variable = u
execute_on = linear
cumulative = true
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]