- axisCoordinate axis on which the hump occurs
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Coordinate axis on which the hump occurs
- hump_begin_valueValue before and after the hump
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Value before and after the hump
- hump_center_positionHump center position on selected axis
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Hump center position on selected axis
- hump_center_valueValue at the center of the hump
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Value at the center of the hump
- hump_widthWidth of the hump
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Width of the hump
CosineHumpFunction
Computes a cosine hump of a user-specified width and height
This function is a hump generated by one period of a cosine function, with a user-defined minimum, maximum, location, and width. It is useful for generating smoothly varying functions, for instance, for initial conditions.
Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
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
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/equal_area_with_junction.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/equal_area_no_junction.i)
- (modules/thermal_hydraulics/test/tests/functions/piecewise_function/piecewise_function.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/equal_area_no_junction.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/equal_area_with_junction.i)
References
No citations exist within this document.(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/equal_area_with_junction.i)
# Tests a junction between 2 flow channels of equal area and orientation. A
# sinusoidal density shape is advected to the right and should not be affected
# by the junction; the solution should be identical to the equivalent
# no-junction solution.
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_vel = 1
A = 25
f = 0
fp = fp
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T0]
type = CosineHumpFunction
axis = x
hump_center_position = 1
hump_width = 0.5
hump_begin_value = 250
hump_center_value = 300
[]
[]
[Components]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
# Stagnation property with p = 1e5 Pa, T = 250 K, vel = 1 m/s
p0 = 100000.68965687
T0 = 250.00049261084
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_T = T0
n_elems = 25
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
# NOTE: volume parameters are added via command-line arguments by tests file.
position = '1.02 0 0'
initial_T = T0
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
use_scalar_variables = false
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '1 0 0'
length = 0.96
initial_T = T0
n_elems = 24
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[junction_rho]
type = ElementAverageValue
variable = rhoV
block = 'junction'
execute_on = 'initial timestep_end'
[]
[junction_rhou]
type = ElementAverageValue
variable = rhouV
block = 'junction'
execute_on = 'initial timestep_end'
[]
[junction_rhoE]
type = ElementAverageValue
variable = rhoEV
block = 'junction'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
execute_scalars_on = 'none'
execute_on = 'initial timestep_end'
[]
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/equal_area_no_junction.i)
# Tests a junction between 2 flow channels of equal area and orientation. A
# sinusoidal density shape is advected to the right and should not be affected
# by the junction; the solution should be identical to the equivalent
# no-junction solution.
#
# This input file has no junction and is used for comparison to the results with
# a junction.
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_vel = 1
A = 25
f = 0
fp = fp
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T0]
type = CosineHumpFunction
axis = x
hump_center_position = 1
hump_width = 0.5
hump_begin_value = 250
hump_center_value = 300
[]
[]
[Components]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
# Stagnation property with p = 1e5 Pa, T = 250 K, vel = 1 m/s
p0 = 100000.68965687
T0 = 250.00049261084
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 2
initial_T = T0
n_elems = 50
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[junction_rhoA]
type = PointValue
variable = rhoA
point = '1.02 0 0'
execute_on = 'initial timestep_end'
[]
[junction_rhouA]
type = PointValue
variable = rhouA
point = '1.02 0 0'
execute_on = 'initial timestep_end'
[]
[junction_rhoEA]
type = PointValue
variable = rhoEA
point = '1.02 0 0'
execute_on = 'initial timestep_end'
[]
[junction_rho]
type = ScalePostprocessor
value = junction_rhoA
scaling_factor = 0.04
execute_on = 'initial timestep_end'
[]
[junction_rhou]
type = ScalePostprocessor
value = junction_rhouA
scaling_factor = 0.04
execute_on = 'initial timestep_end'
[]
[junction_rhoE]
type = ScalePostprocessor
value = junction_rhoEA
scaling_factor = 0.04
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
show = 'junction_rho junction_rhou junction_rhoE'
execute_scalars_on = 'none'
execute_on = 'initial timestep_end'
[]
[]
(modules/thermal_hydraulics/test/tests/functions/piecewise_function/piecewise_function.i)
# This test tests the PiecewiseFunction, which pieces functions together.
# Piecing together the 2 CosineTransitionFunction functions should yield the
# CosineHumpFunction function. This test samples the PiecewiseFunction and the
# CosineHumpFunction and compares the samples using the
# VectorPostprocessorComparison post-processor.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Functions]
[function_left]
type = CosineTransitionFunction
axis = y
transition_center = 2
transition_width = 2
function1 = 5
function2 = 20
[]
[function_right]
type = CosineTransitionFunction
axis = y
transition_center = 4
transition_width = 2
function1 = 20
function2 = 5
[]
[function_end]
type = ConstantFunction
value = 5
[]
[function_piecewise]
type = PiecewiseFunction
axis = y
axis_coordinates = '3 5'
functions = 'function_left function_right function_end'
[]
[function_gold]
type = CosineHumpFunction
axis = y
hump_center_position = 3
hump_width = 4
hump_begin_value = 5
hump_center_value = 20
[]
[]
[VectorPostprocessors]
[piecewise_function_vpp]
type = LineFunctionSampler
functions = 'function_piecewise function_gold'
sort_by = y
start_point = '0 0 0'
end_point = '0 6 0'
num_points = 20
execute_on = 'initial'
[]
[]
[Postprocessors]
[matches_gold]
type = VectorPostprocessorComparison
comparison_type = equals
vectorpostprocessor_a = piecewise_function_vpp
vectorpostprocessor_b = piecewise_function_vpp
vector_name_a = function_piecewise
vector_name_b = function_gold
execute_on = 'initial'
[]
[]
[Outputs]
csv = true
show = 'matches_gold'
execute_on = 'initial'
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/equal_area_no_junction.i)
# Tests a junction between 2 flow channels of equal area and orientation. A
# sinusoidal density shape is advected to the right and should not be affected
# by the junction; the solution should be identical to the equivalent
# no-junction solution.
#
# This input file has no junction and is used for comparison to the results with
# a junction.
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_vel = 1
A = 25
f = 0
fp = fp
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T0]
type = CosineHumpFunction
axis = x
hump_center_position = 1
hump_width = 0.5
hump_begin_value = 250
hump_center_value = 300
[]
[]
[Components]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
# Stagnation property with p = 1e5 Pa, T = 250 K, vel = 1 m/s
p0 = 100000.68965687
T0 = 250.00049261084
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 2
initial_T = T0
n_elems = 50
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[junction_rhoA]
type = PointValue
variable = rhoA
point = '1.02 0 0'
execute_on = 'initial timestep_end'
[]
[junction_rhouA]
type = PointValue
variable = rhouA
point = '1.02 0 0'
execute_on = 'initial timestep_end'
[]
[junction_rhoEA]
type = PointValue
variable = rhoEA
point = '1.02 0 0'
execute_on = 'initial timestep_end'
[]
[junction_rho]
type = ScalePostprocessor
value = junction_rhoA
scaling_factor = 0.04
execute_on = 'initial timestep_end'
[]
[junction_rhou]
type = ScalePostprocessor
value = junction_rhouA
scaling_factor = 0.04
execute_on = 'initial timestep_end'
[]
[junction_rhoE]
type = ScalePostprocessor
value = junction_rhoEA
scaling_factor = 0.04
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
show = 'junction_rho junction_rhou junction_rhoE'
execute_scalars_on = 'none'
execute_on = 'initial timestep_end'
[]
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/equal_area_with_junction.i)
# Tests a junction between 2 flow channels of equal area and orientation. A
# sinusoidal density shape is advected to the right and should not be affected
# by the junction; the solution should be identical to the equivalent
# no-junction solution.
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_vel = 1
A = 25
f = 0
fp = fp
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T0]
type = CosineHumpFunction
axis = x
hump_center_position = 1
hump_width = 0.5
hump_begin_value = 250
hump_center_value = 300
[]
[]
[Components]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
# Stagnation property with p = 1e5 Pa, T = 250 K, vel = 1 m/s
p0 = 100000.68965687
T0 = 250.00049261084
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_T = T0
n_elems = 25
[]
[junction]
type = JunctionParallelChannels1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
volume = 1.0
initial_T = T0
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
use_scalar_variables = false
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '1 0 0'
length = 0.96
initial_T = T0
n_elems = 24
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[junction_rho]
type = ElementAverageValue
variable = rhoV
block = 'junction'
execute_on = 'initial timestep_end'
[]
[junction_rhou]
type = ElementAverageValue
variable = rhouV
block = 'junction'
execute_on = 'initial timestep_end'
[]
[junction_rhoE]
type = ElementAverageValue
variable = rhoEV
block = 'junction'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
execute_scalars_on = 'none'
execute_on = 'initial timestep_end'
[]
[]