- TPrescribed temperature [K]
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed temperature [K]
- inputName of the input
C++ Type:BoundaryName
Controllable:No
Description:Name of the input
- m_dotPrescribed mass flow rate [kg/s]
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed mass flow rate [kg/s]
InletMassFlowRateTemperature1Phase
This is a single-phase 1-D flow boundary component in which the mass flow rate and temperature are specified. This boundary is typically used when fluid is expected to flow from an infinitely large tank where the pressure and temperature are known.
Usage
This component must be connected to a FlowChannel1Phase. See how to connect a flow boundary component.
The user specifies the following parameters:
The formulation of this boundary condition assumes flow entering the flow channel at this boundary.
Reversible flow: If exit conditions are encountered, then the boundary condition is automatically changed to an outlet formulation. This behavior can be disabled by setting the "reversible" parameter to false
.
Input Parameters
- reversibleTrueTrue for reversible, false for pure inlet
Default:True
C++ Type:bool
Controllable:No
Description:True for reversible, false for pure inlet
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/phy.unequal_area.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/clg.head.i)
- (modules/thermal_hydraulics/test/tests/components/deprecated/junction_one_to_one.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.child.i)
- (modules/combined/test/tests/subchannel_thm_coupling/THM_SCM_coupling_pump.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/01_flow_channel.i)
- (modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub.i)
- (modules/thermal_hydraulics/test/tests/closures/THM_1phase/thm1phase.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_3eqn.child.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/turbine_startup.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/clg.ctrl_T_3eqn_rdg.i)
- (modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.test.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/flow_channel/steady_state.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/flow_boundary_flux_1phase/test.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/phy.reversed_flow.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
- (modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop.i)
- (modules/combined/test/tests/subchannel_thm_coupling/THM_SCM_coupling.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_elem_3eqn.child.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/phy.massflowrate_3eqn.i)
- (modules/thermal_hydraulics/test/tests/output/vector_velocity/test.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/jac.massflowrate_3eqn_water97.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_volumetric_1phase/err.base.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
- (modules/thermal_hydraulics/test/tests/components/deprecated/gate_valve.i)
- (modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/steady.i)
- (modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/surrogate_power_profile.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/flow_junction_flux_1phase/flow_junction_flux_1phase.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/clg.ctrl_m_dot_3eqn_rdg.i)
- (modules/thermal_hydraulics/test/tests/components/flow_connection/err.connecting_to_non_existent_component.i)
- (modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop_with_junction.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/test.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/volume_junction/base.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/specific_impulse_1phase/Isp_1ph.i)
- (modules/thermal_hydraulics/test/tests/misc/mesh_block_interaction/test.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/jacobian.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
- (modules/thermal_hydraulics/test/tests/components/gate_valve_1phase/gate_valve_1phase.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/flow_channel/test.i)
- (modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.conservation.i)
- (modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub_2phase.i)
- (modules/thermal_hydraulics/test/tests/base/simulation/err.no_smp.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
Formulation
This boundary condition uses a ghost cell formulation, where the ghost cell solution is computed from the following quantities:
, the provided exterior mass flow rate,
, the provided exterior temperature, and
, the interior pressure.
If the boundary is specified to be reversible ("reversible" set to true
) and the flow is exiting, the ghost cell is instead computed with the following quantities:
, the provided exterior mass flow rate,
, the interior density, and
, the interior specific total energy.
m_dot
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed mass flow rate [kg/s]
T
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed temperature [K]
reversible
Default:True
C++ Type:bool
Controllable:No
Description:True for reversible, false for pure inlet
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/phy.unequal_area.i)
# Junction between 2 pipes where the second has half the area of the first.
# The momentum density of the second should be twice that of the first.
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 300
initial_p = 1e5
initial_vel_x = 50
initial_vel_y = 0
initial_vel_z = 0
f = 0
fp = eos
scaling_factor_1phase = '1 1e-2 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 250
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
n_elems = 20
initial_vel = 20
[]
[junction]
type = JunctionParallelChannels1Phase
connections = 'pipe1:out pipe2:in'
scaling_factor_rhouV = 1e-4
scaling_factor_rhoEV = 1e-5
position = '1 0 0'
volume = 1e-8
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 0.5
n_elems = 20
initial_vel = 15
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-10
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0
end_time = 3
dt = 0.1
abort_on_solve_fail = true
[]
[Postprocessors]
# These post-processors are used to test that the outlet side of the junction,
# which has half the area of the inlet side, has twice the momentum density
# that the inlet side does.
[rhouA_pipe1]
type = SideAverageValue
variable = rhouA
boundary = pipe1:out
[]
[rhouA_pipe2]
type = SideAverageValue
variable = rhouA
boundary = pipe2:out
[]
[test_rel_err]
type = RelativeDifferencePostprocessor
value1 = rhouA_pipe1
value2 = rhouA_pipe2
[]
[]
[Outputs]
[out]
type = CSV
show = test_rel_err
execute_on = 'final'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/clg.head.i)
[GlobalParams]
initial_T = 393.15
initial_vel = 0.0372
f = 0
fp = fp
scaling_factor_1phase = '1e-2 1e-2 1e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[pump_head_fn]
type = PiecewiseLinear
x = '0 0.5'
y = '0 1 '
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 20
T = 393.15
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 0.567
initial_p = 1.318964e+07
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
head = 0
volume = 0.567
A_ref = 0.567
initial_p = 1.318964e+07
initial_vel_x = 0.0372
initial_vel_y = 0
initial_vel_z = 0
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhoEV = 1e-5
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '1 0 0'
length = 0.96
n_elems = 10
A = 0.567
initial_p = 1.4072e+07
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1.4072e+07
[]
[]
[ControlLogic]
[pump_head_ctrl]
type = TimeFunctionComponentControl
component = pump
parameter = head
function = pump_head_fn
[]
[]
[Postprocessors]
[pump_head]
type = RealComponentParameterValuePostprocessor
component = pump
parameter = head
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.1
num_steps = 10
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
[out]
type = CSV
show = 'pump_head'
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/deprecated/junction_one_to_one.i)
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
fp = fp
f = 0.0
initial_T = 300
initial_p = 1e5
initial_vel = 0
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.02897
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 1
T = 300
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 2
A = 0.1
[]
[valve]
type = JunctionOneToOne
connections = 'pipe1:out pipe2:in'
[]
[pipe2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 2
A = 0.1
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 0.01
abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.child.i)
[GlobalParams]
initial_p = 1e5
initial_vel = 0.5
initial_T = 300.0
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1e-2 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 2
A = 1
n_elems = 10
f = 0
[]
[form_loss]
type = FormLossFromExternalApp1Phase
flow_channel = pipe
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 680
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 1e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
abort_on_solve_fail = true
timestep_tolerance = 5e-14
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 5e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 20
start_time = 0.0
end_time = 4.0
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
exodus = true
show = 'K_prime p'
[]
(modules/combined/test/tests/subchannel_thm_coupling/THM_SCM_coupling_pump.i)
# THM file based on https://mooseframework.inl.gov/modules/thermal_hydraulics/tutorials/single_phase_flow/step05.html
# Used to loosely couple THM with SCM
# This is a simple closed loop with a pump providing pressure head, core, pressurizer and HX.
# THM sends massflux and temperature at the inlet of the core, and pressure at the outlet of the core
# to subchannel. Subchannel returns total pressure drop of the assembly and total power to THM and THM calculates an
# average friction factor for the core region.
T_in = 583.0 # K
press = 2e5 # Pa
SC_core = 0.0004980799633447909 #m2
# core parameters
core_length = 1. # m
core_n_elems = 1
A_core = 0.005 #dummy
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = sodium_eos
[]
[Functions]
[q_wall_fn]
type = ParsedFunction
symbol_names = 'core_power length'
symbol_values = 'core_power ${core_length}'
expression = 'core_power/length'
[]
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[sodium_eos]
type = StiffenedGasFluidProperties
gamma = 1.24
cv = 1052.8
q = -2.6292e+05
p_inf = 1.1564e+08
q_prime = 0
mu = 3.222e-04
k = 73.82
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[none_closures]
type = Closures1PhaseNone
[]
[]
[Materials]
[f_mat]
type = ADParsedMaterial
property_name = f_D
postprocessor_names = 'core_f'
expression = 'core_f'
block = 'core_chan'
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 -0.5'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
A = ${A_core}
closures = none_closures
[]
[core_ht]
type = HeatTransferFromHeatFlux1Phase
flow_channel = core_chan
q_wall = q_wall_fn
P_hf = 1
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 1.5'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 1.5'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 1.5'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = 580
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 1.5'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.25'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.25'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.25'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
materials = 'steel'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 -0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 -0.25'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 -0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 -0.5'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 -0.5'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 3.56
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 -0.5'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = ${m_dot_sec_in}
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateDirectFlowChannel
q_wall_prop = q_wall
block = core_chan
P_hf = 1
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[T_out]
type = SideAverageValue
boundary = bottom_1:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = up_pipe_1:out
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = up_pipe_2:in
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
############## Friction Factor Calculation #############
[av_rhouA]
type = ElementAverageValue
variable = 'rhouA'
block = 'core_chan'
[]
[av_rho]
type = ElementAverageValue
variable = 'rho'
block = 'core_chan'
[]
[Kloss]
type = ParsedPostprocessor
pp_names = 'core_delta_p_tgt av_rhouA av_rho'
function = '2.0 * core_delta_p_tgt * av_rho * ${A_core} * ${A_core} / (av_rhouA * av_rhouA)'
[]
[Dh]
type = ADElementAverageMaterialProperty
mat_prop = D_h
block = core_chan
[]
[core_f]
type = ParsedPostprocessor
pp_names = 'Kloss Dh'
function = 'Kloss * Dh / ${core_length}'
[]
### INFO to send to SC
[outlet_pressure]
type = SideAverageValue
boundary = up_pipe_2:in
variable = p
[]
[inlet_mass_flow_rate]
type = ADFlowJunctionFlux1Phase
boundary = up_pipe_1:out
connection_index = 0
equation = mass
junction = jct1
[]
[inlet_temperature]
type = SideAverageValue
boundary = up_pipe_1:out
variable = T
[]
[inlet_mass_flux]
type = ParsedPostprocessor
pp_names = 'inlet_mass_flow_rate'
function = 'abs(inlet_mass_flow_rate/${SC_core})'
[]
#####
##### Info received from subchannel
[core_delta_p_tgt]
type = Receiver
default = 100
[]
[core_power]
type = Receiver
default = 100
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 2
[]
dtmax = 50
end_time = 10
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-7
nl_max_its = 25
fixed_point_min_its = 1
fixed_point_max_its = 5
accept_on_max_fixed_point_iteration = true
auto_advance = true
relaxation_factor = 0.5
[]
[Outputs]
csv = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
################################################################################
# A multiapp that couples THM to subchannel
################################################################################
[MultiApps]
# active = ''
[subchannel]
type = FullSolveMultiApp
input_files = 'subchannel.i'
execute_on = 'timestep_end'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
bounding_box_padding = '0 0 0.1'
[]
[]
[Transfers]
# active = ''
[pressure_drop_transfer] # Get pressure drop to THM from subchannel
type = MultiAppPostprocessorTransfer
from_multi_app = subchannel
from_postprocessor = total_pressure_drop_SC
to_postprocessor = core_delta_p_tgt
reduction_type = average
execute_on = 'timestep_end'
[]
[power_transfer] # Get Total power to THM from subchannel
type = MultiAppPostprocessorTransfer
from_multi_app = subchannel
from_postprocessor = Total_power
to_postprocessor = core_power
reduction_type = average
execute_on = 'timestep_end'
[]
[mass_flux_tranfer] # Send mass_flux at the inlet of THM core to subchannel
type = MultiAppPostprocessorTransfer
to_multi_app = subchannel
from_postprocessor = inlet_mass_flux
to_postprocessor = report_mass_flux_inlet
execute_on = 'timestep_end'
[]
[outlet_pressure_tranfer] # Send pressure at the outlet of THM core to subchannel
type = MultiAppPostprocessorTransfer
to_multi_app = subchannel
from_postprocessor = outlet_pressure
to_postprocessor = report_pressure_outlet
execute_on = 'timestep_end'
[]
[inlet_temperature_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = subchannel
from_postprocessor = inlet_temperature
to_postprocessor = report_temperature_inlet
execute_on = 'timestep_end'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 2
rho = 3
[]
[]
[Components]
[fch1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 2
A = 1
closures = simple_closures
fp = fp
f = 0.01
initial_p = 1e5
initial_T = 300
initial_vel = 0
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 2
names = 'blk'
widths = '0.1'
n_part_elems = '1'
solid_properties = 'mat'
solid_properties_T_ref = '300'
initial_T = 300
[]
[hx]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = START
flow_channel = fch1
Hw = 0
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'fch1:in'
m_dot = 1
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'fch1:out'
p = 1e5
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.1
num_steps = 1
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/01_flow_channel.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'core_chan:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 1
n_elems = 25
A = 7.2548e-3
D_h = 7.0636e-2
[]
[outlet]
type = Outlet1Phase
input = 'core_chan:out'
p = ${press}
[]
[]
[Postprocessors]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
line_search = basic
start_time = 0
end_time = 1000
dt = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub.i)
# This is a part of T_wall_action test. See the master file for details.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[AuxVariables]
[Hw]
family = monomial
order = constant
block = pipe1
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = 'Hw'
[]
[]
[UserObjects]
[T_uo]
type = LayeredAverage
direction = y
variable = T
num_layers = 10
block = pipe1
[]
[Hw_uo]
type = LayeredAverage
direction = y
variable = Hw
num_layers = 10
block = pipe1
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 10
A = 1.28584e-01
D_h = 8.18592e-01
f = 0.01
fp = eos
[]
[hxconn]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe1
Hw = 10000
P_hf = 6.28319e-01
initial_T_wall = 300.
var_type = elemental
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 400
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[T_wall_avg]
type = ElementAverageValue
variable = T_wall
execute_on = 'INITIAL TIMESTEP_END'
[]
[htc_avg]
type = ElementAverageValue
variable = Hw
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
dtmin = 1e-7
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-4
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T Hw'
[]
[]
(modules/thermal_hydraulics/test/tests/closures/THM_1phase/thm1phase.i)
D = 0.1
A = '${fparse (1./4.)*pi*D^2}'
P_hf = '${fparse pi*D}'
D_h = '${fparse 4*A/P_hf}'
mdot = 0.04
file_base = 'db_churchill'
[GlobalParams]
gravity_vector = '0 0 0'
initial_vel = 0.003
initial_p = 1e5
initial_T = 300
D_h = ${D_h}
A = ${A}
P_hf = ${P_hf}
m_dot = ${mdot}
closures = thm
execute_on = 'initial timestep_begin'
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.56361
mu = 8.84e-05
[]
[]
[Closures]
[thm]
type = Closures1PhaseTHM
wall_htc_closure = dittus_boelter
wall_ff_closure = churchill
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = water
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
[]
#--------------Pipe BCs-------------#
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 1e5
[]
[ht]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = 'pipe'
T_wall = 500
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1e-5
[]
[Postprocessors]
[Hw]
type = ADElementAverageMaterialProperty
mat_prop = Hw
[]
[f]
type = ADElementAverageMaterialProperty
mat_prop = f_D
block = pipe
[]
[]
[Outputs]
csv = true
file_base = ${file_base}
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_3eqn.child.i)
# This is a part of phy.T_wall_transfer_3eqn test. See the master file for details.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hxconn]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe1
Hw = 3000
P_hf = 6.2831853072e-01
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 1
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.5
dtmin = 1e-7
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-4
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
end_time = 5
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/turbine_startup.i)
# This test tests that the turbine can startup from rest and reach full power.
# The mass flow rate for the inlet component is ramped up over 10s. The dyno
# component and pid_ctrl controler are used to maintain the turbine's rated shaft
# speed. The turbine should supply ~1e6 W of power to the shaft by the end of the test.
omega_rated = 450
mdot = 5.0
T_in = 1000.0
p_out = 1e6
[GlobalParams]
f = 1
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
n_elems = 20
initial_T = ${T_in}
initial_p = ${p_out}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[FluidProperties]
[eos]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[ch_in]
type = FlowChannel1Phase
position = '-1 0 0'
orientation = '1 0 0'
length = 1
A = 0.1
D_h = 1
fp = eos
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'ch_in:in'
m_dot = 0
T = ${T_in}
[]
[turbine]
type = ShaftConnectedTurbine1Phase
inlet = 'ch_in:out'
outlet = 'ch_out:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
A_ref = 0.1
volume = 0.0002
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
speed_cr_I = 1e12
speed_cr_fr = 0
tau_fr_coeff = '0 0 0 0'
tau_fr_const = 0
omega_rated = ${omega_rated}
D_wheel = 0.4
head_coefficient = head
power_coefficient = power
[]
[ch_out]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 0.1
D_h = 1
fp = eos
[]
[outlet]
type = Outlet1Phase
input = 'ch_out:out'
p = ${p_out}
[]
[dyno]
type = ShaftConnectedMotor
inertia = 10
torque = -450
[]
[shaft]
type = Shaft
connected_components = 'turbine dyno'
initial_speed = ${omega_rated}
[]
[]
[Functions]
[head]
type = PiecewiseLinear
x = '0 7e-3 1e-2'
y = '0 15 20'
[]
[power]
type = PiecewiseLinear
x = '0 6e-3 1e-2'
y = '0 0.05 0.18'
[]
[mfr_fn]
type = PiecewiseLinear
x = '0 10'
y = '1e-6 ${mdot}'
[]
[dts]
type = PiecewiseConstant
y = '5e-3 1e-2 5e-2 5e-1'
x = '0 0.5 1 10'
[]
[]
[ControlLogic]
[mfr_cntrl]
type = TimeFunctionComponentControl
component = inlet
parameter = m_dot
function = mfr_fn
[]
[speed_set_point]
type = GetFunctionValueControl
function = ${omega_rated}
[]
[pid_ctrl]
type = PIDControl
input = omega
set_point = speed_set_point:value
K_i = 2
K_p = 5
K_d = 5
initial_value = -450
[]
[set_torque_value]
type = SetComponentRealValueControl
component = dyno
parameter = torque
value = pid_ctrl:output
[]
[]
[Postprocessors]
[omega]
type = ScalarVariable
variable = shaft:omega
execute_on = 'initial timestep_end'
[]
[flow_coefficient]
type = ElementAverageValue
variable = flow_coeff
block = 'turbine'
execute_on = 'initial timestep_end'
[]
[delta_p]
type = ElementAverageValue
variable = delta_p
block = 'turbine'
execute_on = 'initial timestep_end'
[]
[power]
type = ElementAverageValue
variable = power
block = 'turbine'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
[TimeStepper]
type = FunctionDT
function = dts
[]
end_time = 20
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 30
l_tol = 1e-4
l_max_its = 20
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
[console]
type = Console
max_rows = 1
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/clg.ctrl_T_3eqn_rdg.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_T = 300
initial_vel = 0.0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 50
A = 1.0000000000e-04
D_h = 1.1283791671e-02
f = 0.0
fp = fp
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 1e5
[]
[]
[Functions]
[inlet_T_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 350'
[]
[]
[ControlLogic]
[set_inlet_value]
type = TimeFunctionComponentControl
component = inlet
parameter = T
function = inlet_T_fn
[]
[]
[Postprocessors]
[inlet_T]
type = RealComponentParameterValuePostprocessor
component = inlet
parameter = T
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
dt = 0.25
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.test.i)
[GlobalParams]
initial_p = 1e6
initial_T = 517
initial_vel = 1.0
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
fp = fp
closures = simple_closures
f = 0
gravity_vector = '0 0 0'
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.01
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 517
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
[]
[turbine]
type = SimpleTurbine1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1
on = true
power = 1000
[]
[pipe2]
type = FlowChannel1Phase
position = '1. 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
dt = 1
num_steps = 10
abort_on_solve_fail = true
solve_type = 'newton'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
nl_max_its = 5
l_tol = 1e-4
[]
[Outputs]
exodus = true
show = 'p T vel'
velocity_as_vector = false
time_step_interval = 5
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/flow_channel/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
initial_T = 500
initial_p = 6.e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial final'
velocity_as_vector = false
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
10 ${m_dot_sec_in}'
[]
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[Materials]
[Re_mat]
type = ADReynoldsNumberMaterial
Re = Re
rho = rho
vel = vel
D_h = D_h
mu = mu
block = hx/pri
[]
[f_mat]
type = ADParsedMaterial
property_name = f_D
constant_names = 'a b c'
constant_expressions = '1 0.1 -0.5'
material_property_names = 'Re'
expression = 'a + b * Re^c'
block = hx/pri
[]
[Pr_mat]
type = ADPrandtlNumberMaterial
Pr = Pr
cp = cp
mu = mu
k = k
block = hx/pri
[]
[Nu_mat]
type = ADParsedMaterial
property_name = 'Nu'
constant_names = 'a b c'
constant_expressions = '0.03 0.9 0.5'
material_property_names = 'Re Pr'
expression = 'a * Re ^b * Pr^c'
block = hx/pri
[]
[Hw_mat]
type = ADConvectiveHeatTransferCoefficientMaterial
D_h = D_h
k = k
Nu = Nu
Hw = Hw
block = hx/pri
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = ${A_core}
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.75'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
closures = ''
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
solid_properties = 'steel'
solid_properties_T_ref = '300'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 0.5'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0.0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[m_dot_sec_inlet_ctrl]
type = GetFunctionValueControl
function = m_dot_sec_fn
[]
[set_m_dot_sec_ctrl]
type = SetComponentRealValueControl
component = inlet_sec
parameter = m_dot
value = m_dot_sec_inlet_ctrl:value
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
[Hw_hx_pri]
type = ADElementAverageMaterialProperty
mat_prop = Hw
block = hx/pri
[]
[fD_hx_pri]
type = ADElementAverageMaterialProperty
mat_prop = f_D
block = hx/pri
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/postprocessors/flow_boundary_flux_1phase/test.i)
T_in = 300
p_out = 1e5
[GlobalParams]
initial_p = ${p_out}
initial_T = ${T_in}
initial_vel = 0
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 50
f = 0
scaling_factor_1phase = '1 1e-2 1e-4'
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'channel:in'
m_dot = 0.1
T = ${T_in}
[]
[channel]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 3
[]
[outlet]
type = Outlet1Phase
p = ${p_out}
input = 'channel:out'
[]
[]
[Postprocessors]
[m_dot_in]
type = ADFlowBoundaryFlux1Phase
boundary = 'inlet'
equation = mass
[]
[m_dot_out]
type = ADFlowBoundaryFlux1Phase
boundary = 'outlet'
equation = mass
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
num_steps = 10
dt = 0.1
solve_type = NEWTON
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 25
l_tol = 1e-3
l_max_its = 5
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
[out]
type = CSV
show = 'm_dot_in m_dot_out'
execute_on = 'final'
[]
[]
(modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/phy.reversed_flow.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 444.447
initial_p = 7e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
A = 1.0000000000e-04
D_h = 1.1283791671e-02
f = 0.1
length = 1
n_elems = 20
[]
[in]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = -0.18
T = 444.447
[]
[out]
type = InletStagnationPressureTemperature1Phase
input = 'pipe:out'
p0 = 7e6
T0 = 444.447
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
start_time = 0.0
num_steps = 30
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
abort_on_solve_fail = true
[]
[Outputs]
[exodus]
type = Exodus
file_base = phy.reversed_flow
show = 'rhouA T p'
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
10 ${m_dot_sec_in}'
[]
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = ${A_core}
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.75'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
solid_properties = 'steel'
solid_properties_T_ref = '300'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 0.5'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0.0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[m_dot_sec_inlet_ctrl]
type = GetFunctionValueControl
function = m_dot_sec_fn
[]
[set_m_dot_sec_ctrl]
type = SetComponentRealValueControl
component = inlet_sec
parameter = m_dot
value = m_dot_sec_inlet_ctrl:value
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop.i)
nelem = 100
friction_factor = 1e4
area = 0.176752
mfr_final = 1.0
p_out = 7e6
T_in = 300
ramp_time = 5.0
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = ${T_in}
initial_p = ${p_out}
initial_vel = 0
closures = closures
rdg_slope_reconstruction = full
scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
[h2]
type = IdealGasFluidProperties
gamma = 1.3066
molar_mass = 2.016e-3
k = 0.437
mu = 3e-5
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[bc_inlet]
type = InletMassFlowRateTemperature1Phase
input = 'ch_1:in'
m_dot = 0 # This value is controlled by 'mfr_ctrl'
T = ${T_in}
[]
[ch_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = ${nelem}
A = ${area}
f = ${friction_factor}
fp = h2
[]
[bc_outlet]
type = Outlet1Phase
input = 'ch_1:out'
p = ${p_out}
[]
[]
[Functions]
[mfr_fn]
type = PiecewiseLinear
x = '0 ${ramp_time}'
y = '0 ${mfr_final}'
[]
[]
[ControlLogic]
[mfr_ctrl]
type = TimeFunctionComponentControl
component = bc_inlet
parameter = m_dot
function = mfr_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[pressure_vpp]
type = ADSampler1DReal
block = 'ch_1'
property = 'p'
sort_by = x
execute_on = 'FINAL'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 50
dt = 1
steady_state_detection = true
steady_state_start_time = ${ramp_time}
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[csv]
type = CSV
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
(modules/combined/test/tests/subchannel_thm_coupling/THM_SCM_coupling.i)
# THM file based on https://mooseframework.inl.gov/modules/thermal_hydraulics/tutorials/single_phase_flow/step05.html
# Used to loosely couple THM with SCM
# This is a simple open loop with fixed massflow at the inlet and pressure at the outlet.
# THM sends massflux and temperature at the inlet of the core, and pressure at the outlet of the core
# to subchannel. Subchannel returns total pressure drop of the assembly and total power to THM and THM calculates an
# average friction factor for the core region.
T_in = 583.0 # K
m_dot_in = 1 # kg/s
press = 2e5 # Pa
SC_core = 0.0004980799633447909 #m2
# core parameters
core_length = 1. # m
core_n_elems = 1
A_core = 0.005 #dummy
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = sodium_eos
[]
[Functions]
[q_wall_fn]
type = ParsedFunction
symbol_names = 'core_power length'
symbol_values = 'core_power ${core_length}'
expression = 'core_power/length'
[]
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[sodium_eos]
type = StiffenedGasFluidProperties
gamma = 1.24
cv = 1052.8
q = -2.6292e+05
p_inf = 1.1564e+08
q_prime = 0
mu = 3.222e-04
k = 73.82
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[none_closures]
type = Closures1PhaseNone
[]
[]
[Materials]
[f_mat]
type = ADParsedMaterial
property_name = f_D
postprocessor_names = 'core_f'
expression = 'core_f'
block = 'core_chan'
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'bottom_2:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[outlet]
type = Outlet1Phase
input = 'bottom_1:out'
p = ${press}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 -0.5'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
A = ${A_core}
closures = none_closures
[]
[core_ht]
type = HeatTransferFromHeatFlux1Phase
flow_channel = core_chan
q_wall = q_wall_fn
P_hf = 1
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 1.5'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 1.5'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in'
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 1.5'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.25'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.25'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.25'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
materials = 'steel'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 -0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 -0.25'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 -0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 -0.5'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 -0.5'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = ${m_dot_sec_in}
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateDirectFlowChannel
q_wall_prop = q_wall
block = core_chan
P_hf = 1
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[T_out]
type = SideAverageValue
boundary = bottom_1:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = up_pipe_1:out
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = up_pipe_2:in
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
############## Friction Factor Calculation #############
[av_rhouA]
type = ElementAverageValue
variable = 'rhouA'
block = 'core_chan'
[]
[av_rho]
type = ElementAverageValue
variable = 'rho'
block = 'core_chan'
[]
[Kloss]
type = ParsedPostprocessor
pp_names = 'core_delta_p_tgt av_rhouA av_rho'
function = '2.0 * core_delta_p_tgt * av_rho * ${A_core} * ${A_core} / (av_rhouA * av_rhouA)'
[]
[Dh]
type = ADElementAverageMaterialProperty
mat_prop = D_h
block = core_chan
[]
[core_f]
type = ParsedPostprocessor
pp_names = 'Kloss Dh'
function = 'Kloss * Dh / ${core_length}'
[]
### INFO to send to SC
[outlet_pressure]
type = SideAverageValue
boundary = up_pipe_2:in
variable = p
[]
[inlet_mass_flow_rate]
type = ADFlowJunctionFlux1Phase
boundary = up_pipe_1:out
connection_index = 0
equation = mass
junction = jct1
[]
[inlet_temperature]
type = SideAverageValue
boundary = up_pipe_1:out
variable = T
[]
[inlet_mass_flux]
type = ParsedPostprocessor
pp_names = 'inlet_mass_flow_rate'
function = 'abs(inlet_mass_flow_rate/${SC_core})'
[]
#####
##### Info received from subchannel
[core_delta_p_tgt]
type = Receiver
default = 100
[]
[core_power]
type = Receiver
default = 100
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
[]
# dtmax = 5
end_time = 5
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
csv = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
################################################################################
# A multiapp that couples THM to subchannel
################################################################################
[MultiApps]
[subchannel]
type = FullSolveMultiApp
input_files = 'subchannel.i'
execute_on = 'timestep_end'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
bounding_box_padding = '0 0 0.1'
[]
[]
[Transfers]
[pressure_drop_transfer] # Get pressure drop to THM from subchannel
type = MultiAppPostprocessorTransfer
from_multi_app = subchannel
from_postprocessor = total_pressure_drop_SC
to_postprocessor = core_delta_p_tgt
reduction_type = average
execute_on = 'timestep_end'
[]
[power_transfer] # Get Total power to THM from subchannel
type = MultiAppPostprocessorTransfer
from_multi_app = subchannel
from_postprocessor = Total_power
to_postprocessor = core_power
reduction_type = average
execute_on = 'timestep_end'
[]
[mass_flux_tranfer] # Send mass_flux at the inlet of THM core to subchannel
type = MultiAppPostprocessorTransfer
to_multi_app = subchannel
from_postprocessor = inlet_mass_flux
to_postprocessor = report_mass_flux_inlet
execute_on = 'timestep_end'
[]
[outlet_pressure_tranfer] # Send pressure at the outlet of THM core to subchannel
type = MultiAppPostprocessorTransfer
to_multi_app = subchannel
from_postprocessor = outlet_pressure
to_postprocessor = report_pressure_outlet
execute_on = 'timestep_end'
[]
[inlet_temperature_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = subchannel
from_postprocessor = inlet_temperature
to_postprocessor = report_temperature_inlet
execute_on = 'timestep_end'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_elem_3eqn.child.i)
# This is a part of phy.T_wall_transfer_elem_3eqn test. See the master file for details.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hxconn]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe1
Hw = 3000
P_hf = 6.2831853072e-01
initial_T_wall = 300.
var_type = elemental
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 1
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.5
dtmin = 1e-7
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-4
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
end_time = 5
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall'
[]
[]
(modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/phy.massflowrate_3eqn.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 444.447
initial_p = 7e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
A = 1.0000000000e-04
D_h = 1.1283791671e-02
f = 0.1
length = 1
n_elems = 20
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.18
T = 444.447
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 7e6
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
start_time = 0.0
num_steps = 30
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 100
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
file_base = 'phy.massflowrate_3eqn'
[exodus]
type = Exodus
show = 'rhouA T p'
[]
[]
(modules/thermal_hydraulics/test/tests/output/vector_velocity/test.i)
[GlobalParams]
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
initial_p = 1e5
initial_T = 300
f = 0.1
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'fch1:in'
m_dot = 1
T = 300
[]
[fch1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 1 1'
length = 1.73205
n_elems = 5
A = 1
[]
[junction]
type = VolumeJunction1Phase
position = '1 1 1'
connections = 'fch1:out fch2:out'
volume = 0.1
[]
[fch2]
type = FlowChannel1Phase
position = '2 2 2'
orientation = '-1 -1 -1'
length = 1.73205
n_elems = 5
A = 2
[]
[outlet]
type = Outlet1Phase
input = 'fch2:in'
p = 1e5
[]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 50
solve_type = NEWTON
line_search = basic
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-6
l_tol = 1e-03
automatic_scaling = true
[]
[Outputs]
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
print_linear_residuals = false
[out]
type = Exodus
sync_only = false
sync_times = '0 5 10 15 20 25'
show = 'vel_x vel_y vel_z'
[]
[]
(modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/jac.massflowrate_3eqn_water97.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 444.447
initial_p = 7e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = Water97FluidProperties
T_initial_guess = 444.447
p_initial_guess = 7e6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
A = 1.0000000000e-04
D_h = 1.1283791671e-02
f = 0.1
length = 1
n_elems = 4
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.18
T = 444.447
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 7e6
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
start_time = 0.0
num_steps = 30
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 100
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_volumetric_1phase/err.base.i)
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[total_power]
type = TotalPower
power = 1
[]
[fch1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 1
n_elems = 2
A = 1
f = 0.1
fp = fp
closures = simple_closures
initial_T = 300
initial_p = 1e05
initial_vel = 0
[]
[hs]
type = HeatSourceVolumetric1Phase
flow_channel = fch1
q = 1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = fch1:in
m_dot = 1
T = 300
[]
[outlet]
type = Outlet1Phase
input = fch1:out
p = 1e-5
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_from_file = 'steady_state_out.e'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'core_chan:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[outlet]
type = Outlet1Phase
input = 'core_chan:out'
p = ${press}
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 10
[]
end_time = 5000
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/deprecated/gate_valve.i)
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
fp = fp
f = 0.0
initial_T = 300
initial_p = 1e5
initial_vel = 0
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.02897
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 1
T = 300
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 2
A = 0.1
[]
[valve]
type = GateValve
connections = 'pipe1:out pipe2:in'
open_area_fraction = 1
[]
[pipe2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 2
A = 0.1
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 0.01
abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/steady.i)
# Tests that a flow channel can run with Steady executioner.
#
# Note that this solve may fail to converge based on initial guess. For example,
# having a guess with velocity set to zero will fail to converge.
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 2
T = 500
[]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
gravity_vector = '0 0 0'
length = 1.0
n_elems = 50
A = 1.0
initial_T = 300
initial_p = 1e5
initial_vel = 1
f = 10.0
closures = simple_closures
fp = fp
scaling_factor_1phase = '1 1 1e-5'
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 2e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-7
nl_abs_tol = 1e-7
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/surrogate_power_profile.i)
# This takes an exodus file with a power profile and uses that in a heat structure
# of a core channel as power density. This tests the capability of taking a
# rattlesnake generated power profile and using it in RELAP-7.
[GlobalParams]
initial_p = 15.5e6
initial_vel = 0.
initial_T = 559.15
gravity_vector = '0 -9.8 0'
scaling_factor_1phase = '1 1 1e-4'
scaling_factor_temperature = 1e-2
closures = simple_closures
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 0.6
cp = 1.
rho = 1.
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 21.5
cp = 350.
rho = 6.55e3
[]
[]
[Components]
[CCH1:pipe]
type = FlowChannel1Phase
position = '0.02 0 0'
orientation = '0 1 0'
length = 3.865
n_elems = 20
A = 8.78882e-5
D_h = 0.01179
f = 0.01
fp = water
[]
[CCH1:solid]
type = HeatStructureCylindrical
position = '0.024748 0 0'
orientation = '0 1 0'
length = 3.865
n_elems = 20
initial_T = 559.15
names = 'fuel gap clad'
widths = '0.004096 0.0001 0.000552'
n_part_elems = '5 1 2'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[CCH1:hx]
type = HeatTransferFromHeatStructure1Phase
flow_channel = CCH1:pipe
hs = CCH1:solid
hs_side = outer
Hw = 5.33e4
P_hf = 2.9832563838489e-2
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'CCH1:pipe:in'
m_dot = 0.1
T = 559.15
[]
[outlet]
type = Outlet1Phase
input = 'CCH1:pipe:out'
p = 15.5e6
[]
[]
[UserObjects]
[reactor_power_density_uo]
type = SolutionUserObject
mesh = 'power_profile.e'
system_variables = power_density
translation = '0. 0. 0.'
[]
[]
[Functions]
[power_density_fn]
type = SolutionFunction
from_variable = power_density
solution = reactor_power_density_uo
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'CCH1:solid:fuel'
[]
[]
[AuxKernels]
[power_density_aux]
type = FunctionAux
variable = power_density
function = power_density_fn
block = 'CCH1:solid:fuel'
execute_on = 'timestep_begin'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
num_steps = 10
dt = 1e-2
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
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
[out]
type = Exodus
[]
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/postprocessors/flow_junction_flux_1phase/flow_junction_flux_1phase.i)
# This input file tests mass conservation at steady-state by looking at the
# net mass flux into the domain.
T_in = 523.0
m_dot = 100
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = 1
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletMassFlowRateTemperature1Phase
input = 'inlet:in'
m_dot = ${m_dot}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 3
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 1
connections = 'inlet:out channel1:in channel2:in'
volume = 1
scaling_factor_rhoEV = '1e-5'
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[K_bypass]
type = FormLossFromFunction1Phase
K_prime = 500
flow_channel = channel1
[]
[channel2]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 1
D_h = 1
[]
[outlet_plenum]
type = VolumeJunction1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 1
connections = 'channel1:out channel2:out outlet:in'
volume = 1
scaling_factor_rhoEV = '1e-5'
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 1
[]
[outlet_bc]
type = Outlet1Phase
p = ${p_out}
input = 'outlet:out'
[]
[]
[Postprocessors]
[inlet_in_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'inlet_bc'
equation = mass
[]
[inlet_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'inlet:out'
connection_index = 0
junction = inlet_plenum
equation = mass
[]
[channel1_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:in'
connection_index = 1
junction = inlet_plenum
equation = mass
[]
[channel1_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:out'
connection_index = 0
junction = outlet_plenum
equation = mass
[]
[channel2_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:in'
connection_index = 2
junction = inlet_plenum
equation = mass
[]
[channel2_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:out'
connection_index = 1
junction = outlet_plenum
equation = mass
[]
[outlet_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'outlet:in'
connection_index = 2
junction = outlet_plenum
equation = mass
[]
[outlet_out_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'outlet_bc'
equation = mass
[]
[net_mass_flow_rate_domain]
type = LinearCombinationPostprocessor
pp_names = 'inlet_in_m_dot outlet_out_m_dot'
pp_coefs = '1 -1'
[]
[net_mass_flow_rate_volume_junction]
type = LinearCombinationPostprocessor
pp_names = 'inlet_out_m_dot channel1_in_m_dot channel2_in_m_dot'
pp_coefs = '1 -1 -1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 10000
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = none
nl_rel_tol = 1e-8
nl_abs_tol = 2e-8
nl_max_its = 25
l_tol = 1e-3
l_max_its = 5
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'net_mass_flow_rate_domain net_mass_flow_rate_volume_junction'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i)
# This test has 2 pipes, each surrounded by a cylindrical HS:
#
# - pipe1: no fin heat transfer enhancement
# - pipe2: fin heat transfer enhancement
diam = 0.01
area = ${fparse 0.25 * pi * diam^2}
length = 1.0
n_elems = 10
t_hs = 0.02
n_elems_radial = 5
rho_inlet = 1359.792245 # @ T = 300 K, p = 1e5 Pa
vel_inlet = 1.0
T_inlet = 300
p_outlet = 1e5
T_initial_hs = 800
mfr_inlet = ${fparse rho_inlet * vel_inlet * area}
htc = 100
# Suppose that there are 20 rectangular, 1-mm-thick fins of height 1 mm over the length
# of the cooled section.
n_fin = 20
h_fin = 0.001
t_fin = 0.001
A_fin_single = ${fparse (2 * h_fin + t_fin ) * length}
A_fin = ${fparse n_fin * A_fin_single}
A_cooled = ${fparse pi * diam * length}
A_total = ${fparse A_fin + A_cooled - n_fin * t_fin * length}
fin_area_fraction = ${fparse A_fin / A_total}
area_increase_factor = ${fparse A_total / A_cooled}
fin_perimeter_area_ratio = ${fparse (2 * length + 2 * t_fin) / (length * t_fin)}
k_fin = 15.0
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[sp_ss316]
type = ThermalSS316Properties
[]
[]
[FunctorMaterials]
[fin_efficiency_fmat]
type = FinEfficiencyFunctorMaterial
fin_height = ${h_fin}
fin_perimeter_area_ratio = ${fparse fin_perimeter_area_ratio}
heat_transfer_coefficient = ${htc}
thermal_conductivity = ${k_fin}
fin_efficiency_name = fin_efficiency
[]
[fin_enhancement_fmat]
type = FinEnhancementFactorFunctorMaterial
fin_efficiency = fin_efficiency
fin_area_fraction = ${fin_area_fraction}
area_increase_factor = ${area_increase_factor}
fin_enhancement_factor_name = fin_enhancement
[]
[]
[Components]
# pipe1
[pipe1_inlet]
type = InletMassFlowRateTemperature1Phase
m_dot = ${mfr_inlet}
T = ${T_inlet}
input = 'pipe1:in'
[]
[pipe1]
type = FlowChannel1Phase
gravity_vector = '0 0 0'
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
A = ${area}
initial_T = ${T_inlet}
initial_p = ${p_outlet}
initial_vel = ${vel_inlet}
fp = fp
closures = simple_closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
[]
[pipe1_outlet]
type = Outlet1Phase
p = ${p_outlet}
input = 'pipe1:out'
[]
[ht1]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe1
hs = hs1
hs_side = inner
Hw = ${htc}
[]
[hs1]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
inner_radius = ${fparse 0.5 * diam}
names = 'main'
solid_properties = 'sp_ss316'
solid_properties_T_ref = '300'
widths = '${t_hs}'
n_part_elems = '${n_elems_radial}'
initial_T = ${T_initial_hs}
scaling_factor_temperature = 1e-5
[]
# pipe 2
[pipe2_inlet]
type = InletMassFlowRateTemperature1Phase
m_dot = ${mfr_inlet}
T = ${T_inlet}
input = 'pipe2:in'
[]
[pipe2]
type = FlowChannel1Phase
gravity_vector = '0 0 0'
position = '0 0.5 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
A = ${area}
initial_T = ${T_inlet}
initial_p = ${p_outlet}
initial_vel = ${vel_inlet}
fp = fp
closures = simple_closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
[]
[pipe2_outlet]
type = Outlet1Phase
p = ${p_outlet}
input = 'pipe2:out'
[]
[ht2]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe2
hs = hs2
hs_side = inner
Hw = ${htc}
scale = fin_enhancement
[]
[hs2]
type = HeatStructureCylindrical
position = '0 0.5 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
inner_radius = ${fparse 0.5 * diam}
names = 'main'
solid_properties = 'sp_ss316'
solid_properties_T_ref = '300'
widths = '${t_hs}'
n_part_elems = '${n_elems_radial}'
initial_T = ${T_initial_hs}
scaling_factor_temperature = 1e-5
[]
[]
[Postprocessors]
[pipe1_T_avg]
type = ElementAverageValue
variable = T
block = 'pipe1'
execute_on = 'INITIAL TIMESTEP_END'
[]
[pipe2_T_avg]
type = ElementAverageValue
variable = T
block = 'pipe2'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hs1_T_avg]
type = SideAverageValue
variable = T_solid
boundary = 'hs1:inner'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hs2_T_avg]
type = SideAverageValue
variable = T_solid
boundary = 'hs2:inner'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = 10.0
dt = 1.0
solve_type = NEWTON
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/clg.ctrl_m_dot_3eqn_rdg.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_T = 300
initial_vel = 0.0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 50
A = 1.0000000000e-04
D_h = 1.1283791671e-02
f = 0.0
fp = fp
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 1e5
[]
[]
[Functions]
[inlet_m_dot_fn]
type = PiecewiseLinear
x = '0 1'
y = '0 0.5'
[]
[]
[ControlLogic]
[set_inlet_value]
type = TimeFunctionComponentControl
component = inlet
parameter = m_dot
function = inlet_m_dot_fn
[]
[]
[Postprocessors]
[inlet_m_dot]
type = RealComponentParameterValuePostprocessor
component = inlet
parameter = m_dot
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
dt = 0.25
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_connection/err.connecting_to_non_existent_component.i)
# Tests that we report an error if users try to connect to a non-existent component
[GlobalParams]
initial_p = 1e5
initial_T = 300
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = water
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 2
A = 1e-4
f = 0
[]
[inlet_1p]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 1
T = 300
[]
[outlet_1p]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Executioner]
type = Transient
dt = 0.01
[]
(modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop_with_junction.i)
nelem = 50
friction_factor = 1e4
area = 0.176752
mfr_final = 1.0
p_out = 7e6
T_in = 300
ramp_time = 5.0
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = ${T_in}
initial_p = ${p_out}
initial_vel = 0
closures = closures
rdg_slope_reconstruction = full
scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
[h2]
type = IdealGasFluidProperties
gamma = 1.3066
molar_mass = 2.016e-3
k = 0.437
mu = 3e-5
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[bc_inlet]
type = InletMassFlowRateTemperature1Phase
input = 'ch_1:in'
m_dot = 0 # This value is controlled by 'mfr_ctrl'
T = ${T_in}
[]
[ch_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = ${nelem}
A = ${area}
f = ${friction_factor}
fp = h2
[]
[junction]
type = JunctionOneToOne1Phase
connections = 'ch_1:out ch_2:in'
[]
[ch_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = ${nelem}
A = ${area}
f = ${friction_factor}
fp = h2
[]
[bc_outlet]
type = Outlet1Phase
input = 'ch_2:out'
p = ${p_out}
[]
[]
[Functions]
[mfr_fn]
type = PiecewiseLinear
x = '0 ${ramp_time}'
y = '0 ${mfr_final}'
[]
[]
[ControlLogic]
[mfr_cntrl]
type = TimeFunctionComponentControl
component = bc_inlet
parameter = m_dot
function = mfr_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[pressure_vpp]
type = ADSampler1DReal
block = 'ch_1 ch_2'
property = 'p'
sort_by = x
execute_on = 'FINAL'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 50
dt = 1
steady_state_detection = true
steady_state_start_time = ${ramp_time}
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[csv]
type = CSV
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/test.i)
# Test that the initial conditions read from the exodus file are correct
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
closures = simple_closures
initial_from_file = 'steady_state_out.e'
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
inner_radius = 0.01
widths = 0.1
[]
[ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = hs
hs_side = INNER
Hw = 10000
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_bc
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial'
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
inner_radius = 0.01
widths = 0.1
initial_T = Ts_init
[]
[ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = hs
hs_side = INNER
Hw = 10000
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/volume_junction/base.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
volume = 1
position = '1 0 0'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-4
[]
[pipe2]
type = FlowChannel1Phase
fp = fp
# geometry
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 0
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/postprocessors/specific_impulse_1phase/Isp_1ph.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 6e6
initial_T = 600
initial_vel = 0
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = IdealGasFluidProperties
gamma = 1.3066
molar_mass = 2.016e-3
k = 0.437
mu = 3e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = eos
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 0.1
f = 0.
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
m_dot = 0.1
T = 800
input = 'pipe1:in'
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 6e6
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.4
optimal_iterations = 6
iteration_window = 2
[]
start_time = 0.0
end_time = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-6
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'
[]
[Postprocessors]
# hand calcs show that Isp should start at 274.3 at 600 K
# and rise to 316.7 at 800 K.
[Isp]
type = ADSpecificImpulse1Phase
p_exit = 1e6
fp = eos
boundary = outlet
[]
[Isp_inst]
type = ADSpecificImpulse1Phase
p_exit = 1e6
fp = eos
cumulative = false
boundary = outlet
[]
[outletT]
type = SideAverageValue
variable = T
boundary = pipe1:out
[]
[]
[Outputs]
[out]
type = CSV
show = 'Isp Isp_inst'
execute_on = 'INITIAL FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/mesh_block_interaction/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'iwst_pipe_1:in'
m_dot = 1
T = 100
[]
[iwst_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 1 0'
length = 10
n_elems = 15
A = 1
D_h = 1
[]
[outlet]
type = Outlet1Phase
input = 'iwst_pipe_1:out'
p = 1e5
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/components/inlet_mass_flow_rate_1phase/jacobian.i)
[GlobalParams]
initial_p = 1e5
initial_T = 300
initial_vel = 2
gravity_vector = '9.81 0 0'
scaling_factor_1phase = '1. 1. 1'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = eos
# geometry
position = '0 0 0'
orientation = '1 0 0'
A = 1e-4
D_h = 1.12837916709551
f = 0
length = 1
n_elems = 2
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 1
T = 300
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1e-2
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-snes_type -snes_test_err'
petsc_options_value = 'test 1e-11'
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
# This test checks that the expected pressure rise due to the user supplied
# pump head matches the actual pressure rise across the pump.
# The orientation of flow channels in this test have no components in the z-direction
# due to the expected_pressure_rise_fcn not accounting for hydrostatic pressure.
head = 95.
dt = 0.1
g = 9.81
volume = 0.567
[GlobalParams]
initial_T = 393.15
initial_vel = 0.0372
A = 0.567
f = 0
fp = fp
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[expected_pressure_rise_fcn]
type = ParsedFunction
expression = 'rhoV * g * head / volume'
symbol_names = 'rhoV g head volume'
symbol_values = 'pump_rhoV ${g} ${head} ${volume}'
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 20
T = 393.15
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.318964e+07
n_elems = 10
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
initial_p = 1.318964e+07
scaling_factor_rhoEV = 1e-5
head = ${head}
volume = ${volume}
A_ref = 0.567
initial_vel_x = 1
initial_vel_y = 1
initial_vel_z = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '0 2 0'
length = 0.96
initial_p = 1.4072E+07
n_elems = 10
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1.4072E+07
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
dt = ${dt}
num_steps = 4
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[pump_rhoV]
type = ElementAverageValue
variable = rhoV
block = 'pump'
execute_on = 'initial timestep_end'
[]
[expected_pressure_rise]
type = FunctionValuePostprocessor
function = expected_pressure_rise_fcn
indirect_dependencies = 'pump_rhoV'
execute_on = 'initial timestep_end'
[]
[p_inlet]
type = SideAverageValue
variable = p
boundary = 'pipe1:out'
execute_on = 'initial timestep_end'
[]
[p_outlet]
type = SideAverageValue
variable = p
boundary = 'pipe2:in'
execute_on = 'initial timestep_end'
[]
[actual_pressure_rise]
type = DifferencePostprocessor
value1 = p_outlet
value2 = p_inlet
execute_on = 'timestep_end'
[]
[pressure_rise_diff]
type = RelativeDifferencePostprocessor
value1 = actual_pressure_rise
value2 = expected_pressure_rise
execute_on = 'timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'pressure_rise_diff'
[]
[]
(modules/thermal_hydraulics/test/tests/components/gate_valve_1phase/gate_valve_1phase.i)
# This input file is used to test the gate valve component.
# This problem consists of a T junction of 3 pipes. The inlet pipe is one of the
# 2 pipes of the "top" of the T. The other 2 pipes each have a gate valve.
# Initially, one of the 2 outlet pipes has an open valve and the other has a
# closed valve. Later in the transient, the valves gradually open/close to switch
# the outlet flow direction.
p = 1.0e5
T = 300.0
rho = 1.161430436 # @ 1e5 Pa, 300 K
D = 0.1
A = ${fparse pi * D^2 / 4.0}
V_junction = ${fparse pi * D^3 / 4.0}
vel_in = 2.0
m_dot = ${fparse rho * vel_in * A}
t_begin = 0.3
delta_t_open = 0.1
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
fp = fp
f = 0.0
initial_T = ${T}
initial_p = ${p}
initial_vel = 0
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.02897
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[pipe3_open_fn]
type = TimeRampFunction
initial_value = 1
final_value = 0
initial_time = ${t_begin}
ramp_duration = ${delta_t_open}
[]
[pipe2_open_fn]
type = ParsedFunction
expression = '1 - pipe3_phi'
symbol_names = 'pipe3_phi'
symbol_values = 'pipe3_open_fn'
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = ${m_dot}
T = ${T}
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = 50
A = ${A}
[]
[volume_junction]
type = VolumeJunction1Phase
position = '1 0 0'
connections = 'pipe1:out pipe2A:in pipe3A:in'
volume = ${V_junction}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe2A]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '0 1 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe2_valve]
type = GateValve1Phase
connections = 'pipe2A:out pipe2B:in'
open_area_fraction = 0 # (controlled via 'pipe2_valve_control')
[]
[pipe2B]
type = FlowChannel1Phase
position = '1 0.5 0'
orientation = '0 1 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe2_outlet]
type = Outlet1Phase
input = 'pipe2B:out'
p = ${p}
[]
[pipe3A]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe3_valve]
type = GateValve1Phase
connections = 'pipe3A:out pipe3B:in'
open_area_fraction = 0 # (controlled via 'pipe3_valve_control')
[]
[pipe3B]
type = FlowChannel1Phase
position = '1.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe3_outlet]
type = Outlet1Phase
input = 'pipe3B:out'
p = ${p}
[]
[]
[ControlLogic]
[pipe2_valve_control]
type = TimeFunctionComponentControl
component = pipe2_valve
parameter = open_area_fraction
function = pipe2_open_fn
[]
[pipe3_valve_control]
type = TimeFunctionComponentControl
component = pipe3_valve
parameter = open_area_fraction
function = pipe3_open_fn
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 0.01
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
show = 'p T vel'
velocity_as_vector = false
print_linear_residuals = false
[console]
type = Console
max_rows = 1
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'up_pipe_1:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe:in'
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = JunctionOneToOne1Phase
connections = 'top_pipe:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'down_pipe_1:out cooling_pipe:in'
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = 1.5
n_elems = 25
A = ${A_pipe}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
P_hf = '${fparse pi * pipe_dia}'
[]
[jct6]
type = JunctionOneToOne1Phase
connections = 'cooling_pipe:out down_pipe_2:in'
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[outlet]
type = Outlet1Phase
input = 'down_pipe_2:out'
p = ${press}
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/flow_channel/test.i)
# Test that the initial conditions read from the exodus file are correct
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
closures = simple_closures
initial_from_file = 'steady_state_out.e'
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.conservation.i)
[GlobalParams]
initial_p = 1e6
initial_T = 517
initial_vel = 4.3
initial_vel_x = 4.3
initial_vel_y = 0
initial_vel_z = 0
fp = fp
closures = simple_closures
f = 0
rdg_slope_reconstruction = minmod
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.01
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 517
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
[]
[turbine]
type = SimpleTurbine1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1
A_ref = 1.0
K = 0
on = true
power = 1000
[]
[pipe2]
type = FlowChannel1Phase
position = '1. 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e6
[]
[]
[Postprocessors]
[mass_in]
type = ADFlowBoundaryFlux1Phase
equation = mass
boundary = inlet
[]
[mass_out]
type = ADFlowBoundaryFlux1Phase
equation = mass
boundary = outlet
[]
[mass_diff]
type = LinearCombinationPostprocessor
pp_coefs = '1 -1'
pp_names = 'mass_in mass_out'
[]
[p_in]
type = SideAverageValue
boundary = pipe1:in
variable = p
[]
[vel_in]
type = SideAverageValue
boundary = pipe1:in
variable = vel_x
[]
[momentum_in]
type = ADFlowBoundaryFlux1Phase
equation = momentum
boundary = inlet
[]
[momentum_out]
type = ADFlowBoundaryFlux1Phase
equation = momentum
boundary = outlet
[]
[dP]
type = ParsedPostprocessor
pp_names = 'p_in W_dot'
expression = 'p_in * (1 - (1-W_dot/(10*2910.06*517))^(1.4/0.4))'
[]
[momentum_diff]
type = LinearCombinationPostprocessor
pp_coefs = '1 -1 -1'
pp_names = 'momentum_in momentum_out dP' # momentum source = -dP * A and A=1
[]
[energy_in]
type = ADFlowBoundaryFlux1Phase
equation = energy
boundary = inlet
[]
[energy_out]
type = ADFlowBoundaryFlux1Phase
equation = energy
boundary = outlet
[]
[W_dot]
type = ElementAverageValue
variable = W_dot
block = 'turbine'
[]
[energy_diff]
type = LinearCombinationPostprocessor
pp_coefs = '1 -1 -1'
pp_names = 'energy_in energy_out W_dot'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 10
dt = 0.5
abort_on_solve_fail = true
solve_type = 'newton'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 0
nl_abs_tol = 2e-6
nl_max_its = 10
l_tol = 1e-3
# automatic_scaling = true
# compute_scaling_once = false
# off_diagonals_in_auto_scaling = true
[]
[Outputs]
[csv]
type = CSV
show = 'mass_diff energy_diff momentum_diff'
execute_on = 'final'
[]
[]
(modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub_2phase.i)
# This is the 2-phase version of sub.i: it just adds the variable 'kappa'.
# Unfortunately, multi-parameter application of cli_args is not supported for
# sub-app input files, so sub.i cannot be re-used for the test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[AuxVariables]
[Hw]
family = monomial
order = constant
block = pipe1
[]
[kappa]
family = monomial
order = constant
block = pipe1
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = 'Hw'
[]
[kappa_ak]
type = ConstantAux
variable = kappa
value = 0.5
[]
[]
[UserObjects]
[T_uo]
type = LayeredAverage
direction = y
variable = T
num_layers = 10
block = pipe1
[]
[Hw_uo]
type = LayeredAverage
direction = y
variable = Hw
num_layers = 10
block = pipe1
[]
[kappa_uo]
type = LayeredAverage
direction = y
variable = kappa
num_layers = 10
block = pipe1
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 10
A = 1.28584e-01
D_h = 8.18592e-01
f = 0.01
fp = eos
[]
[hxconn]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe1
Hw = 10000
P_hf = 6.28319e-01
initial_T_wall = 300.
var_type = elemental
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 400
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[T_wall_avg]
type = ElementAverageValue
variable = T_wall
execute_on = 'INITIAL TIMESTEP_END'
[]
[htc_avg]
type = ElementAverageValue
variable = Hw
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
dtmin = 1e-7
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-4
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T Hw'
[]
[]
(modules/thermal_hydraulics/test/tests/base/simulation/err.no_smp.i)
[GlobalParams]
gravity_vector = '0 0 9.81'
initial_p = 1e5
initial_T = 300
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = water
closures = simple_closures
f = 0
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 1
T = 300
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = '1'
A = 1
D_h = 1
n_elems = 2
[]
[jct1]
type = VolumeJunction1Phase
position = '1 0 0'
volume = 1e-3
connections = 'pipe1:out pipe2:in'
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = '1'
A = 1
D_h = 1
n_elems = 2
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 101325
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 2
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
T_in = 523.0
mdot = 10
pout = 7e6
[GlobalParams]
initial_p = ${pout}
initial_vel = 1
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 5
scaling_factor_1phase = '1 1e-2 1e-5'
f = 1
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.66
molar_mass = 0.004
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletMassFlowRateTemperature1Phase
input = 'inlet:in'
m_dot = ${mdot}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 1
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 1
connections = 'inlet:out bypass:in core_top:in'
volume = 1
[]
[bypass]
type = FlowChannel1Phase
fp = fp
position = '2 0 10'
orientation = '0 0 -1'
length = 10
A = 0.01
[]
[core_top]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 0.1
A = 9
[]
[core_top_bc]
type = Outlet1Phase
p = ${pout}
input = 'core_top:out'
[]
[core_bottom_bc]
type = InletMassFlowRateTemperature1Phase
input = 'core_bottom:in'
m_dot = ${mdot}
T = ${T_in}
[]
[core_bottom]
type = FlowChannel1Phase
fp = fp
position = '0 0 0.1'
orientation = '0 0 -1'
length = 0.1
A = 9
[]
[outlet_plenum]
type = VolumeJunction1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 1
connections = 'bypass:out core_bottom:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 1
[]
[outlet_bc]
type = Outlet1Phase
p = ${pout}
input = 'outlet:out'
[]
[]
[ControlLogic]
[set_core_inlet_pressure]
type = SetComponentRealValueControl
component = core_top_bc
parameter = p
value = core_inlet_pressure
[]
[set_core_outlet_mdot]
type = SetComponentRealValueControl
component = core_bottom_bc
parameter = m_dot
value = core_outlet_mdot
[]
[set_core_outlet_temperature]
type = SetComponentRealValueControl
component = core_bottom_bc
parameter = T
value = core_outlet_temperature
[]
[]
[Postprocessors]
[core_inlet_pressure]
type = Receiver
default = ${pout}
[]
[core_outlet_mdot]
type = Receiver
default = ${mdot}
[]
[core_outlet_temperature]
type = Receiver
default = ${T_in}
[]
[core_outlet_pressure]
type = SideAverageValue
variable = p
boundary = 'core_bottom:in'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_inlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'core_top:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_inlet_temperature]
type = SideAverageValue
variable = T
boundary = 'core_top:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[bypass_inlet_pressure]
type = SideAverageValue
variable = p
boundary = 'bypass:in'
[]
[bypass_outlet_pressure]
type = SideAverageValue
variable = p
boundary = 'bypass:out'
[]
[bypass_pressure_drop]
type = DifferencePostprocessor
value1 = bypass_inlet_pressure
value2 = bypass_outlet_pressure
[]
[bypass_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'bypass:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[inlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'inlet:in'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[outlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'outlet:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
timestep_tolerance = 1e-6
start_time = 0
end_time = 100
dt = 0.01
line_search = l2
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 25
l_tol = 1e-3
l_max_its = 20
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
exodus = true
[]
reversible
Default:True
C++ Type:bool
Controllable:No
Description:True for reversible, false for pure inlet