- TPrescribed temperature [K]
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed temperature [K]
- inputName of the input
C++ Type:BoundaryName
Unit:(no unit assumed)
Controllable:No
Description:Name of the input
- velPrescribed velocity [m/s]
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed velocity [m/s]
InletVelocityTemperature1Phase
This is a single-phase 1-D flow boundary component in which the velocity and temperature are specified.
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
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (modules/thermal_hydraulics/test/tests/components/inlet_velocity_t_1phase/phy.velocity_t_3eqn.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_velocity_t_1phase/clg.velocity_t_3eqn.i)
- (modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.form_loss.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
- (modules/thermal_hydraulics/test/tests/components/inlet_velocity_t_1phase/phy.reversed_flow.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/junction_with_calorifically_imperfect_gas.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/junction_with_calorifically_imperfect_gas.i)
- (modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/clg.test.i)
Formulation
This boundary condition uses a ghost cell formulation, where the ghost cell solution is computed from the following quantities:
, the provided exterior velocity,
, 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 velocity,
, the interior density, and
, the interior specific total energy.
vel
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed velocity [m/s]
T
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Prescribed temperature [K]
reversible
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True for reversible, false for pure inlet
(modules/thermal_hydraulics/test/tests/components/inlet_velocity_t_1phase/phy.velocity_t_3eqn.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 444.447
initial_p = 7e6
initial_vel = 0
scaling_factor_1phase = '1 1 1e-5'
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
f = 0.0
length = 1
n_elems = 100
[]
[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe:in'
vel = 1.0
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
end_time = 5.5
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
abort_on_solve_fail = true
[]
[Outputs]
file_base = 'phy.velocity_t_3eqn'
[exodus]
type = Exodus
show = 'vel T p'
[]
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/inlet_velocity_t_1phase/clg.velocity_t_3eqn.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 444.447
initial_p = 7e6
initial_vel = 0
scaling_factor_1phase = '1 1 1e-5'
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
f = 0.0
length = 1
n_elems = 100
[]
[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe:in'
vel = 1.0
T = 444.447
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 7e6
[]
[]
[Functions]
[inlet_vel_fn]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0.1 1'
[]
[inlet_T_fn]
type = PiecewiseLinear
x = '0 1 2'
y = '300 400 440'
[]
[]
[ControlLogic]
[inlet_vel_ctrl]
type = TimeFunctionComponentControl
component = inlet
parameter = vel
function = inlet_vel_fn
[]
[inlet_T_ctrl]
type = TimeFunctionComponentControl
component = inlet
parameter = T
function = inlet_T_fn
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
start_time = 0.0
num_steps = 20
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
abort_on_solve_fail = true
[]
[Postprocessors]
[vel_inlet]
type = RealComponentParameterValuePostprocessor
component = inlet
parameter = vel
[]
[T_inlet]
type = RealComponentParameterValuePostprocessor
component = inlet
parameter = T
[]
[]
[Outputs]
[out]
type = CSV
[]
[]
(modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
[GlobalParams]
gravity_vector = '0 0 0'
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
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = eos
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[jct1]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-5
use_scalar_variables = false
[]
[pipe2]
type = FlowChannel1Phase
fp = eos
# geometry
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[jct2]
type = VolumeJunction1Phase
connections = 'pipe2:out pipe3:in'
position = '2 0 0'
volume = 1e-5
use_scalar_variables = false
[]
[pipe3]
type = FlowChannel1Phase
fp = eos
# geometry
position = '2 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '1 0.01 0'
orientation = '1 0 0'
length = 1
n_elems = 5
names = '0'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
widths = 0.1
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
T = 507
vel = 1
[]
[outlet]
type = Outlet1Phase
input = 'pipe3:out'
p = 6e6
[]
[hx3ext]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe3
P_hf = 0.0449254
Hw = 100000
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
automatic_scaling = true
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.form_loss.i)
# This test measures the pressure drop across the volume junction with K=1.
A = 0.1
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
initial_T = 300
initial_p = 1e5
initial_vel = 1
n_elems = 20
length = 1
f = 0
fp = fp
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
q = 0
q_prime = 0
p_inf = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[K_fn]
type = TimeRampFunction
initial_value = 0
initial_time = 2
ramp_duration = 5
final_value = 1
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
A = ${A}
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
A = ${A}
initial_p = 1e5
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 0.005
initial_p = 1e5
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
use_scalar_variables = false
[]
[pipe1_in]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
vel = 1
T = 300
[]
[pipe2_out]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[ControlLogic]
active = ''
[K_crtl]
type = TimeFunctionComponentControl
component = junction
parameter = K
function = K_fn
[]
[]
[Postprocessors]
[pJ_in]
type = SideAverageValue
variable = p
boundary = pipe1:out
[]
[pJ_out]
type = SideAverageValue
variable = p
boundary = pipe2:in
[]
[dpJ]
type = DifferencePostprocessor
value1 = pJ_in
value2 = pJ_out
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
end_time = 20
dt = 0.5
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
execute_on = 'final'
show = 'dpJ'
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
# Testing energy conservation at steady state
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 10 30'
[]
[]
[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]
[in1]
type = InletVelocityTemperature1Phase
input = 'fch1:in'
vel = 1
T = 300
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = Outlet1Phase
input = 'fch1:out'
p = 1.01e5
[]
[in2]
type = InletVelocityTemperature1Phase
input = 'fch2:in'
vel = 1
T = 350
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0
[]
[out2]
type = Outlet1Phase
input = 'fch2:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = 325
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[E_in1]
type = ADFlowBoundaryFlux1Phase
boundary = in1
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out1]
type = ADFlowBoundaryFlux1Phase
boundary = out1
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe1]
type = ADHeatRateConvection1Phase
block = fch1
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff1]
type = DifferencePostprocessor
value1 = E_in1
value2 = E_out1
execute_on = 'initial timestep_end'
[]
[E_conservation1]
type = SumPostprocessor
values = 'E_diff1 hf_pipe1'
[]
[E_in2]
type = ADFlowBoundaryFlux1Phase
boundary = in2
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out2]
type = ADFlowBoundaryFlux1Phase
boundary = out2
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe2]
type = ADHeatRateConvection1Phase
block = fch2
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff2]
type = DifferencePostprocessor
value1 = E_in2
value2 = E_out2
execute_on = 'initial timestep_end'
[]
[E_conservation2]
type = SumPostprocessor
values = 'E_diff2 hf_pipe2'
[]
[E_conservation_hs]
type = SumPostprocessor
values = 'hf_pipe1 hf_pipe2'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 5
end_time = 100
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation_ss'
[csv]
type = CSV
show = 'E_conservation1 E_conservation2 E_conservation_hs'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/inlet_velocity_t_1phase/phy.reversed_flow.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 444.447
initial_p = 7e6
initial_vel = 0
scaling_factor_1phase = '1 1 1e-5'
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
f = 0.0
length = 1
n_elems = 100
[]
[in]
type = InletVelocityTemperature1Phase
input = 'pipe:in'
vel = -1.0
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
end_time = 5
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
abort_on_solve_fail = true
[]
[Outputs]
[exodus]
type = Exodus
file_base = phy.reversed_flow
show = 'vel T p'
[]
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/junction_with_calorifically_imperfect_gas.i)
# This input file tests compatibility of JunctionParallelChannels1Phase and CaloricallyImperfectGas.
# Loss coefficient is applied in first junction.
# Expected pressure drop from form loss ~0.5*K*rho_in*vel_in^2=0.5*100*3.219603*1 = 160.9 Pa
# Pressure drop from averall flow area change ~ 21.9 Pa
# Expected pressure drop ~ 182.8 Pa
T_in = 523.0
vel = 1
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = ${vel}
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = '1e2'
scaling_factor_rhowV = '1e-2'
scaling_factor_rhoEV = '1e-5'
[]
[Functions]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[FluidProperties]
[fp]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
out_of_bound_error = false
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletVelocityTemperature1Phase
input = 'inlet:in'
vel = ${vel}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 3
[]
[inlet_plenum]
type = JunctionParallelChannels1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
K = 100
connections = 'inlet:out channel1:in channel2:in'
volume = 1
use_scalar_variables = false
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[channel2]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 1
D_h = 1
[]
[outlet_plenum]
type = JunctionParallelChannels1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = ${vel}
connections = 'channel1:out channel2:out outlet:in'
volume = 1
use_scalar_variables = false
[]
[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]
[p_in]
type = SideAverageValue
variable = p
boundary = inlet:in
[]
[p_out]
type = SideAverageValue
variable = p
boundary = outlet:out
[]
[Delta_p]
type = DifferencePostprocessor
value1 = p_out
value2 = p_in
[]
[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 = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = basic
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 Delta_p'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
rho = 1000
cp = 100
k = 30
[]
[]
[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
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
widths = 0.1
inner_radius = 0.1
length = 1
n_elems = 6
n_part_elems = 1
initial_T = T_init
solid_properties = 'mat'
solid_properties_T_ref = '300'
names = blk
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:inner
Hw = 10000
P_hf = 0.156434465
[]
[]
[Postprocessors]
[energy_hs]
type = HeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = false
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 1
solve_type = PJFNK
line_search = basic
num_steps = 1000
steady_state_detection = true
steady_state_tolerance = 1e-08
nl_abs_tol = 1e-8
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[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
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = T_init
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = 0.1564344650402309
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
petsc_options_iname = '-snes_test_err'
petsc_options_value = ' 1e-9'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 1
solve_type = PJFNK
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
csv = true
show = 'energy_change'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/junction_with_calorifically_imperfect_gas.i)
# This input file tests compatibility of VolumeJunction1Phase and CaloricallyImperfectGas.
# Loss coefficient is applied in first junction.
# Expected pressure drop ~0.5*K*rho_in*vel_in^2=0.5*100*3.219603*1 = 160.9 Pa
T_in = 523.0
vel = 1
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = ${vel}
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = '1e2'
scaling_factor_rhowV = '1e-2'
scaling_factor_rhoEV = '1e-5'
[]
[Functions]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[FluidProperties]
[fp]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
out_of_bound_error = false
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletVelocityTemperature1Phase
input = 'inlet:in'
vel = ${vel}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 5
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
K = 100
connections = 'inlet:out channel1:in channel2:in'
volume = 1
use_scalar_variables = false
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[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 = 0
initial_vel_y = 0
initial_vel_z = ${vel}
connections = 'channel1:out channel2:out outlet:in'
volume = 1
use_scalar_variables = false
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 5
[]
[outlet_bc]
type = Outlet1Phase
p = ${p_out}
input = 'outlet:out'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = inlet:in
[]
[p_out]
type = SideAverageValue
variable = p
boundary = outlet:out
[]
[Delta_p]
type = DifferencePostprocessor
value1 = p_out
value2 = p_in
[]
[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 = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = basic
nl_rel_tol = 1e-8
nl_abs_tol = 4e-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 Delta_p'
[]
[]
(modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/clg.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
f = 0
fp = fp
closures = simple_closures
gravity_vector = '0 0 0'
automatic_scaling = true
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.43
cv = 1040.0
q = 2.03e6
p_inf = 0.0
q_prime = -2.3e4
k = 0.026
mu = 134.4e-7
M = 0.01801488
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[W_dot_fn]
type = PiecewiseLinear
xy_data = '
0 0
1 10'
[]
[]
[Components]
[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
vel = 1
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 = 0
use_scalar_variables = false
[]
[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
[]
[]
[ControlLogic]
[W_dot_ctrl]
type = TimeFunctionComponentControl
component = turbine
parameter = power
function = W_dot_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
dt = 0.1
num_steps = 10
solve_type = 'newton'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-3
nl_max_its = 5
l_tol = 1e-4
abort_on_solve_fail = true
[]
[Postprocessors]
[turbine_power]
type = ElementAverageValue
variable = W_dot
block = 'turbine'
[]
[]
[Outputs]
[csv]
type = CSV
show = 'turbine_power'
[]
[]
reversible
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True for reversible, false for pure inlet