- lengthLength of each subsection of the geometric component along the main axis [m]
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
- n_elemsNumber of elements in each subsection along the main axis
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements in each subsection along the main axis
- n_part_elemsNumber of elements of each radial region
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements of each radial region
- namesName of each radial region
C++ Type:std::vector<std::string>
Controllable:No
Description:Name of each radial region
- orientationOrientation vector of the component
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:Orientation vector of the component
- positionOrigin (start) of the component [m]
C++ Type:libMesh::Point
Controllable:No
Description:Origin (start) of the component [m]
- widthsWidth of each radial region [m]
C++ Type:std::vector<double>
Controllable:No
Description:Width of each radial region [m]
HeatStructureCylindrical
This component is a 2D heat structure that has axisymmetry; thus it is either a cylinder or cylindrical shell.
Usage
The initial temperature is given by the function parameter "initial_T".
The parameters "position", "orientation", "length", "n_elems", and "axial_region_names" are discussed in Axial Discretization.
The parameters "names", "widths", and "n_part_elems" are discussed in Radial Discretization.
The parameter "materials" specifies the names of HeatStructureMaterials objects to use in each region. Each entry in this parameter corresponds to the entries in the parameters "names", "widths", and "n_part_elems". Note that this parameter is optional; if omitted, the user must create Materials supplying the following material properties on all blocks (see Blocks and Boundaries) of the heat structure mesh:
Material Property | Symbol | Description |
---|---|---|
density | Density [kg/m] | |
specific_heat | Specific heat capacity [J/(kg-K)] | |
thermal_conductivity | Thermal conductivity [W/(m-K)] |
If the domain has some inner radius, then this is specified with "inner_radius"; otherwise, it is assumed to be a solid cylinder.
Input Parameters
- axial_region_namesNames to assign to axial regions
C++ Type:std::vector<std::string>
Controllable:No
Description:Names to assign to axial regions
- initial_TInitial temperature [K]
C++ Type:FunctionName
Controllable:No
Description:Initial temperature [K]
- inner_radius0Inner radius of the heat structure [m]
Default:0
C++ Type:double
Controllable:No
Description:Inner radius of the heat structure [m]
- materialsMaterial name for each radial region
C++ Type:std::vector<std::string>
Controllable:No
Description:Material name for each radial region
- num_rods1Number of rods represented by this heat structure
Default:1
C++ Type:double
Controllable:No
Description:Number of rods represented by this heat structure
- rotation0Rotation of the component [degrees]
Default:0
C++ Type:double
Controllable:No
Description:Rotation of the component [degrees]
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
Mesh
Axial Discretization
This component generates a mesh along a line segment in 3D space. The line segment is defined with a "start" point , corresponding to either end, the direction to the other end, and the distance in that direction, . Thus the other end of the line segment is
These quantities are defined using the following parameters:
"position": the "start" point ,
"orientation": the direction (which gets automatically normalized), and
"length": the length(s) that sum to .
The most basic mesh specification is given by a single value for the parameters "length" and "n_elems", which correspond to the length of the component and number of uniformly-sized elements to use. For example, the following parameters would specify a total length m, divided into 100 elements (each with width 0.5 m):
length = 50
n_elems = 100
The "length" and "n_elems" parameters can also be supplied with multiple values. Multiple values correspond to splitting the length into segments that can have different element sizes. However, within each segment, the discretization is assumed uniform. The numbers of elements in each segment are specified with the parameter "n_elems", with entries corresponding to the entries in "length". For example, the following would also specify a total length m with 100 total elements, but in this case the first 10 m have 40 elements of size 0.25 m, whereas the last 40 m have 60 elements of size m.
length = '10 40'
n_elems = '40 60'
When using more than one entry in the "length" and "n_elems" parameters, the parameter "axial_region_names" is used to provide names that are used in the generation of corresponding block and boundary names (see Blocks and Boundaries).
Radial Discretization
The domain may be divided up into any number (say, ) of regions in the radial direction, which each get their own subdomain names and may use different thermal properties. For example, if the domain were a fuel rod, two regions could be used: the fuel itself and the cladding. The parameters "names", "widths", and "n_part_elems" are all lists of size , with entries corresponding to each radial region, ordered from the side closest to the axis of the component. "names" is a list of names to assign to each region, which will be used to create subdomain names and to refer to the regions in some objects. The radial width (thickness) of each region is specified using "widths", and the number of radial elements in each region is given by "n_part_elems".
Blocks and Boundaries
This component creates the following blocks, where <cname>
is the user-given name of the component:
Block | Description |
---|---|
<cname>:<rname> | The radial region <rname> |
This component creates the following boundaries:
Boundary | Description |
---|---|
<cname>:inner | The innermost radial boundary |
<cname>:outer | The outermost radial boundary |
<cname>:<aname>:inner | The innermost radial boundary in the axial section <aname> |
<cname>:<aname>:outer | The outermost radial boundary in the axial section <aname> |
<cname>:start | The axial boundary of the end corresponding to the position parameter |
<cname>:end | The axial boundary of the end opposite to the position parameter |
<cname>:<rname>:start | The axial boundary of the end corresponding to the position parameter in the radial region <rname> |
<cname>:<rname>:end | The axial boundary of the end opposite to the position parameter in the radial region <rname> |
<cname>:<rname1>:<rname2> | The radial boundary between the radial regions <rname1> and <rname2> |
<cname>:<rname>:<aname1>:<aname2> | The axial boundary in radial region <rname> between the axial regions <aname1> and <aname2> |
Variables
The following variables are created:
Variable | Symbol | Description |
---|---|---|
T_solid | Temperature [K] |
Formulation
The heat conduction equation is the following: where
is density,
is specific heat capacity,
is thermal conductivity,
is temperature, and
is a volumetric heat source.
Multiplying by a test function and integrating by parts over the domain gives where is the boundary of the domain .
Input Files
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_motor/clg.test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_plate/phy.test_mats.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/err.base.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_y.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/jac.1phase.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_plate/phy.test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/inner_radial_boundary.i)
- (modules/thermal_hydraulics/test/tests/base/logger/test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/phy.rz_mats.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_radiation_rz/heat_rate_radiation_rz.i)
- (modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_2d_coupler/heat_structure_2d_coupler.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/side_flux_integral_rz/side_flux_integral_rz.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/err.no_2nd_order_with_trap.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_motor/test.i)
- (modules/thermal_hydraulics/test/tests/output/paraview_component_annotation_map/test.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.cylinder_power_shape_aux_var.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.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/hs_boundary_heat_flux/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/test.i)
- (modules/thermal_hydraulics/test/tests/components/total_power/phy.constant_power.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/deprecated/heat_generation.i)
- (modules/thermal_hydraulics/test/tests/userobjects/layered_avg_rz/test.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_external_app_convection_rz/heat_rate_external_app_convection_rz.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/misc/uniform_refine/test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.energy_heatstructure_ss_1phase.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.cylinder_power_shape_fn.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/function_side_integral_rz/function_side_integral_rz.i)
- (modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/surrogate_power_profile.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.variable_init_t.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/err.base.i)
- (modules/thermal_hydraulics/test/tests/components/total_power/clg.power.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/phy.rz.i)
- (modules/thermal_hydraulics/test/tests/components/geometrical_component/err.2nd_order.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_z.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_x.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.slave.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/err.1phase.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_convection_rz/heat_rate_convection_rz.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_cylinder.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_specified_temperature/err.no_bnd.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.sub_discretization.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/err.no_T_ic.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/2nd_order.i)
initial_T
C++ Type:FunctionName
Controllable:No
Description:Initial temperature [K]
position
C++ Type:libMesh::Point
Controllable:No
Description:Origin (start) of the component [m]
orientation
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:Orientation vector of the component
length
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
n_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements in each subsection along the main axis
axial_region_names
C++ Type:std::vector<std::string>
Controllable:No
Description:Names to assign to axial regions
names
C++ Type:std::vector<std::string>
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements of each radial region
materials
C++ Type:std::vector<std::string>
Controllable:No
Description:Material name for each radial region
names
C++ Type:std::vector<std::string>
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements of each radial region
inner_radius
Default:0
C++ Type:double
Controllable:No
Description:Inner radius of the heat structure [m]
position
C++ Type:libMesh::Point
Controllable:No
Description:Origin (start) of the component [m]
orientation
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:Orientation vector of the component
length
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
length
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
n_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements in each subsection along the main axis
length
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
n_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements in each subsection along the main axis
n_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements in each subsection along the main axis
length
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
length
C++ Type:std::vector<double>
Controllable:No
Description:Length of each subsection of the geometric component along the main axis [m]
n_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements in each subsection along the main axis
axial_region_names
C++ Type:std::vector<std::string>
Controllable:No
Description:Names to assign to axial regions
names
C++ Type:std::vector<std::string>
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements of each radial region
names
C++ Type:std::vector<std::string>
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of elements of each radial region
(modules/thermal_hydraulics/test/tests/components/shaft_connected_motor/clg.test.i)
[Functions]
[torque_fn]
type = PiecewiseLinear
xy_data = '
0 2
1 3'
[]
[inertia_fn]
type = PiecewiseLinear
xy_data = '
0 1
1 2'
[]
[]
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[motor]
type = ShaftConnectedMotor
inertia = 1
torque = 2
[]
[shaft]
type = Shaft
connected_components = 'motor'
initial_speed = 0
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = '0'
n_part_elems = 1
widths = '1'
materials = 'mat'
initial_T = 300
[]
[]
[ControlLogic]
[motor_ctrl]
type = TimeFunctionComponentControl
component = motor
[]
[]
[Postprocessors]
[test]
type = RealComponentParameterValuePostprocessor
component = motor
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
num_steps = 5
dt = 0.2
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
l_max_its = 10
[]
[Outputs]
csv = true
show = 'test'
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_plate/phy.test_mats.i)
[Materials]
[hs-mat]
type = ADGenericConstantMaterial
block = hs:blk
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 2
names = 'blk'
widths = '1'
n_part_elems = '2'
initial_T = 350
[]
[start]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:start
T = 300
[]
[end]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:end
T = 400
[]
[]
[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'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/err.base.i)
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[]
[Components]
[reactor]
type = TotalPower
power = 10
[]
[hs]
type = HeatStructureCylindrical
position = '0 -0.024748 0'
orientation = '0 0 1'
length = 3.865
n_elems = 1
names = 'fuel'
widths = '0.004096'
n_part_elems = '1'
materials = 'fuel-mat'
initial_T = 559.15
[]
[hgen]
type = HeatSourceFromTotalPower
power_fraction = 1
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_y.i)
# Testing that T_solid gets properly projected onto a pipe
# That's why Hw in pipe1 is set to 0, so we do not have any heat exchange
# Note that the pipe and the heat structure have an opposite orientation, which
# is crucial for this test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[Modules/FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[wall-mat]
type = SolidMaterialProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
value = '290 + sin((1 - y) * pi * 1.4)'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0.2 0 0'
orientation = '0 1 0'
length = 1
n_elems = 50
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hs]
type = HeatStructureCylindrical
position = '0.1 1 0'
orientation = '0 -1 0'
length = 1
n_elems = 50
materials = 'wall-mat'
n_part_elems = 3
widths = '0.1'
names = 'wall'
initial_T = T_init
[]
[hxconn]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe1
Hw = 0
P_hf = 6.2831853072e-01
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe1:out'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T_solid'
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/steady_state.i)
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[motor]
type = ShaftConnectedMotor
inertia = 1
torque = 2
[]
[shaft]
type = Shaft
connected_components = 'motor'
initial_speed = 1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = '0'
n_part_elems = 1
widths = '1'
materials = 'mat'
initial_T = 300
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/jac.1phase.i)
[GlobalParams]
initial_p = 1.e5
initial_vel = 2
initial_T = 300
scaling_factor_1phase = '1 1 1'
scaling_factor_temperature = '1'
closures = simple_closures
[]
[Modules/FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0.1 0'
orientation = '0 0 1'
length = 2
n_elems = 1
A = 8.78882e-5
D_h = 0.01179
f = 0.01
fp = fp
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = 2
n_elems = 1
names = 'fuel'
widths = '0.1'
n_part_elems = '1'
materials = 'fuel-mat'
initial_T = 300
[]
[hx]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe
Hw = 100
P_hf = 0.029832559676
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-snes_test_err'
petsc_options_value = ' 1e-11'
[]
(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'
[]
[Modules/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
[]
[]
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
value = '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
materials = 'mat1'
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/components/heat_structure_plate/phy.test.i)
[HeatStructureMaterials]
[hs-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 2
names = 'blk'
widths = '1'
n_part_elems = '2'
materials = 'hs-mat'
initial_T = 350
[]
[start]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:start
T = 300
[]
[end]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:end
T = 400
[]
[]
[Preconditioning]
[SMP]
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'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/inner_radial_boundary.i)
# Used for testing that the inner radial boundaries of a heat structure are
# created correctly. A SideValueSampler VPP samples a variable along an inner
# radial boundary and the test verifies that the correct space points and
# variable values are recovered.
[Functions]
[initial_T_fn_ax_x]
type = PiecewiseLinear
axis = x
x = '0 5 10'
y = '300 500 1000'
[]
[initial_T_fn_ax_y]
type = PiecewiseLinear
axis = y
x = '0 0.75 1.0 4.0 6.0'
y = '0 0 1.0 1.5 2.0'
[]
[initial_T_fn]
type = CompositeFunction
functions = 'initial_T_fn_ax_x initial_T_fn_ax_y'
[]
[]
[HeatStructureMaterials]
[hs_mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 10.0
n_elems = 20
names = 'region1 region2 region3'
widths = '1.0 3.0 2.0'
n_part_elems = '2 6 8'
materials = 'hs_mat hs_mat hs_mat'
initial_T = initial_T_fn
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = T_solid
boundary = 'hs:region1:region2'
sort_by = x
execute_on = 'INITIAL'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/base/logger/test.i)
[HeatStructureMaterials]
[a]
type = SolidMaterialProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[warn]
type = LogWarningComponent
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
names = '0'
widths = '0.1'
materials = 'a'
n_elems = 1
n_part_elems = 1
initial_T = 300
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/phy.rz_mats.i)
# Tests that cylindrical heat structure geometry can be used with Materials block
[Functions]
[power_profile_fn]
type = ParsedFunction
value = '1.570796326794897 * sin(x / 3.6576 * pi)'
[]
[]
[Materials]
[fuel-mat]
type = ADGenericConstantMaterial
block = hs:FUEL
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '3.65 288.734 1.0412e2'
[]
[gap-mat]
type = ADGenericConstantMaterial
block = hs:GAP
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.084498 1.0 1.0'
[]
[clad-mat]
type = ADGenericConstantMaterial
block = hs:CLAD
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '16.48672 321.384 6.6e1'
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 1'
orientation = '1 0 0'
length = 3.6576
n_elems = 20
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '3 1 1'
initial_T = 564.15
[]
[hg]
type = HeatSourceFromTotalPower
hs = hs
regions = 'FUEL'
power_fraction = 3.33672612e-1
power = reactor
power_shape_function = power_profile_fn
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 2
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
exodus = true
[console]
type = Console
execute_scalars_on = none
[]
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_radiation_rz/heat_rate_radiation_rz.i)
# Tests the HeatRateRadiationRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
S = ${fparse 2 * pi * R_o * L}
Q = 5000
T = 300
T_ambient = 350
sigma = 5.670367e-8
emissivity = ${fparse Q / (S * sigma * (T_ambient^4 - T^4))}
[HeatStructureMaterials]
[region1-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
materials = 'region1-mat'
widths = '${thickness}'
n_part_elems = '5'
initial_T = ${T}
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateRadiationRZ
boundary = heat_structure:outer
axis_point = '1 2 3'
axis_dir = '1 1 1'
T = T_solid
T_ambient = ${T_ambient}
emissivity = ${emissivity}
stefan_boltzmann_constant = ${sigma}
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'heat_rate_radiation_rz'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
[]
[Modules/FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
value = '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
[]
[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
[]
[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
materials = 'mat1'
widths = 0.1
initial_T = Ts_init
[]
[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/heat_structure_2d_coupler/heat_structure_2d_coupler.i)
[HeatStructureMaterials]
[hs_mat]
type = SolidMaterialProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
[hs1]
type = HeatStructureCylindrical
position = '-0.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 5
names = 'region1'
widths = '0.5'
n_part_elems = '5'
materials = 'hs_mat'
initial_T = 500
[]
[hs2]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = '0.5 0.5'
n_elems = '5 5'
axial_region_names = 'axregion1 axregion2'
names = 'region1 region2'
widths = '0.5 0.2'
n_part_elems = '5 3'
materials = 'hs_mat hs_mat'
initial_T = 300
[]
[hs3]
type = HeatStructureCylindrical
position = '0.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 5
names = 'region1'
widths = '0.5'
n_part_elems = '5'
materials = 'hs_mat'
initial_T = 500
[]
[hs_coupling_1_2]
type = HeatStructure2DCoupler
primary_heat_structure = hs2
secondary_heat_structure = hs1
primary_boundary = hs2:region1:start
secondary_boundary = hs1:end
heat_transfer_coefficient = 1000
[]
[hs_coupling_2_3]
type = HeatStructure2DCoupler
primary_heat_structure = hs2
secondary_heat_structure = hs3
primary_boundary = hs2:axregion2:outer
secondary_boundary = hs3:inner
heat_transfer_coefficient = 500
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'hs1:region1 hs2:region1 hs2:region2 hs3:region1'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1000
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
file_base = 'cylindrical'
exodus = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/side_flux_integral_rz/side_flux_integral_rz.i)
# Tests the SideFluxIntegralRZ post-processor, both for an axial boundary and
# a radial boundary.
#
# The temperature distribution and thermal conductivity are set as follows:
# T(x,r) = xr
# k = 5
#
# First, the following axial boundary is tested:
# (x,r) in x0 X (r0, r1),
# x0 = 3, r0 = 1.5, r1 = 2.2
# with n = +e_x (positive x-direction).
# In this case, the integral of [-k grad(T) * n] is
# Q = -2/3 pi k (r1^3 - r0^3)
# = -76.16267789852857
#
# Next, the following radial boundary is tested:
# (x,r) in (x0,x1) X r0
# x0 = 0, x1 = 5, r0 = 1.5
# with n = -e_r (negative r-direction).
# In this case, the integral of [-k grad(T) * n] is
# Q = pi * r0 * k (x1^2 - x0^2)
# = 589.0486225480862
R_i = 1.0
[Functions]
[T_fn]
type = ParsedFunction
value = 'x * y'
[]
[]
[HeatStructureMaterials]
[hsmat]
type = SolidMaterialProperties
k = 5
cp = 1
rho = 1
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = '3 2'
n_elems = '5 4'
axial_region_names = 'axial1 axial2'
inner_radius = ${R_i}
names = 'radial1 radial2'
materials = 'hsmat hsmat'
widths = '0.5 0.7'
n_part_elems = '2 3'
initial_T = T_fn
[]
[]
[Postprocessors]
[Q_axial]
type = ADSideFluxIntegralRZ
boundary = heat_structure:radial2:axial1:axial2
variable = T_solid
diffusivity = thermal_conductivity
axis_point = '0 0 0'
axis_dir = '1 0 0'
execute_on = 'INITIAL'
[]
[Q_radial]
type = ADSideFluxIntegralRZ
boundary = heat_structure:radial1:radial2
variable = T_solid
diffusivity = thermal_conductivity
axis_point = '0 0 0'
axis_dir = '1 0 0'
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/err.no_2nd_order_with_trap.i)
[GlobalParams]
initial_p = 15.17e6
initial_vel = 1.
initial_T = 564.15
2nd_order_mesh = true
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = SolidMaterialProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '1 1 1'
materials = 'fuel-mat gap-mat clad-mat'
initial_T = 564.15
[]
[hg]
type = HeatSourceFromTotalPower
hs = hs
regions = 'FUEL'
power_fraction = 3.33672612e-1
power = reactor
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
dtmin = 1e-1
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
start_time = 0.0
end_time = 2.0
[Quadrature]
type = TRAP
order = FIRST
[]
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_motor/test.i)
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[motor]
type = ShaftConnectedMotor
inertia = 1
torque = 2
[]
[shaft]
type = Shaft
connected_components = 'motor'
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = '0'
n_part_elems = 1
widths = '1'
materials = 'mat'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
num_steps = 5
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
l_max_its = 10
[]
[Outputs]
csv = true
show = 'shaft:omega'
[]
(modules/thermal_hydraulics/test/tests/output/paraview_component_annotation_map/test.i)
[GlobalParams]
initial_p = 1e5
initial_T = 300
initial_vel = 0
closures = simple_closures
f = 0
fp = fp
gravity_vector = '0 0 0'
[]
[Modules/FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[m]
type = SolidMaterialProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[fch1]
type = FlowChannel1Phase
position = '-0.1 0 0'
orientation = '0 0 1'
length = 1
A = 1
n_elems = 10
[]
[wall1i]
type = SolidWall1Phase
input = fch1:in
[]
[wall1o]
type = SolidWall1Phase
input = fch1:out
[]
[hs1]
type = HeatStructureCylindrical
position = '-0.2 0 0'
orientation = '0 0 1'
length = 1
n_elems = 10
names = '1 2'
widths = '0.2 0.3'
materials = 'm m'
n_part_elems = '1 1'
rotation = 90
[]
[fch2]
type = FlowChannel1Phase
position = '0.1 0 0'
orientation = '0 0 1'
length = '0.6 0.4'
A = 1
n_elems = '5 5'
axial_region_names = 'longer shorter'
[]
[wall2i]
type = SolidWall1Phase
input = fch2:in
[]
[wall2o]
type = SolidWall1Phase
input = fch2:out
[]
[hs2]
type = HeatStructureCylindrical
position = '0.2 0 0'
orientation = '0 0 1'
length = '0.6 0.4'
axial_region_names = 'longer shorter'
n_elems = '5 5'
names = '1 2'
widths = '0.2 0.3'
materials = 'm m'
n_part_elems = '1 1'
rotation = 270
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
automatic_scaling = true
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
[map]
type = ParaviewComponentAnnotationMap
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/test.i)
# Test that the initial conditions read from the exodus file are correct
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
value = '2*sin(x*pi)+507'
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
materials = 'mat1'
widths = 0.1
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_bc
[]
[]
[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/hs_boundary_ambient_convection/cylindrical.i)
T_hs = 300
T_ambient1 = 500
htc1 = 100
T_ambient2 = 400
htc2 = 300
t = 0.001
L = 2
D_i = 0.2
thickness = 0.5
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
R_i = ${fparse 0.5 * D_i}
D_o = ${fparse D_i + 2 * thickness}
A = ${fparse pi * D_o * L}
heat_flux_avg = ${fparse 0.5 * (htc1 * (T_ambient1 - T_hs) + htc2 * (T_ambient2 - T_hs))}
heat_flux_integral = ${fparse heat_flux_avg * A}
scale = 0.8
E_change = ${fparse scale * heat_flux_integral * t}
[Functions]
[T_ambient_fn]
type = PiecewiseConstant
axis = z
x = '0 1'
y = '${T_ambient1} ${T_ambient2}'
[]
[htc_ambient_fn]
type = PiecewiseConstant
axis = z
x = '0 1'
y = '${htc1} ${htc2}'
[]
[]
[HeatStructureMaterials]
[hs_mat]
type = SolidMaterialProperties
rho = ${density}
cp = ${specific_heat_capacity}
k = ${conductivity}
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = ${L}
n_elems = 10
inner_radius = ${R_i}
widths = '${thickness}'
n_part_elems = '10'
materials = 'hs_mat'
names = 'region'
initial_T = ${T_hs}
[]
[ambient_convection]
type = HSBoundaryAmbientConvection
boundary = 'hs:outer'
hs = hs
T_ambient = T_ambient_fn
htc_ambient = htc_ambient_fn
scale_pp = bc_scale_pp
[]
[]
[Postprocessors]
[bc_scale_pp]
type = FunctionValuePostprocessor
function = ${scale}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs]
type = ADHeatStructureEnergyRZ
block = 'hs:region'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
[Modules/FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
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'
materials = 'mat'
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/test/tests/components/heat_source_from_power_density/phy.cylinder_power_shape_aux_var.i)
[GlobalParams]
scaling_factor_temperature = 1e1
[]
[Functions]
[HeatFunction]
type = ParsedFunction
value = 1313127093.32191
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = SolidMaterialProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = SolidMaterialProperties
k = 26
cp = 638
rho = 7.646e3
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'CH1:solid:fuel'
[]
[]
[AuxKernels]
[mock_power_aux]
type = FunctionAux
variable = power_density
function = HeatFunction
block = 'CH1:solid:fuel'
[]
[]
[Components]
[total_power]
type = TotalPower
power = 3.0e4
[]
[CH1:solid]
type = HeatStructureCylindrical
position = '0 -0.024 0'
orientation = '0 0 1'
length = 0.8
n_elems = 16
initial_T = 628.15
names = 'fuel gap clad'
widths = '0.003015 0.000465 0.00052'
n_part_elems = '20 2 2'
materials = 'fuel-mat gap-mat clad-mat'
[]
[CH1:hgen]
type = HeatSourceFromPowerDensity
hs = CH1:solid
regions = 'fuel'
power_density = power_density
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1e-3
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
nl_max_its = 40
l_tol = 1e-5
l_max_its = 50
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.i)
T_in = 300. # K
m_dot_in = 1e-4 # kg/s
press = 1e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 10
core_dia = ${units 2. cm -> m}
core_pitch = ${units 8.7 cm -> m}
# pipe parameters
pipe_dia = ${units 10. cm -> m}
tot_power = 100 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
rdg_slope_reconstruction = full
closures = simple_closures
fp = he
f = 0.4
[]
[Modules/FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
A = ${fparse core_pitch * core_pitch - pi * core_dia * core_dia / 4.}
D_h = ${core_dia}
f = 1.6
[]
[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.}'
materials = 'steel'
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}
Hw = 1.36
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 1'
connections = 'core_chan:out up_pipe:in'
volume = 1e-3
[]
[up_pipe]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '0 0 1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct2]
type = VolumeJunction1Phase
position = '0 0 2'
connections = 'up_pipe:out top_pipe:in'
volume = 1e-3
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct3]
type = VolumeJunction1Phase
position = '1 0 2'
connections = 'top_pipe:out cooling_pipe:in'
volume = 1e-3
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
Hw = 0.97
[]
[jct4]
type = VolumeJunction1Phase
position = '1 0 1'
connections = 'cooling_pipe:out down_pipe:in'
volume = 1e-3
[]
[down_pipe]
type = FlowChannel1Phase
position = '1 0 1'
orientation = '0 0 -1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct5]
type = VolumeJunction1Phase
position = '1 0 0'
connections = 'down_pipe:out bottom_b:in'
volume = 1e-3
[]
[bottom_b]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_b:out bottom_a:in'
volume = 1e-3
A_ref = ${fparse pi * pipe_dia * pipe_dia / 4.}
head = 0
[]
[bottom_a]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct6]
type = VolumeJunction1Phase
position = '0 0 0'
connections = 'bottom_a:out core_chan:in'
volume = 1e-3
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0
set_point = set_point:value
input = m_dot_pump
K_p = 250
K_i = 0.5
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[]
[Postprocessors]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct6
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 1000
dt = 10
line_search = basic
solve_type = NEWTON
nl_rel_tol = 1e-5
nl_abs_tol = 1e-5
nl_max_its = 5
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(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'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[Modules/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
value = '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
materials = 'mat'
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
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/cylindrical.i)
T_hs = 300
heat_flux = 1000
t = 0.001
L = 2
D_i = 0.2
thickness = 0.5
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
R_i = ${fparse 0.5 * D_i}
D_o = ${fparse D_i + 2 * thickness}
A = ${fparse pi * D_o * L}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[HeatStructureMaterials]
[hs_mat]
type = SolidMaterialProperties
rho = ${density}
cp = ${specific_heat_capacity}
k = ${conductivity}
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = ${L}
n_elems = 10
inner_radius = ${R_i}
widths = '${thickness}'
n_part_elems = '10'
materials = 'hs_mat'
names = 'region'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:outer'
hs = hs
q = q_fn
scale_pp = bc_scale_pp
[]
[]
[Postprocessors]
[bc_scale_pp]
type = FunctionValuePostprocessor
function = ${scale}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs]
type = ADHeatStructureEnergyRZ
block = 'hs:region'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/test.i)
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[motor]
type = ShaftConnectedMotor
inertia = 1
torque = 2
[]
[shaft]
type = Shaft
connected_components = 'motor'
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = '0'
n_part_elems = 1
widths = '1'
materials = 'mat'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
csv = true
show = 'shaft:omega'
execute_on = 'initial'
[]
(modules/thermal_hydraulics/test/tests/components/total_power/phy.constant_power.i)
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[total_power]
type = TotalPower
power = 1234.
[]
[ch1:solid]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
initial_T = 300
names = '0'
widths = '1'
n_part_elems = '1'
materials = 'mat'
[]
[]
[Postprocessors]
[reactor_power]
type = RealComponentParameterValuePostprocessor
component = total_power
parameter = power
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
end_time = 10
[]
[Outputs]
csv = true
show = 'reactor_power'
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
T_in = 300. # K
m_dot_in = 1e-4 # kg/s
press = 1e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 10
core_dia = ${units 2. cm -> m}
core_pitch = ${units 8.7 cm -> m}
tot_power = 100 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0
initial_T = ${T_in}
rdg_slope_reconstruction = full
closures = simple_closures
fp = he
[]
[Modules/FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
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}
A = ${fparse core_pitch * core_pitch - pi * core_dia * core_dia / 4.}
D_h = ${fparse (4 * core_pitch * core_pitch - pi * core_dia * core_dia) / (4 * core_pitch + pi * core_dia)}
f = 1.6
[]
[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.}'
materials = 'steel'
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}
Hw = 1.36
[]
[outlet]
type = Outlet1Phase
input = 'core_chan:out'
p = ${press}
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 1000
dt = 10
line_search = basic
solve_type = NEWTON
nl_rel_tol = 1e-5
nl_abs_tol = 1e-5
nl_max_its = 5
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
T_in = 300. # K
m_dot_in = 1e-4 # kg/s
press = 1e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 10
core_dia = ${units 2. cm -> m}
core_pitch = ${units 8.7 cm -> m}
# pipe parameters
pipe_dia = ${units 10. cm -> m}
tot_power = 100 # W
# heat exchanger parameters
hx_dia_inner = ${units 10. 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 # m
hx_n_elems = 10
m_dot_sec_in = 1 # kg/s
flow_blocks = 'core_chan up_pipe top_pipe hx/pri hx/sec down_pipe bottom_b bottom_a'
ht_blocks = 'core_chan hx/pri hx/sec'
[GlobalParams]
initial_p = ${press}
initial_vel = 0
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
rdg_slope_reconstruction = full
closures = no_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
100 ${m_dot_sec_in}'
[]
[]
[Materials]
[f_mat]
type = ADWallFrictionChurchillMaterial
block = ${flow_blocks}
D_h = D_h
f_D = f_D
mu = mu
rho = rho
vel = vel
[]
[Hw_mat]
type = ADWallHeatTransferCoefficient3EqnDittusBoelterMaterial
block = ${ht_blocks}
D_h = D_h
rho = rho
vel = vel
T = T
T_wall = T_wall
cp = cp
mu = mu
k = k
[]
[]
[Modules/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]
[no_closures]
type = Closures1PhaseNone
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
A = ${fparse core_pitch * core_pitch - pi * core_dia * core_dia / 4.}
D_h = ${core_dia}
[]
[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.}'
materials = 'steel'
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}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 1'
connections = 'core_chan:out up_pipe:in'
volume = 1e-3
[]
[up_pipe]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '0 0 1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct2]
type = VolumeJunction1Phase
position = '0 0 2'
connections = 'up_pipe:out top_pipe:in'
volume = 1e-3
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct3]
type = VolumeJunction1Phase
position = '1 0 2'
connections = 'top_pipe:out hx/pri:in'
volume = 1e-3
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
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
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 2'
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 2'
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
[]
[]
[jct4]
type = VolumeJunction1Phase
position = '1 0 1'
connections = 'hx/pri:out down_pipe:in'
volume = 1e-3
[]
[down_pipe]
type = FlowChannel1Phase
position = '1 0 1'
orientation = '0 0 -1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct5]
type = VolumeJunction1Phase
position = '1 0 0'
connections = 'down_pipe:out bottom_b:in'
volume = 1e-3
[]
[bottom_b]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_b:out bottom_a:in'
volume = 1e-3
A_ref = ${fparse pi * pipe_dia * pipe_dia / 4.}
head = 0
[]
[bottom_a]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct6]
type = VolumeJunction1Phase
position = '0 0 0'
connections = 'bottom_a:out core_chan:in'
volume = 1e-3
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:out'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:in'
p = ${press}
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0
set_point = set_point:value
input = m_dot_pump
K_p = 250
K_i = 0.5
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]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct6
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[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
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 1
[]
dtmax = 100
end_time = 50000
line_search = basic
solve_type = NEWTON
nl_rel_tol = 1e-5
nl_abs_tol = 1e-5
nl_max_its = 5
[]
[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/heat_structure/steady_state.i)
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
value = '2*sin(x*pi)+507'
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
materials = 'mat1'
widths = 0.1
initial_T = Ts_init
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[]
[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/test/tests/components/deprecated/heat_generation.i)
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 -0.024748 0'
orientation = '0 0 1'
length = 3.865
n_elems = 1
names = 'fuel'
widths = '0.004096'
n_part_elems = '1'
materials = 'fuel-mat'
initial_T = 559.15
[]
[hgen]
type = HeatGeneration
hs = hs
regions = fuel
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/userobjects/layered_avg_rz/test.i)
length = 4
[GlobalParams]
[]
[UserObjects]
[average_temp_uo]
type = LayeredAverageRZ
execute_on = 'initial timestep_end'
direction = z
variable = T_solid
block = hs:1
num_layers = 10
axis_point = '0 0 0'
axis_dir = '0 0 1'
length = ${length}
[]
[]
[AuxVariables]
[average_temp]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[layered_average]
type = SpatialUserObjectAux
variable = average_temp
execute_on = 'initial timestep_end'
user_object = average_temp_uo
[]
[]
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[mat2]
type = SolidMaterialProperties
k = 0.6
cp = 1.
rho = 1.
[]
[mat3]
type = SolidMaterialProperties
k = 21.5
cp = 350.
rho = 6.55e3
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = 20
initial_T = '300 + 10 * sin(0.5 * z * pi / 3.865)'
names = '1 2 3'
widths = '0.004 0.0001 0.0005'
n_part_elems = '10 1 2'
materials = 'mat1 mat2 mat3'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.5
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
show = 'average_temp'
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_external_app_convection_rz/heat_rate_external_app_convection_rz.i)
# Tests the HeatRateExternalAppConvectionRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
S = ${fparse 2 * pi * R_o * L}
Q = 5000
T = 300
T_ambient = 350
htc = ${fparse Q / (S * (T_ambient - T))}
[AuxVariables]
[T_ext]
initial_condition = ${T_ambient}
[]
[htc_ext]
initial_condition = ${htc}
[]
[]
[HeatStructureMaterials]
[region1-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
materials = 'region1-mat'
widths = '${thickness}'
n_part_elems = '5'
initial_T = ${T}
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateExternalAppConvectionRZ
boundary = heat_structure:outer
axis_point = '1 2 3'
axis_dir = '1 1 1'
htc_ext = htc_ext
T = T_solid
T_ext = T_ext
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'heat_rate_external_app_convection_rz'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
T_in = 300. # K
m_dot_in = 1e-4 # kg/s
press = 1e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 10
core_dia = ${units 2. cm -> m}
core_pitch = ${units 8.7 cm -> m}
# pipe parameters
pipe_dia = ${units 10. cm -> m}
tot_power = 100 # W
# heat exchanger parameters
hx_dia_inner = ${units 10. 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 # m
hx_n_elems = 10
m_dot_sec_in = 1 # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
rdg_slope_reconstruction = full
closures = simple_closures
fp = he
f = 0.4
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
100 ${m_dot_sec_in}'
[]
[]
[Modules/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]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
A = ${fparse core_pitch * core_pitch - pi * core_dia * core_dia / 4.}
D_h = ${core_dia}
f = 1.6
[]
[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.}'
materials = 'steel'
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}
Hw = 1.36
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 1'
connections = 'core_chan:out up_pipe:in'
volume = 1e-3
[]
[up_pipe]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '0 0 1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct2]
type = VolumeJunction1Phase
position = '0 0 2'
connections = 'up_pipe:out top_pipe:in'
volume = 1e-3
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct3]
type = VolumeJunction1Phase
position = '1 0 2'
connections = 'top_pipe:out hx/pri:in'
volume = 1e-3
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
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
Hw = 0.97
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 2'
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}
Hw = 36
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 2'
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
f = 0.075
[]
[]
[jct4]
type = VolumeJunction1Phase
position = '1 0 1'
connections = 'hx/pri:out down_pipe:in'
volume = 1e-3
[]
[down_pipe]
type = FlowChannel1Phase
position = '1 0 1'
orientation = '0 0 -1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct5]
type = VolumeJunction1Phase
position = '1 0 0'
connections = 'down_pipe:out bottom_b:in'
volume = 1e-3
[]
[bottom_b]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_b:out bottom_a:in'
volume = 1e-3
A_ref = ${fparse pi * pipe_dia * pipe_dia / 4.}
head = 0
[]
[bottom_a]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct6]
type = VolumeJunction1Phase
position = '0 0 0'
connections = 'bottom_a:out core_chan:in'
volume = 1e-3
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:out'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:in'
p = ${press}
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0
set_point = set_point:value
input = m_dot_pump
K_p = 250
K_i = 0.5
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]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct6
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[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
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 1
[]
dtmax = 100
end_time = 50000
line_search = basic
solve_type = NEWTON
nl_rel_tol = 1e-5
nl_abs_tol = 1e-5
nl_max_its = 5
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/cylindrical.i)
T_hs = 1200
T_ambient = 1500
emissivity = 0.3
view_factor = 0.6
t = 5.0
L = 2
D_i = 0.2
thickness = 0.5
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
stefan_boltzmann = 5.670367e-8
R_i = ${fparse 0.5 * D_i}
D_o = ${fparse D_i + 2 * thickness}
A = ${fparse pi * D_o * L}
heat_flux = ${fparse stefan_boltzmann * emissivity * view_factor * (T_ambient^4 - T_hs^4)}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[HeatStructureMaterials]
[hs_mat]
type = SolidMaterialProperties
rho = ${density}
cp = ${specific_heat_capacity}
k = ${conductivity}
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = ${L}
n_elems = 10
inner_radius = ${R_i}
widths = '${thickness}'
n_part_elems = '10'
materials = 'hs_mat'
names = 'region'
initial_T = ${T_hs}
[]
[hs_boundary]
type = HSBoundaryRadiation
boundary = 'hs:outer'
hs = hs
T_ambient = ${T_ambient}
emissivity = ${emissivity}
view_factor = ${view_factor}
scale_pp = bc_scale_pp
[]
[]
[Postprocessors]
[bc_scale_pp]
type = FunctionValuePostprocessor
function = ${scale}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs]
type = ADHeatStructureEnergyRZ
block = 'hs:region'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/uniform_refine/test.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e5
initial_T = 300
initial_vel = 0
closures = simple_closures
rdg_slope_reconstruction = FULL
f = 0
fp = eos
[]
[Modules/FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
rho = 10
cp = 1
k = 1
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 2
A = 1
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
volume = 1e-5
position = '1 0 0'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe2:out'
[]
[hs]
type = HeatStructureCylindrical
position = '0 1 0'
orientation = '1 0 0'
length = '1'
n_elems = '2'
names = '0'
widths = 0.5
n_part_elems = '1'
materials = 'mat1'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1e-4
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 1e-5
nl_abs_tol = 1e-7
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
automatic_scaling = true
[]
[Outputs]
exodus = true
show = 'A'
[]
[Debug]
show_actions = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.energy_heatstructure_ss_1phase.i)
# This test tests conservation of energy at steady state for 1-phase flow when a
# heat structure is used. Conservation is checked by comparing the integral of
# the heat flux against the difference of the boundary fluxes.
[GlobalParams]
initial_p = 7.0e6
initial_vel = 0
initial_T = 513
gravity_vector = '0.0 0.0 0.0'
scaling_factor_1phase = '1 1 1e-4'
closures = simple_closures
[]
[Modules/FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.7
cp = 3.e2
rho = 10.42e3
[]
[gap-mat]
type = SolidMaterialProperties
k = 0.7
cp = 5e3
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Components]
[reactor]
type = TotalPower
power = 1e3
[]
[core:pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.0
fp = eos
[]
[core:solid]
type = HeatStructureCylindrical
position = '0 -0.0071501 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
names = 'FUEL GAP CLAD'
widths = '6.057900E-03 1.524000E-04 9.398000E-04'
n_part_elems = '5 1 2'
materials = 'fuel-mat gap-mat clad-mat'
initial_T = 513
[]
[core:hgen]
type = HeatSourceFromTotalPower
hs = core:solid
regions = 'FUEL'
power = reactor
power_fraction = 1
[]
[core:hx]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core:pipe
hs = core:solid
hs_side = outer
Hw = 1.0e4
P_hf = 4.4925e-2
[]
[inlet]
type = InletDensityVelocity1Phase
input = 'core:pipe:in'
rho = 817.382210128610836
vel = 2.4
[]
[outlet]
type = Outlet1Phase
input = 'core:pipe:out'
p = 7e6
[]
[]
[Postprocessors]
[E_in]
type = ADFlowBoundaryFlux1Phase
boundary = inlet
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out]
type = ADFlowBoundaryFlux1Phase
boundary = outlet
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe]
type = ADHeatRateConvection1Phase
block = core:pipe
T_wall = T_wall
T = T
Hw = Hw
P_hf = P_hf
execute_on = 'initial timestep_end'
[]
[E_diff]
type = DifferencePostprocessor
value1 = E_in
value2 = E_out
execute_on = 'initial timestep_end'
[]
[E_conservation]
type = SumPostprocessor
values = 'E_diff hf_pipe'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
abort_on_solve_fail = true
dt = 5
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 50
l_tol = 1e-3
l_max_its = 60
start_time = 0
end_time = 260
[]
[Outputs]
[out]
type = CSV
execute_on = final
show = 'E_conservation'
[]
[console]
type = Console
show = 'E_conservation'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.cylinder_power_shape_fn.i)
[GlobalParams]
scaling_factor_temperature = 1e0
[]
[Functions]
[psf]
type = ParsedFunction
value = 1
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = SolidMaterialProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = SolidMaterialProperties
k = 26
cp = 638
rho = 7.646e3
[]
[]
[Components]
[reactor]
type = TotalPower
power = 3.0e4
[]
[CH1:solid]
type = HeatStructureCylindrical
position = '0 -0.024 0'
orientation = '0 0 1'
length = 0.8
n_elems = 16
initial_T = 628.15
names = 'fuel gap clad'
widths = '0.003015 0.000465 0.00052'
n_part_elems = '20 2 2'
materials = 'fuel-mat gap-mat clad-mat'
[]
[CH1:hgen]
type = HeatSourceFromTotalPower
hs = CH1:solid
regions = 'fuel'
power = reactor
power_shape_function = psf
power_fraction = 1
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1e-3
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
nl_max_its = 40
l_tol = 1e-5
l_max_its = 50
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/thermal_hydraulics/test/tests/postprocessors/function_side_integral_rz/function_side_integral_rz.i)
# Tests the FunctionSideIntegralRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
S = ${fparse 2 * pi * R_o * L}
Q = 5000
q = ${fparse Q / S}
[HeatStructureMaterials]
[region1-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Functions]
[q_fn]
type = ConstantFunction
value = ${q}
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
materials = 'region1-mat'
widths = '${thickness}'
n_part_elems = '5'
initial_T = 300
[]
[]
[Postprocessors]
[Q_pp]
type = FunctionSideIntegralRZ
boundary = heat_structure:outer
axis_point = '1 2 3'
axis_dir = '1 1 1'
function = q_fn
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'function_side_integral_rz'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(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
[]
[Modules/FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[gap-mat]
type = SolidMaterialProperties
k = 0.6
cp = 1.
rho = 1.
[]
[clad-mat]
type = SolidMaterialProperties
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'
materials = 'fuel-mat gap-mat clad-mat'
[]
[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/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
[]
[Modules/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
[]
[]
[HeatStructureMaterials]
[mat1]
type = SolidMaterialProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
value = '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
materials = 'mat1'
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/components/heat_structure_base/phy.variable_init_t.i)
# Tests that a function can be used to initialize temperature in a heat structure.
[GlobalParams]
[]
[Functions]
[fn-initial_T]
type = ParsedFunction
value = 'baseT + (dT * sin((pi * x) / length))'
vars = 'baseT dT length'
vals = '560.0 30.0 3.6576'
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = SolidMaterialProperties
k = 0.1
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 3.6576
n_elems = 100
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '10 3 3'
materials = 'fuel-mat gap-mat clad-mat'
initial_T = fn-initial_T
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 580.0
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.01
num_steps = 10
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-5
nl_abs_tol = 1e-6
nl_max_its = 8
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[out]
type = Exodus
[]
[console]
type = Console
execute_scalars_on = none
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/err.base.i)
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'hs:fuel'
[]
[]
[AuxKernels]
[mock_power_aux]
type = ConstantAux
variable = power_density
value = 1e9
block = 'hs:fuel'
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 -0.024748 0'
orientation = '0 0 1'
length = 3.865
n_elems = 1
names = 'fuel'
widths = '0.004096'
n_part_elems = '1'
materials = 'fuel-mat'
initial_T = 559.15
[]
[hgen]
type = HeatSourceFromPowerDensity
power_density = power_density
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/components/total_power/clg.power.i)
[Functions]
[decayheatcurve]
type = PiecewiseLinear
x = '0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.5 2.0 3.0 4.0 5.0 6.0 8.0 10.0'
y = '1.0 .8382 .572 .3806 .2792 .2246 .1904 .1672 .1503 .1376 .1275 .1032 .09884
.09209 .0869 .08271 .07922 .07375 .06967'
[]
[dts]
type = PiecewiseLinear
# this matches the decay heat curve function
x = '0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.5 2.0 3.0 4.0 5.0 6.0 8.0 10.0'
y = '0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.5 0.5 1.0 1.0 1.0 1.0 2.0 2.0 2.0'
[]
[]
[HeatStructureMaterials]
[mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[total_power]
type = TotalPower
power = 1.
[]
[ch1:solid]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
initial_T = 300
names = '0'
widths = '1'
n_part_elems = '1'
materials = 'mat'
[]
[]
[ControlLogic]
[reactor_power_control]
type = TimeFunctionComponentControl
component = total_power
parameter = power
function = decayheatcurve
[]
[]
[Postprocessors]
[reactor_power]
type = RealComponentParameterValuePostprocessor
component = total_power
parameter = power
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
[TimeStepper]
type = FunctionDT
function = dts
[]
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
end_time = 10
[]
[Outputs]
csv = true
show = 'reactor_power'
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation.i)
# Tests energy conservation for HeatGeneration component when a power component is used
n_units = 5
power = 1e5
power_fraction = 0.3
t = 1
energy_change = ${fparse power_fraction * power * t}
[GlobalParams]
scaling_factor_temperature = 1e-3
[]
[Functions]
[power_shape]
type = ConstantFunction
value = 0.4
[]
[]
[HeatStructureMaterials]
[main-material]
type = SolidMaterialProperties
k = 1e4
cp = 500.0
rho = 100.0
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
num_rods = ${n_units}
position = '0 1 0'
orientation = '1 0 0'
length = 0.8
n_elems = 100
names = 'rgn1 rgn2 rgn3'
materials = 'main-material main-material main-material'
widths = '0.4 0.1 0.5'
n_part_elems = '2 2 2'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromTotalPower
hs = heat_structure
regions = 'rgn1 rgn2'
power = total_power
power_fraction = ${power_fraction}
[]
[total_power]
type = TotalPower
power = ${power}
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'heat_structure:rgn1 heat_structure:rgn2 heat_structure:rgn3'
n_units = ${n_units}
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
[E_tot_change_rel_err]
type = RelativeDifferencePostprocessor
value1 = E_tot_change
value2 = ${energy_change}
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/phy.rz.i)
# Tests that cylindrical heat structure geometry can be used.
[Functions]
[power_profile_fn]
type = ParsedFunction
value = '1.570796326794897 * sin(x / 3.6576 * pi)'
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = SolidMaterialProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 1'
orientation = '1 0 0'
length = 3.6576
n_elems = 20
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '3 1 1'
materials = 'fuel-mat gap-mat clad-mat'
initial_T = 564.15
[]
[hg]
type = HeatSourceFromTotalPower
hs = hs
regions = 'FUEL'
power_fraction = 3.33672612e-1
power = reactor
power_shape_function = power_profile_fn
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 2
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
[out]
type = Exodus
[]
[console]
type = Console
execute_scalars_on = none
[]
[]
(modules/thermal_hydraulics/test/tests/components/geometrical_component/err.2nd_order.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 1e6
initial_T = 353.1
initial_vel = 0.0
2nd_order_mesh = true
closures = simple_closures
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[hs-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 2
names = 'blk'
widths = '1'
n_part_elems = '2'
materials = 'hs-mat'
initial_T = 350
[]
[start]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:start
T = 300
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
dtmin = 1.e-7
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-5
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-3
l_max_its = 100
start_time = 0.0
end_time = 4.0
[Quadrature]
type = TRAP
order = FIRST
[]
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_z.i)
# Testing that T_solid gets properly projected onto a pipe
# That's why Hw in pipe1 is set to 0, so we do not have any heat exchange
# Note that the pipe and the heat structure have an opposite orientation, which
# is crucial for this test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[Modules/FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[wall-mat]
type = SolidMaterialProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
value = '290 + sin((1 - z) * pi * 1.4)'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0.2 0 0'
orientation = '0 0 1'
length = 1
n_elems = 50
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hs]
type = HeatStructureCylindrical
position = '0.1 0 1'
orientation = '0 0 -1'
length = 1
n_elems = 50
rotation = 90
materials = 'wall-mat'
n_part_elems = 2
widths = '0.1'
names = 'wall'
initial_T = T_init
[]
[hxconn]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe1
Hw = 0
P_hf = 6.2831853072e-01
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe1:out'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T_solid'
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_x.i)
# Testing that T_solid gets properly projected onto a pipe
# That's why Hw in pipe1 is set to 0, so we do not have any heat exchange
# Note that the pipe and the heat structure have an opposite orientation, which
# is crucial for this test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[Modules/FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[wall-mat]
type = SolidMaterialProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
value = '290 + sin((1 - x) * pi * 1.4)'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 -0.2 0'
orientation = '1 0 0'
length = 1
n_elems = 50
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hs]
type = HeatStructureCylindrical
position = '1 -0.1 0'
orientation = '-1 0 0'
length = 1
n_elems = 50
#rotation = 90
materials = 'wall-mat'
n_part_elems = 3
widths = '0.1'
names = 'wall'
initial_T = T_init
[]
[hxconn]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe1
Hw = 0
P_hf = 6.2831853072e-01
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe1:out'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T_solid'
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
T_in = 300. # K
m_dot_in = 1e-4 # kg/s
press = 1e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 10
core_dia = ${units 2. cm -> m}
core_pitch = ${units 8.7 cm -> m}
# pipe parameters
pipe_dia = ${units 10. cm -> m}
tot_power = 100 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
rdg_slope_reconstruction = full
closures = simple_closures
fp = he
f = 0.4
[]
[Modules/FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[steel]
type = SolidMaterialProperties
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}
A = ${fparse core_pitch * core_pitch - pi * core_dia * core_dia / 4.}
D_h = ${core_dia}
f = 1.6
[]
[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.}'
materials = 'steel'
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}
Hw = 1.36
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 1'
connections = 'core_chan:out up_pipe:in'
volume = 1e-3
[]
[up_pipe]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '0 0 1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct2]
type = VolumeJunction1Phase
position = '0 0 2'
connections = 'up_pipe:out top_pipe:in'
volume = 1e-3
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[jct3]
type = VolumeJunction1Phase
position = '1 0 2'
connections = 'top_pipe:out cooling_pipe:in'
volume = 1e-3
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
Hw = 0.97
[]
[jct4]
type = VolumeJunction1Phase
position = '1 0 1'
connections = 'cooling_pipe:out down_pipe:in'
volume = 1e-3
[]
[down_pipe]
type = FlowChannel1Phase
position = '1 0 1'
orientation = '0 0 -1'
length = 1
n_elems = 10
A = ${fparse pi * pipe_dia * pipe_dia / 4.}
D_h = ${pipe_dia}
[]
[outlet]
type = Outlet1Phase
input = 'down_pipe:out'
p = ${press}
[]
[]
[Postprocessors]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 1000
dt = 10
line_search = basic
solve_type = NEWTON
nl_rel_tol = 1e-5
nl_abs_tol = 1e-5
nl_max_its = 5
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.slave.i)
[HeatStructureMaterials]
[ss316]
type = SolidMaterialProperties
rho = 8.0272e3
cp = 502.1
k = 16.26
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
orientation = '1 0 0'
position = '0 0 0'
length = 1
n_elems = 10
inner_radius = 0.1
widths = '0.5'
n_part_elems = '10'
materials = 'ss316'
names = 'region'
initial_T = 300
[]
[ext_temperature]
type = HSBoundaryExternalAppTemperature
boundary = 'hs:outer'
hs = hs
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
abort_on_solve_fail = true
solve_type = NEWTON
line_search = basic
nl_rel_tol = 1e-7
[]
[Outputs]
exodus = true
show = 'T_ext'
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/err.1phase.i)
[GlobalParams]
initial_p = 1e5
initial_vel = 0
initial_T = 300
closures = simple_closures
[]
[Modules/FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0.1 0'
orientation = '0 0 1'
length = 4
n_elems = 2
A = 8.78882e-5
D_h = 0.01179
f = 0.01
fp = fp
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = 4
n_elems = 2
names = 'fuel'
widths = '0.1'
n_part_elems = '1'
materials = 'fuel-mat'
initial_T = 300
[]
[hx]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe
P_hf = 0.029832559676
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe:in'
p0 = 1e5
T0 = 300
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 1.e-5
solve_type = 'NEWTON'
num_steps = 1
abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_convection_rz/heat_rate_convection_rz.i)
# Tests the HeatRateConvectionRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
S = ${fparse 2 * pi * R_o * L}
Q = 5000
T = 300
T_ambient = 350
htc = ${fparse Q / (S * (T_ambient - T))}
[HeatStructureMaterials]
[region1-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
materials = 'region1-mat'
widths = '${thickness}'
n_part_elems = '5'
initial_T = ${T}
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateConvectionRZ
boundary = heat_structure:outer
axis_point = '1 2 3'
axis_dir = '1 1 1'
htc = ${htc}
T = T_solid
T_ambient = ${T_ambient}
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'heat_rate_convection_rz'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_cylinder.i)
# Tests the HeatStructureEnergyRZ post-processor for a cylinder geometry.
#
# The heat structure will consist of 5 units of the following geometry:
# x in (x1, x2) = (0, 2) => length (x-direction) = 2
# inner radius = 2
# region widths: [4, 3]
# => y region 1: y in (y1, y2) = (2, 6)
# => y region 2: y in (y2, y3) = (6, 9)
#
# The temperature distribution is the following linear function:
# T(x,y) = A * x + B * y + C
# where A = 0.2, B = 0.4, C = 0.5.
# The integral of T(x,y) * y w.r.t. y = (y2, y3) is
# 1.0/3.0 * B * (y3^3 - y2^3) + 0.5 * (A * x + C) * (y3^2 - y2^2)
# The integral of this w.r.t. x = (x1, x2) is
# 1.0/3.0 * B * (y3^3 - y2^3) * dx + 0.5 * (0.5 * A * (x2^2 - x1^2) + C * dx) * (y3^2 - y2^2)
# where dx = x2 - x1.
#
# The post-processor computes the integral
# n_units * 2 pi * rho2 * cp2 * int_x int_y2 T(x, y) * y * dy * dx,
# where n_units = 5.
#
# The relevant heat structure material properties are
# rho2 = 3
# cp2 = 5
#
# Finally, n_units * 2 pi * rho2 * cp2 * int(T * y) = 7.930950653987433e+04
[HeatStructureMaterials]
[region1-mat]
type = SolidMaterialProperties
k = 1
cp = 1
rho = 1
[]
[region2-mat]
type = SolidMaterialProperties
k = 1
cp = 5
rho = 3
[]
[]
[Functions]
[T0_fn]
type = ParsedFunction
value = '0.2 * x + 0.4 * (y - 2) + 0.5'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
num_rods = 5
position = '0 2 0'
orientation = '1 0 0'
inner_radius = 2.0
length = 2.0
n_elems = 50
names = 'region1 region2'
materials = 'region1-mat region2-mat'
widths = '4.0 3.0'
n_part_elems = '5 50'
initial_T = T0_fn
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'heat_structure:region2'
n_units = 5
axis_point = '0 2 0'
axis_dir = '1 0 0'
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'heat_structure_energy_cylinder'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_specified_temperature/err.no_bnd.i)
[HeatStructureMaterials]
[hs_mat]
type = SolidMaterialProperties
rho = 1
cp = 2
k = 3
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
orientation = '1 0 0'
position = '0 0 0'
length = 1
n_elems = 2
names = 'blk'
widths = '0.1'
n_part_elems = '1'
materials = 'hs_mat'
initial_T = 300
[]
[hs_boundary]
type = HSBoundarySpecifiedTemperature
boundary = 'hs:inner'
hs = hs
T = 300
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.sub_discretization.i)
#
# Testing the ability to discretize the HeatStructure by dividing it into
# axial subsections
#
[GlobalParams]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = SolidMaterialProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 1'
orientation = '1 0 0'
axial_region_names = 'reg1 reg2'
length = '2.0 1.6576'
n_elems = '7 4'
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '10 3 3'
materials = 'fuel-mat gap-mat clad-mat'
initial_T = 300
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 300
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
[out]
type = Exodus
[]
[console]
type = Console
execute_scalars_on = none
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/err.no_T_ic.i)
# Tests that error is generated when no initial temperature function is provided
# when not restarting.
[GlobalParams]
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = SolidMaterialProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '1 1 1'
materials = 'fuel-mat gap-mat clad-mat'
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.1
dtmin = 1e-1
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
start_time = 0.0
end_time = 2.0
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/2nd_order.i)
# This tests ensures that 2nd-order meshes can be used; it checks for the
# "Solve Converged" string at the end of a time step.
[GlobalParams]
2nd_order_mesh = true
[]
[HeatStructureMaterials]
[fuel-mat]
type = SolidMaterialProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = SolidMaterialProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = SolidMaterialProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 1
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '1 1 1'
materials = 'fuel-mat gap-mat clad-mat'
initial_T = 564.15
[]
[hg]
type = HeatSourceFromTotalPower
hs = hs
regions = 'FUEL'
power_fraction = 3.33672612e-1
power = reactor
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]