- lengthLength of each axial section [m]
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
- n_elemsNumber of elements in each axial section
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements in each axial section
- n_part_elemsNumber of elements of each radial region
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements of each radial region
- namesName of each radial region
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Name of each radial region
- orientationDirection of axis from start position to end position (no need to normalize)
C++ Type:libMesh::VectorValue<double>
Unit:(no unit assumed)
Controllable:No
Description:Direction of axis from start position to end position (no need to normalize)
- positionStart position of axis in 3-D space [m]
C++ Type:libMesh::Point
Unit:(no unit assumed)
Controllable:No
Description:Start position of axis in 3-D space [m]
- widthsWidth of each radial region [m]
C++ Type:std::vector<double>
Unit:(no unit assumed)
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.
There are two options for specification of the thermal properties on the heat structure:
Create a SolidProperties object for each unique heat structure material, and then provide "solid_properties" which corresponds to the
SolidProperties
object to use in each transverse region (each entry corresponds to the equally indexed entry in "names") and "solid_properties_T_ref", which provides the temperatures at which to evaluate the densities, since a constant density is to be used in each region, due to heat structures having a non-deformable mesh.Create Materials object(s) 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>
Unit:(no unit assumed)
Controllable:No
Description:Names to assign to axial regions
- initial_TInitial temperature [K]
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:Initial temperature [K]
- inner_radius0Inner radius of the heat structure [m]
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Inner radius of the heat structure [m]
- num_rods1Number of rods represented by this heat structure
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Number of rods represented by this heat structure
- offset_mesh_by_inner_radiusFalseOffset the mesh by the inner radius?
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Offset the mesh by the inner radius?
- rotation0Angle of rotation about the x-axis [degrees]
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Angle of rotation about the x-axis [degrees]
- scaling_factor_temperature1Scaling factor for solid temperature variable.
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Scaling factor for solid temperature variable.
- solid_propertiesSolid properties object name for each radial region
C++ Type:std::vector<UserObjectName>
Unit:(no unit assumed)
Controllable:No
Description:Solid properties object name for each radial region
- solid_properties_T_refDensity reference temperatures for each radial region. This is required if 'solid_properties' is provided. The density in each region will be a constant value computed by evaluating the density function at the reference temperature.
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Density reference temperatures for each radial region. This is required if 'solid_properties' is provided. The density in each region will be a constant value computed by evaluating the density function at the reference temperature.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
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/tutorials/single_phase_flow/06_custom_closures.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.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_base/phy.sub_discretization.i)
- (modules/thermal_hydraulics/test/tests/userobjects/layered_avg_rz/test.i)
- (modules/thermal_hydraulics/test/tests/interfaces/discrete_line_segment_interface/discrete_line_segment_interface.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/geometrical_component/err.2nd_order.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/err.no_2nd_order_with_trap.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/steady.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.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/hs_boundary_external_app_temperature/phy.child.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d2d_radiation/adjacent_cylinders.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/err.base.i)
- (modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/function_side_integral_rz/function_side_integral_rz.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_motor/clg.test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_specified_temperature/err.no_bnd.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.cylinder_power_shape_fn.i)
- (modules/thermal_hydraulics/test/tests/components/total_power/clg.power.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/jac.1phase.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.cylinder_power_shape_aux_var.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_radiation_rz/heat_rate_radiation_rz.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/err.base.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/err.no_T_ic.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_conduction_rz/heat_rate_conduction_rz.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_x.i)
- (modules/thermal_hydraulics/test/tests/components/total_power/phy.constant_power.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/part_base.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_external_app_convection_rz/heat_rate_external_app_convection_rz.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/cylindrical.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_heat_flux_rz/heat_rate_heat_flux_rz.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.variable_init_t.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_2d_coupler/heat_structure_2d_coupler.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.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/utils/logger/test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/sub.i)
- (modules/thermal_hydraulics/test/tests/output/paraview_component_annotation_map/test.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/side_flux_integral_rz/side_flux_integral_rz.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/cylindrical_with_fins.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/element_integral_material_property_rz/element_integral_material_property_rz.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
- (modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/surrogate_power_profile.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_2d_coupler/separated.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/2nd_order.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d2d_radiation/concentric_cylinders.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_structure_base/inner_radial_boundary.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_motor/test.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_convection_rz/heat_rate_convection_rz.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d2d_radiation/energy_conservation.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/err.1phase.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_cylinder.i)
- (modules/thermal_hydraulics/test/tests/components/deprecated/heat_generation.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_2d_radiation_coupler_rz/heat_structure_2d_radiation_coupler_rz.i)
initial_T
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:Initial temperature [K]
position
C++ Type:libMesh::Point
Unit:(no unit assumed)
Controllable:No
Description:Start position of axis in 3-D space [m]
orientation
C++ Type:libMesh::VectorValue<double>
Unit:(no unit assumed)
Controllable:No
Description:Direction of axis from start position to end position (no need to normalize)
length
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
n_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements in each axial section
axial_region_names
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Names to assign to axial regions
names
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements of each radial region
solid_properties
C++ Type:std::vector<UserObjectName>
Unit:(no unit assumed)
Controllable:No
Description:Solid properties object name for each radial region
names
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Name of each radial region
solid_properties_T_ref
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Density reference temperatures for each radial region. This is required if 'solid_properties' is provided. The density in each region will be a constant value computed by evaluating the density function at the reference temperature.
inner_radius
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Inner radius of the heat structure [m]
position
C++ Type:libMesh::Point
Unit:(no unit assumed)
Controllable:No
Description:Start position of axis in 3-D space [m]
orientation
C++ Type:libMesh::VectorValue<double>
Unit:(no unit assumed)
Controllable:No
Description:Direction of axis from start position to end position (no need to normalize)
length
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
length
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
n_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements in each axial section
length
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
n_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements in each axial section
n_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements in each axial section
length
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
length
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Length of each axial section [m]
n_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements in each axial section
axial_region_names
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Names to assign to axial regions
names
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements of each radial region
names
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Name of each radial region
widths
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Width of each radial region [m]
n_part_elems
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:Number of elements of each radial region
(modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
10 ${m_dot_sec_in}'
[]
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[none_closures]
type = Closures1PhaseNone
[]
[]
[Materials]
[Re_mat]
type = ADReynoldsNumberMaterial
Re = Re
rho = rho
vel = vel
D_h = D_h
mu = mu
block = hx/pri
[]
[f_mat]
type = ADParsedMaterial
property_name = f_D
constant_names = 'a b c'
constant_expressions = '1 0.1 -0.5'
material_property_names = 'Re'
expression = 'a + b * Re^c'
block = hx/pri
[]
[Pr_mat]
type = ADPrandtlNumberMaterial
Pr = Pr
cp = cp
mu = mu
k = k
block = hx/pri
[]
[Nu_mat]
type = ADParsedMaterial
property_name = 'Nu'
constant_names = 'a b c'
constant_expressions = '0.03 0.9 0.5'
material_property_names = 'Re Pr'
expression = 'a * Re ^b * Pr^c'
block = hx/pri
[]
[Hw_mat]
type = ADConvectiveHeatTransferCoefficientMaterial
D_h = D_h
k = k
Nu = Nu
Hw = Hw
block = hx/pri
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
use_scalar_variables = false
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = ${A_core}
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
use_scalar_variables = false
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
use_scalar_variables = false
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.75'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
use_scalar_variables = false
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
closures = none_closures
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
solid_properties = 'steel'
solid_properties_T_ref = '300'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 0.5'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
use_scalar_variables = false
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
use_scalar_variables = false
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0.0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[m_dot_sec_inlet_ctrl]
type = GetFunctionValueControl
function = m_dot_sec_fn
[]
[set_m_dot_sec_ctrl]
type = SetComponentRealValueControl
component = inlet_sec
parameter = m_dot
value = m_dot_sec_inlet_ctrl:value
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
[Hw_hx_pri]
type = ADElementAverageMaterialProperty
mat_prop = Hw
block = hx/pri
[]
[fD_hx_pri]
type = ADElementAverageMaterialProperty
mat_prop = f_D
block = hx/pri
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'core_chan:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[outlet]
type = Outlet1Phase
input = 'core_chan:out'
p = ${press}
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 10
[]
end_time = 5000
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/test.i)
# Test that the initial conditions read from the exodus file are correct
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
closures = simple_closures
initial_from_file = 'steady_state_out.e'
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
inner_radius = 0.01
widths = 0.1
[]
[ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = hs
hs_side = INNER
Hw = 10000
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_bc
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial'
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.sub_discretization.i)
#
# Testing the ability to discretize the HeatStructure by dividing it into
# axial subsections
#
[GlobalParams]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
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/userobjects/layered_avg_rz/test.i)
length = 4
[GlobalParams]
[]
[UserObjects]
[average_temp_uo]
type = LayeredAverageRZ
execute_on = 'initial timestep_end'
direction = z
variable = T_solid
block = hs:1
num_layers = 10
axis_point = '0 0 0'
axis_dir = '0 0 1'
length = ${length}
[]
[]
[AuxVariables]
[average_temp]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[layered_average]
type = SpatialUserObjectAux
variable = average_temp
execute_on = 'initial timestep_end'
user_object = average_temp_uo
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[mat2]
type = ThermalFunctionSolidProperties
k = 0.6
cp = 1.
rho = 1.
[]
[mat3]
type = ThermalFunctionSolidProperties
k = 21.5
cp = 350.
rho = 6.55e3
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = 20
initial_T = '300 + 10 * sin(0.5 * z * pi / 3.865)'
names = '1 2 3'
widths = '0.004 0.0001 0.0005'
n_part_elems = '10 1 2'
solid_properties = 'mat1 mat2 mat3'
solid_properties_T_ref = '300 300 300'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.5
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
show = 'average_temp'
[]
(modules/thermal_hydraulics/test/tests/interfaces/discrete_line_segment_interface/discrete_line_segment_interface.i)
# Tests DiscreteLineSegmentInterface
[AuxVariables]
[testvar]
order = FIRST
family = LAGRANGE
[]
[]
[AuxKernels]
[testvar_aux]
type = DiscreteLineSegmentInterfaceTestAux
variable = testvar
test_type = axial_coord
position = '5 -4 2'
orientation = '-1 3 -5'
rotation = 60
length = '2.0 3.0 5.0'
n_elems = '4 6 10'
execute_on = 'INITIAL'
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '5 -4 2'
orientation = '-1 3 -5'
rotation = 60
length = '2.0 3.0 5.0'
n_elems = '4 6 10'
axial_region_names = 'section0 section1 section2'
names = 'region1 region2 region3'
widths = '1.0 3.0 2.0'
n_part_elems = '2 6 8'
solid_properties = 'hs_mat hs_mat hs_mat'
solid_properties_T_ref = '300 300 300'
initial_T = 300
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
file_base = 'axial_coord'
exodus = true
hide = 'T_solid'
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/steady_state.i)
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'mat'
solid_properties_T_ref = '300'
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/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
[]
[]
[SolidProperties]
[hs-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs-mat'
solid_properties_T_ref = '300'
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/tutorials/single_phase_flow/05_secondary_side.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
10 ${m_dot_sec_in}'
[]
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
use_scalar_variables = false
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = ${A_core}
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
use_scalar_variables = false
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
use_scalar_variables = false
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.75'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
use_scalar_variables = false
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
solid_properties = 'steel'
solid_properties_T_ref = '300'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 0.5'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
use_scalar_variables = false
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
use_scalar_variables = false
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0.0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[m_dot_sec_inlet_ctrl]
type = GetFunctionValueControl
function = m_dot_sec_fn
[]
[set_m_dot_sec_ctrl]
type = SetComponentRealValueControl
component = inlet_sec
parameter = m_dot
value = m_dot_sec_inlet_ctrl:value
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/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
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
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/heat_structure_cylindrical/steady.i)
# Tests that cylindrical heat structure geometry can be used with a steady executioner.
[Functions]
[power_profile_fn]
type = ParsedFunction
expression = '1.570796326794897 * sin(x / 3.6576 * pi)'
[]
[]
[SolidProperties]
[fuel_sp]
type = ThermalFunctionSolidProperties
rho = 1.0412e2
cp = 288.734
k = 3.65
[]
[gap_sp]
type = ThermalFunctionSolidProperties
rho = 1.0
cp = 1.0
k = 1.084498
[]
[clad_sp]
type = ThermalFunctionSolidProperties
rho = 6.6e1
cp = 321.384
k = 16.48672
[]
[]
[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'
solid_properties = 'fuel_sp gap_sp clad_sp'
solid_properties_T_ref = '300 300 300'
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 = Steady
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/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 2
rho = 3
[]
[]
[Components]
[fch1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 2
A = 1
closures = simple_closures
fp = fp
f = 0.01
initial_p = 1e5
initial_T = 300
initial_vel = 0
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 2
names = 'blk'
widths = '0.1'
n_part_elems = '1'
solid_properties = 'mat'
solid_properties_T_ref = '300'
initial_T = 300
[]
[hx]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = START
flow_channel = fch1
Hw = 0
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'fch1:in'
m_dot = 1
T = 300
[]
[outlet]
type = Outlet1Phase
input = 'fch1:out'
p = 1e5
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.1
num_steps = 1
[]
(modules/thermal_hydraulics/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
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[wall-mat]
type = ThermalFunctionSolidProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '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
solid_properties = 'wall-mat'
solid_properties_T_ref = '300'
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/hs_boundary_external_app_temperature/phy.child.i)
[SolidProperties]
[ss316]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'ss316'
solid_properties_T_ref = '300'
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/hs_coupler_2d2d_radiation/adjacent_cylinders.i)
# This input file is used to test that HSCoupler2D2DRadiation can perform
# radiative heat transfer between multiple heat structures (surfaces 1 and 2)
# and the environment (surface 3).
emissivity1 = 0.8
emissivity2 = 0.5
orientation = '0 0 1'
length = 0.5
n_axial_elems = 10
radius = 0.1
n_radial_elems = 10
initial_T1 = 1200
initial_T2 = 1000
T3 = 300
T_ref = 300
y_shift = 0.5
position1 = '0 0 0'
position2 = '0 ${y_shift} 0'
view_factor_12 = ${fparse (pi - 2) / (2*pi)}
view_factor_13 = ${fparse 1.0 - view_factor_12}
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
[hs1]
type = HeatStructureCylindrical
position = ${position1}
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'body'
widths = '${radius}'
n_part_elems = '${n_radial_elems}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T1}
[]
[hs2]
type = HeatStructureCylindrical
position = ${position2}
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'body'
widths = '${radius}'
n_part_elems = '${n_radial_elems}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T2}
[]
[hs_coupler]
type = HSCoupler2D2DRadiation
heat_structures = 'hs1 hs2'
boundaries = 'hs1:outer hs2:outer'
emissivities = '${emissivity1} ${emissivity2}'
include_environment = true
T_environment = ${T3}
view_factors = '
0 ${view_factor_12} ${view_factor_13};
${view_factor_12} 0 ${view_factor_13};
0 0 1'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 10
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
file_base = 'adjacent_cylinders'
exodus = true
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/shaft/test.i)
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'mat'
solid_properties_T_ref = '300'
[]
[]
[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/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'
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat'
solid_properties_T_ref = '300'
initial_T = 559.15
[]
[hgen]
type = HeatSourceFromPowerDensity
power_density = power_density
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = eos
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[jct1]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-5
use_scalar_variables = false
[]
[pipe2]
type = FlowChannel1Phase
fp = eos
# geometry
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[jct2]
type = VolumeJunction1Phase
connections = 'pipe2:out pipe3:in'
position = '2 0 0'
volume = 1e-5
use_scalar_variables = false
[]
[pipe3]
type = FlowChannel1Phase
fp = eos
# geometry
position = '2 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '1 0.01 0'
orientation = '1 0 0'
length = 1
n_elems = 5
names = '0'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
widths = 0.1
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
T = 507
vel = 1
[]
[outlet]
type = Outlet1Phase
input = 'pipe3:out'
p = 6e6
[]
[hx3ext]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe3
P_hf = 0.0449254
Hw = 100000
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
automatic_scaling = true
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/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}
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'region1-mat'
solid_properties_T_ref = '300'
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/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'
[]
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'mat'
solid_properties_T_ref = '300'
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/hs_boundary_specified_temperature/err.no_bnd.i)
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
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_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
[]
[]
[SolidProperties]
[main-material]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'main-material main-material main-material'
solid_properties_T_ref = '300 300 300'
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_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
rho = 1000
cp = 100
k = 30
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
widths = 0.1
inner_radius = 0.1
length = 1
n_elems = 6
n_part_elems = 1
initial_T = T_init
solid_properties = 'mat'
solid_properties_T_ref = '300'
names = blk
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:inner
Hw = 10000
P_hf = 0.156434465
[]
[]
[Postprocessors]
[energy_hs]
type = HeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = false
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 1
solve_type = PJFNK
line_search = basic
num_steps = 1000
steady_state_detection = true
steady_state_tolerance = 1e-08
nl_abs_tol = 1e-8
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.cylinder_power_shape_fn.i)
[GlobalParams]
scaling_factor_temperature = 1e0
[]
[Functions]
[psf]
type = ParsedFunction
expression = 1
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[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/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'
[]
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'mat'
solid_properties_T_ref = '300'
[]
[]
[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/problems/brayton_cycle/recuperated_brayton_cycle.i)
# This input file models an open, recuperated Brayton cycle with a PID
# controlled start up using a coupled motor.
#
# Heat is supplied to the system by a volumetric heat source, and a second heat
# source is used to model a recuperator. The recuperator transfers heat from the
# turbine exhaust gas to the compressor outlet gas.
#
# Initially the fluid and heat structures are at rest at ambient conditions,
# and the shaft speed is zero.
# The transient is controlled as follows:
# * 0 - 2000 s: Motor increases shaft speed to approx. 85,000 RPM by PID control
# * 1000 - 8600 s: Power in main heat source increases from 0 - 104 kW
# * 2000 - 200000 s: Torque supplied by turbine increases to steady state level
# as working fluid temperature increases. Torque supplied by
# the motor is ramped down to 0 N-m transitioning shaft control
# to the turbine at its rated speed of 96,000 RPM.
I_motor = 1.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 3605
motor_ramp_down_duration = 1800
post_motor_time = 2160000
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
D7 = ${D1}
D8 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
A7 = ${fparse 0.25 * pi * D7^2}
A8 = ${fparse 0.25 * pi * D8^2}
recuperator_width = 0.15
L1 = 5.0
L2 = ${L1}
L3 = ${fparse 2 * L1}
L4 = ${fparse 2 * L1}
L5 = ${L1}
L6 = ${L1}
L7 = ${fparse L1 + recuperator_width}
L8 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${x3}
x5 = ${fparse x4 - L4}
x6 = ${x5}
x7 = ${fparse x6 + L6}
x8 = ${fparse x7 + L7}
y1 = 0
y2 = ${y1}
y3 = ${y2}
y4 = ${fparse y3 - L3}
y5 = ${y4}
y6 = ${fparse y5 + L5}
y7 = ${y6}
y8 = ${y7}
x1_out = ${fparse x1 + L1 - 0.001}
x2_in = ${fparse x2 + 0.001}
y5_in = ${fparse y5 + 0.001}
x6_out = ${fparse x6 + L6 - 0.001}
x7_in = ${fparse x7 + 0.001}
y8_in = ${fparse y8 + 0.001}
y8_out = ${fparse y8 + L8 - 0.001}
hot_leg_in = ${y8_in}
hot_leg_out = ${y8_out}
cold_leg_in = ${fparse y3 - 0.001}
cold_leg_out = ${fparse y3 - (L3/2) - 0.001}
n_elems1 = 5
n_elems2 = ${n_elems1}
n_elems3 = ${fparse 2 * n_elems1}
n_elems4 = ${fparse 2 * n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
n_elems7 = ${n_elems1}
n_elems8 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_ambient = 300
p_ambient = 1e5
hs_power = 105750
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-5
scaling_factor_temperature = 1e-2
rdg_slope_reconstruction = none
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
##########################
# Motor
##########################
# Functions for control logic that determines when to shut off the PID system
[is_tripped_fn]
type = ParsedFunction
symbol_names = 'motor_torque turbine_torque'
symbol_values = 'motor_torque turbine_torque'
expression = 'turbine_torque > motor_torque'
[]
[PID_tripped_constant_value]
type = ConstantFunction
value = 1
[]
[PID_tripped_status_fn]
type = ParsedFunction
symbol_values = 'PID_trip_status'
symbol_names = 'PID_trip_status'
expression = 'PID_trip_status'
[]
[time_fn]
type = ParsedFunction
expression = t
[]
# Shutdown function which ramps down the motor once told by the control logic
[motor_torque_fn_shutdown]
type = ParsedFunction
symbol_values = 'PID_trip_status time_trip'
symbol_names = 'PID_trip_status time_trip'
expression = 'if(PID_trip_status = 1, max(2.4 - (2.4 * ((t - time_trip) / 35000)),0.0), 1)'
[]
# Generates motor power curve
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
##########################
# Generator
##########################
# Generates generator torque curve
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
# Generates generator power curve
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
##########################
# Reactor
##########################
# Ramps up reactor power when activated by control logic
[power_fn]
type = PiecewiseLinear
x = '0 1000 8600'
y = '0 0 ${hs_power}'
[]
##########################
# Compressor
##########################
# compressor pressure ratios
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiencies
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
##########################
# Turbine
##########################
# turbine pressure ratios
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
[Components]
# system inlet pulling air from the open atmosphere
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = ${p_ambient}
T0 = ${T_ambient}
[]
# Inlet pipe
[pipe1]
type = FlowChannel1Phase
position = '${x1} ${y1} 0'
orientation = '1 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
# Compressor as defined in MAGNET PCU document (Guillen 2020)
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} ${y2} 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
# Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
use_scalar_variables = false
[]
# Outlet pipe from the compressor
[pipe2]
type = FlowChannel1Phase
position = '${x2} ${y2} 0'
orientation = '1 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
# 90 degree connection between pipe 2 and 3
[junction2_cold_leg]
type = VolumeJunction1Phase
connections = 'pipe2:out cold_leg:in'
position = '${x3} ${y3} 0'
volume = ${fparse A2*0.1}
use_scalar_variables = false
[]
# Cold leg of the recuperator
[cold_leg]
type = FlowChannel1Phase
position = '${x3} ${y3} 0'
orientation = '0 -1 0'
length = ${fparse L3/2}
n_elems = ${fparse n_elems3/2}
A = ${A3}
[]
# Recuperator which transfers heat from exhaust gas to reactor inlet gas to improve thermal efficency
[recuperator]
type = HeatStructureCylindrical
orientation = '0 -1 0'
position = '${x3} ${y3} 0'
length = ${fparse L3/2}
widths = ${recuperator_width}
n_elems = ${fparse n_elems3/2}
n_part_elems = 2
names = recuperator
solid_properties = steel
solid_properties_T_ref = '300'
inner_radius = ${D1}
[]
# heat transfer from recuperator to cold leg
[heat_transfer_cold_leg]
type = HeatTransferFromHeatStructure1Phase
flow_channel = cold_leg
hs = recuperator
hs_side = OUTER
Hw = 10000
[]
# heat transfer from hot leg to recuperator
[heat_transfer_hot_leg]
type = HeatTransferFromHeatStructure1Phase
flow_channel = hot_leg
hs = recuperator
hs_side = INNER
Hw = 10000
[]
[junction_cold_leg_3]
type = JunctionOneToOne1Phase
connections = 'cold_leg:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} ${fparse y3 - (L3/2)} 0'
orientation = '0 -1 0'
length = ${fparse L3/2}
n_elems = ${fparse n_elems3/2}
A = ${A3}
[]
# 90 degree connection between pipe 3 and 4
[junction3_4]
type = VolumeJunction1Phase
connections = 'pipe3:out pipe4:in'
position = '${x4} ${y4} 0'
volume = ${fparse A3*0.1}
use_scalar_variables = false
[]
# Pipe through the "reactor core"
[pipe4]
type = FlowChannel1Phase
position = '${x4} ${y4} 0'
orientation = '-1 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
# "Reactor Core" and it's associated heat transfer to pipe 4
[reactor]
type = HeatStructureCylindrical
orientation = '-1 0 0'
position = '${x4} ${y4} 0'
length = ${L4}
widths = 0.15
n_elems = ${n_elems4}
n_part_elems = 2
names = core
solid_properties = steel
solid_properties_T_ref = '300'
[]
[total_power]
type = TotalPower
power = 0
[]
[heat_generation]
type = HeatSourceFromTotalPower
power = total_power
hs = reactor
regions = core
[]
[heat_transfer]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe4
hs = reactor
hs_side = OUTER
Hw = 10000
[]
# 90 degree connection between pipe 4 and 5
[junction4_5]
type = VolumeJunction1Phase
connections = 'pipe4:out pipe5:in'
position = '${x5} ${y5} 0'
volume = ${fparse A4*0.1}
use_scalar_variables = false
[]
# Pipe carrying hot gas back to the PCU
[pipe5]
type = FlowChannel1Phase
position = '${x5} ${y5} 0'
orientation = '0 1 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
# 90 degree connection between pipe 5 and 6
[junction5_6]
type = VolumeJunction1Phase
connections = 'pipe5:out pipe6:in'
position = '${x6} ${y6} 0'
volume = ${fparse A5*0.1}
use_scalar_variables = false
[]
# Inlet pipe to the turbine
[pipe6]
type = FlowChannel1Phase
position = '${x6} ${y6} 0'
orientation = '1 0 0'
length = ${L6}
n_elems = ${n_elems6}
A = ${A6}
[]
# Turbine as defined in MAGNET PCU document (Guillen 2020) and (Wright 2006)
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x7} ${y7} 0'
inlet = 'pipe6:out'
outlet = 'pipe7:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
# A turbine is treated as an "inverse" compressor, this value determines if component is to be treated as turbine or compressor
# If treat_as_turbine is omitted, code automatically assumes it is a compressor
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
# Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
use_scalar_variables = false
[]
# Outlet pipe from turbine
[pipe7]
type = FlowChannel1Phase
position = '${x7} ${y7} 0'
orientation = '1 0 0'
length = ${L7}
n_elems = ${n_elems7}
A = ${A7}
[]
# 90 degree connection between pipe 7 and 8
[junction7_hot_leg]
type = VolumeJunction1Phase
connections = 'pipe7:out hot_leg:in'
position = '${x8} ${y8} 0'
volume = ${fparse A7*0.1}
use_scalar_variables = false
[]
# Hot leg of the recuperator
[hot_leg]
type = FlowChannel1Phase
position = '${x8} ${y8} 0'
orientation = '0 1 0'
length = ${L8}
n_elems = ${n_elems8}
A = ${A8}
[]
# System outlet dumping exhaust gas to the atmosphere
[outlet]
type = Outlet1Phase
input = 'hot_leg:out'
p = ${p_ambient}
[]
# Roatating shaft connecting motor, compressor, turbine, and generator
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
# 3-Phase electircal motor used for system start-up, controlled by PID
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
# Electric generator supplying power to the grid
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[]
# Control logics which govern startup of the motor, startup of the "reactor core", and shutdown of the motor
[ControlLogic]
# Sets desired shaft speed to be reached by motor NOTE: SHOULD BE SET LOWER THAN RATED TURBINE RPM
[set_point]
type = GetFunctionValueControl
function = ${fparse speed_rated_rpm - 9000}
[]
# PID with gains determined by iterative process NOTE: Gain values are system specific
[initial_motor_PID]
type = PIDControl
set_point = set_point:value
input = shaft_RPM
initial_value = 0
K_p = 0.0011
K_i = 0.00000004
K_d = 0
[]
# Determines when the PID system should be running and when it should begin the shutdown cycle. If needed: PID output, else: shutdown function
[logic]
type = ParsedFunctionControl
function = 'if(motor+0.5 > turb, PID, shutdown_fn)'
symbol_names = 'motor turb PID shutdown_fn'
symbol_values = 'motor_torque turbine_torque initial_motor_PID:output motor_torque_fn_shutdown'
[]
# Takes the output generated in [logic] and applies it to the motor torque
[motor_PID]
type = SetComponentRealValueControl
component = motor
parameter = torque
value = logic:value
[]
# Determines when to turn on heat source
[power_logic]
type = ParsedFunctionControl
function = 'power_fn'
symbol_names = 'power_fn'
symbol_values = 'power_fn'
[]
# Applies heat source to the total_power block
[power_applied]
type = SetComponentRealValueControl
component = total_power
parameter = power
value = power_logic:value
[]
[]
[Controls]
# Enables set_PID_tripped
[PID_trip_status]
type = ConditionalFunctionEnableControl
conditional_function = is_tripped_fn
enable_objects = 'AuxScalarKernels::PID_trip_status_aux'
execute_on = 'TIMESTEP_END'
[]
# Enables set_time_PID
[time_PID]
type = ConditionalFunctionEnableControl
conditional_function = PID_tripped_status_fn
disable_objects = 'AuxScalarKernels::time_trip_aux'
execute_on = 'TIMESTEP_END'
[]
[]
[AuxVariables]
# Creates a variable that will later be set to the time when tau_turbine > tau_motor
[time_trip]
order = FIRST
family = SCALAR
[]
# Creates variable which indicates if tau_turbine > tau_motor....... If tau_motor > tau_turbine, 0, else 1
[PID_trip_status]
order = FIRST
family = SCALAR
initial_condition = 0
[]
[]
[AuxScalarKernels]
# Creates variable from time_fn which indicates when tau_turbine > tau_motor
[time_trip_aux]
type = FunctionScalarAux
function = time_fn
variable = time_trip
execute_on = 'TIMESTEP_END'
[]
# Overwrites variable PID_trip_status to the value from PID_tripped_constant_value (changes 0 to 1)
[PID_trip_status_aux]
type = FunctionScalarAux
function = PID_tripped_constant_value
variable = PID_trip_status
execute_on = 'TIMESTEP_END'
enable = false
[]
[]
[Postprocessors]
# Indicates when tau_turbine > tau_motor
[trip_time]
type = ScalarVariable
variable = time_trip
execute_on = 'TIMESTEP_END'
[]
##########################
# Motor
##########################
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# generator
##########################
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Shaft
##########################
# Speed in rad/s
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
# speed in RPM
[shaft_RPM]
type = ParsedPostprocessor
pp_names = 'shaft_speed'
expression = '(shaft_speed * 60) /( 2 * ${fparse pi})'
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Compressor
##########################
[comp_dissipation_torque]
type = ElementAverageValue
variable = dissipation_torque
block = 'compressor'
execute_on = 'INITIAL TIMESTEP_END'
[]
[comp_isentropic_torque]
type = ElementAverageValue
variable = isentropic_torque
block = 'compressor'
execute_on = 'INITIAL TIMESTEP_END'
[]
[comp_friction_torque]
type = ElementAverageValue
variable = friction_torque
block = 'compressor'
execute_on = 'INITIAL TIMESTEP_END'
[]
[compressor_torque]
type = ParsedPostprocessor
pp_names = 'comp_dissipation_torque comp_isentropic_torque comp_friction_torque'
expression = 'comp_dissipation_torque + comp_isentropic_torque + comp_friction_torque'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x1_out} ${y1} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_in} ${y2} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
expression = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_in_comp]
type = PointValue
variable = T
point = '${x1_out} ${y1} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_out_comp]
type = PointValue
variable = T
point = '${x2_in} ${y2} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_ratio_comp]
type = ParsedPostprocessor
pp_names = 'T_in_comp T_out_comp'
expression = '(T_out_comp - T_in_comp) / T_out_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
##########################
# turbine
##########################
[turb_dissipation_torque]
type = ElementAverageValue
variable = dissipation_torque
block = 'turbine'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turb_isentropic_torque]
type = ElementAverageValue
variable = isentropic_torque
block = 'turbine'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turb_friction_torque]
type = ElementAverageValue
variable = friction_torque
block = 'turbine'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turbine_torque]
type = ParsedPostprocessor
pp_names = 'turb_dissipation_torque turb_isentropic_torque turb_friction_torque'
expression = 'turb_dissipation_torque + turb_isentropic_torque + turb_friction_torque'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x6_out} ${y6} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x7_in} ${y7} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
expression = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_in_turb]
type = PointValue
variable = T
point = '${x6_out} ${y6} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_out_turb]
type = PointValue
variable = T
point = '${x7_in} ${y7} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe6:out
connection_index = 0
equation = mass
junction = turbine
[]
##########################
# Recuperator
##########################
[cold_leg_in]
type = PointValue
variable = T
point = '${x3} ${cold_leg_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[cold_leg_out]
type = PointValue
variable = T
point = '${x3} ${cold_leg_out} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hot_leg_in]
type = PointValue
variable = T
point = '${x8} ${hot_leg_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hot_leg_out]
type = PointValue
variable = T
point = '${x8} ${hot_leg_out} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Reactor
##########################
[reactor_inlet]
type = PointValue
variable = T
point = '${x4} ${y4} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[reactor_outlet]
type = PointValue
variable = T
point = '${x5} ${y5_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.1
cutback_factor = 0.9
[]
dtmin = 1e-5
dtmax = 1000
steady_state_detection = true
steady_state_start_time = 200000
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[e]
type = Exodus
file_base = 'recuperated_brayton_cycle_out'
[]
[csv]
type = CSV
file_base = 'recuperated_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb pressure_ratio pressure_ratio'
[]
[]
(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'
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '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
solid_properties = 'mat1'
solid_properties_T_ref = '300'
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_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
power = ${fparse scale * heat_flux * A}
E_change = ${fparse power * t}
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
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 = ${scale}
[]
[]
[Postprocessors]
[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'
[]
[heat_rate_pp_relerr]
type = RelativeDifferencePostprocessor
value1 = hs_boundary_integral
value2 = ${power}
execute_on = 'INITIAL'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr heat_rate_pp_relerr'
execute_on = '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
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat'
solid_properties_T_ref = '300'
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/components/heat_source_from_power_density/phy.cylinder_power_shape_aux_var.i)
[GlobalParams]
scaling_factor_temperature = 1e1
[]
[Functions]
[HeatFunction]
type = ParsedFunction
expression = 1313127093.32191
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[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/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
# Tests physics and energy conservation for HSCoupler2D3D.
R_pipe = 0.005
length_matrix = 0.5
length_extend = 0.6
n_elems_radial = 3
n_elems_axial_matrix = 10
n_elems_axial_extend = 12
[Materials]
[matrix_mat]
type = ADGenericConstantMaterial
block = 'hs3d:0 hs2d:pipe'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '8000 500 15'
[]
[]
[Functions]
[initial_T_matrix_fn]
type = ParsedFunction
expression = '300 + 100*z - 1000*x'
[]
[]
[Components]
[hs3d]
type = HeatStructureFromFile3D
file = mesh/mesh.e
position = '0 0 0'
initial_T = initial_T_matrix_fn
[]
[hs2d]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = '${length_matrix} ${length_extend}'
n_elems = '${n_elems_axial_matrix} ${n_elems_axial_extend}'
axial_region_names = 'matrix extend'
inner_radius = 0
widths = '${R_pipe}'
n_part_elems = '${n_elems_radial}'
names = 'pipe'
initial_T = 300
[]
[hs_coupler]
type = HSCoupler2D3D
heat_structure_2d = hs2d
heat_structure_3d = hs3d
boundary_2d = hs2d:matrix:outer
boundary_3d = hs3d:rmin
include_radiation = false
gap_thickness = 0.00001
gap_thermal_conductivity = 0.05
[]
[]
[Postprocessors]
[energy_hs3d]
type = ADHeatStructureEnergy3D
block = 'hs3d:0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_hs2d]
type = ADHeatStructureEnergyRZ
block = 'hs2d:pipe'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_hs3d energy_hs2d'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = NEWTON
abort_on_solve_fail = true
nl_abs_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(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))}
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'region1-mat'
solid_properties_T_ref = '300'
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/components/heat_source_from_total_power/err.base.i)
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat'
solid_properties_T_ref = '300'
initial_T = 559.15
[]
[hgen]
type = HeatSourceFromTotalPower
power_fraction = 1
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/steady_state.i)
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '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
solid_properties = 'mat1'
solid_properties_T_ref = '300'
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/heat_structure_base/err.no_T_ic.i)
# Tests that error is generated when no initial temperature function is provided
# when not restarting.
[GlobalParams]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[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/postprocessors/heat_rate_conduction_rz/heat_rate_conduction_rz.i)
# Tests the HeatRateConductionRZ post-processor.
R_i = 0.1
thickness = 0.2
L = 3.0
R_o = ${fparse R_i + thickness}
S = ${fparse 2 * pi * R_o * L}
k = 20.0
T_i = 300.0
T_o = 500.0
dT_dr = ${fparse (T_o - T_i) / thickness}
Q_exact = ${fparse k * dT_dr * S}
[Materials]
[hs_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 ${k}'
[]
[]
[Functions]
[T_fn]
type = ParsedFunction
expression = '${T_i} + (y - ${R_i}) * ${dT_dr}'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
widths = '${thickness}'
n_part_elems = '5'
initial_T = T_fn
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateConductionRZ
boundary = heat_structure:outer
axis_point = '0 0 0'
axis_dir = '1 0 0'
temperature = T_solid
thermal_conductivity = thermal_conductivity
inward = true
execute_on = 'INITIAL'
[]
[Q_err]
type = RelativeDifferencePostprocessor
value1 = Q_pp
value2 = ${Q_exact}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
file_base = 'heat_rate_conduction_rz'
[csv]
type = CSV
show = 'Q_err'
execute_on = 'INITIAL'
[]
[]
(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
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[wall-mat]
type = ThermalFunctionSolidProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '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
solid_properties = 'wall-mat'
solid_properties_T_ref = '300'
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-5
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/total_power/phy.constant_power.i)
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'mat'
solid_properties_T_ref = '300'
[]
[]
[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/test/tests/components/heat_structure_cylindrical/part_base.i)
[Functions]
[power_profile_fn]
type = ParsedFunction
expression = '1.570796326794897 * sin(x / 3.6576 * pi)'
[]
[]
[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]
file_base = transient
exodus = true
[console]
type = Console
execute_scalars_on = none
[]
[]
(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}
[]
[]
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'region1-mat'
solid_properties_T_ref = '300'
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/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
power = ${fparse scale * heat_flux_integral}
E_change = ${fparse power * 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}'
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
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 = ${scale}
[]
[]
[Postprocessors]
[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'
[]
[heat_rate_pp_relerr]
type = RelativeDifferencePostprocessor
value1 = ambient_convection_integral
value2 = ${power}
execute_on = 'INITIAL'
[]
[]
[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 heat_rate_pp_relerr'
execute_on = 'FINAL'
[]
[]
(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
power = ${fparse scale * heat_flux * A}
E_change = ${fparse power * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
names = 'region'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:outer'
hs = hs
q = q_fn
scale = ${scale}
[]
[]
[Postprocessors]
[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'
[]
[heat_rate_pp_relerr]
type = RelativeDifferencePostprocessor
value1 = heat_flux_boundary_integral
value2 = ${power}
execute_on = 'INITIAL'
[]
[]
[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 heat_rate_pp_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_heat_flux_rz/heat_rate_heat_flux_rz.i)
# Tests the HeatRateHeatFluxRZ 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}
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'region1-mat'
solid_properties_T_ref = '300'
widths = '${thickness}'
n_part_elems = '5'
initial_T = 300
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateHeatFluxRZ
boundary = heat_structure:outer
axis_point = '1 2 3'
axis_dir = '1 1 1'
q = ${q}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(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
expression = 'baseT + (dT * sin((pi * x) / length))'
symbol_names = 'baseT dT length'
symbol_values = '560.0 30.0 3.6576'
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 0.1
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
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_structure_2d_coupler/heat_structure_2d_coupler.i)
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
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'
solid_properties = 'hs_mat hs_mat'
solid_properties_T_ref = '300 300'
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'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
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/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i)
# This test has 2 pipes, each surrounded by a cylindrical HS:
#
# - pipe1: no fin heat transfer enhancement
# - pipe2: fin heat transfer enhancement
diam = 0.01
area = ${fparse 0.25 * pi * diam^2}
length = 1.0
n_elems = 10
t_hs = 0.02
n_elems_radial = 5
rho_inlet = 1359.792245 # @ T = 300 K, p = 1e5 Pa
vel_inlet = 1.0
T_inlet = 300
p_outlet = 1e5
T_initial_hs = 800
mfr_inlet = ${fparse rho_inlet * vel_inlet * area}
htc = 100
# Suppose that there are 20 rectangular, 1-mm-thick fins of height 1 mm over the length
# of the cooled section.
n_fin = 20
h_fin = 0.001
t_fin = 0.001
A_fin_single = ${fparse (2 * h_fin + t_fin ) * length}
A_fin = ${fparse n_fin * A_fin_single}
A_cooled = ${fparse pi * diam * length}
A_total = ${fparse A_fin + A_cooled - n_fin * t_fin * length}
fin_area_fraction = ${fparse A_fin / A_total}
area_increase_factor = ${fparse A_total / A_cooled}
fin_perimeter_area_ratio = ${fparse (2 * length + 2 * t_fin) / (length * t_fin)}
k_fin = 15.0
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[sp_ss316]
type = ThermalSS316Properties
[]
[]
[FunctorMaterials]
[fin_efficiency_fmat]
type = FinEfficiencyFunctorMaterial
fin_height = ${h_fin}
fin_perimeter_area_ratio = ${fparse fin_perimeter_area_ratio}
heat_transfer_coefficient = ${htc}
thermal_conductivity = ${k_fin}
fin_efficiency_name = fin_efficiency
[]
[fin_enhancement_fmat]
type = FinEnhancementFactorFunctorMaterial
fin_efficiency = fin_efficiency
fin_area_fraction = ${fin_area_fraction}
area_increase_factor = ${area_increase_factor}
fin_enhancement_factor_name = fin_enhancement
[]
[]
[Components]
# pipe1
[pipe1_inlet]
type = InletMassFlowRateTemperature1Phase
m_dot = ${mfr_inlet}
T = ${T_inlet}
input = 'pipe1:in'
[]
[pipe1]
type = FlowChannel1Phase
gravity_vector = '0 0 0'
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
A = ${area}
initial_T = ${T_inlet}
initial_p = ${p_outlet}
initial_vel = ${vel_inlet}
fp = fp
closures = simple_closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
[]
[pipe1_outlet]
type = Outlet1Phase
p = ${p_outlet}
input = 'pipe1:out'
[]
[ht1]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe1
hs = hs1
hs_side = inner
Hw = ${htc}
[]
[hs1]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
inner_radius = ${fparse 0.5 * diam}
names = 'main'
solid_properties = 'sp_ss316'
solid_properties_T_ref = '300'
widths = '${t_hs}'
n_part_elems = '${n_elems_radial}'
initial_T = ${T_initial_hs}
scaling_factor_temperature = 1e-5
[]
# pipe 2
[pipe2_inlet]
type = InletMassFlowRateTemperature1Phase
m_dot = ${mfr_inlet}
T = ${T_inlet}
input = 'pipe2:in'
[]
[pipe2]
type = FlowChannel1Phase
gravity_vector = '0 0 0'
position = '0 0.5 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
A = ${area}
initial_T = ${T_inlet}
initial_p = ${p_outlet}
initial_vel = ${vel_inlet}
fp = fp
closures = simple_closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
[]
[pipe2_outlet]
type = Outlet1Phase
p = ${p_outlet}
input = 'pipe2:out'
[]
[ht2]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe2
hs = hs2
hs_side = inner
Hw = ${htc}
scale = fin_enhancement
[]
[hs2]
type = HeatStructureCylindrical
position = '0 0.5 0'
orientation = '0 0 1'
length = ${length}
n_elems = ${n_elems}
inner_radius = ${fparse 0.5 * diam}
names = 'main'
solid_properties = 'sp_ss316'
solid_properties_T_ref = '300'
widths = '${t_hs}'
n_part_elems = '${n_elems_radial}'
initial_T = ${T_initial_hs}
scaling_factor_temperature = 1e-5
[]
[]
[Postprocessors]
[pipe1_T_avg]
type = ElementAverageValue
variable = T
block = 'pipe1'
execute_on = 'INITIAL TIMESTEP_END'
[]
[pipe2_T_avg]
type = ElementAverageValue
variable = T
block = 'pipe2'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hs1_T_avg]
type = SideAverageValue
variable = T_solid
boundary = 'hs1:inner'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hs2_T_avg]
type = SideAverageValue
variable = T_solid
boundary = 'hs2:inner'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = 10.0
dt = 1.0
solve_type = NEWTON
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/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
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[wall-mat]
type = ThermalFunctionSolidProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '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
solid_properties = 'wall-mat'
solid_properties_T_ref = '300'
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
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
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/utils/logger/test.i)
[SolidProperties]
[a]
type = ThermalFunctionSolidProperties
rho = 1
cp = 1
k = 1
[]
[]
[Components]
[componentA]
type = LoggerTestComponent
log_warnings = true
log_errors = true
[]
[componentB]
type = LoggerTestComponent
log_warnings = true
log_errors = true
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
names = '0'
widths = '0.1'
solid_properties = 'a'
solid_properties_T_ref = '300'
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/hs_boundary_external_app_heat_flux/sub.i)
# Sub input file.
L = 5.0
radius = 0.01
n_elems_axial = 10
n_elems_radial = 5
T_initial = 300.0
power = 1000.0
t = 10.0
E_change = ${fparse power * t}
rho = 8000.0
cp = 500.0
k = 15.0
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
rho = ${rho}
cp = ${cp}
k = ${k}
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${L}
n_elems = ${n_elems_axial}
names = 'body'
widths = '${radius}'
n_part_elems = '${n_elems_radial}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = ${T_initial}
[]
[hs_boundary]
type = HSBoundaryExternalAppHeatFlux
hs = hs
boundary = 'hs:outer'
heat_flux_name = q_ext
heat_flux_is_inward = true
perimeter_ext = P_ext
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergyRZ
block = 'hs:body'
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'
[]
[integral_relerr]
type = RelativeDifferencePostprocessor
value1 = hs_boundary_integral
value2 = ${power}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
csv = true
show = 'E_change_relerr integral_relerr'
execute_on = 'FINAL'
[]
(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'
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[m]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'm m'
solid_properties_T_ref = '300 300'
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'
solid_properties = 'm m'
solid_properties_T_ref = '300 300'
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]
[map]
type = ParaviewComponentAnnotationMap
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'up_pipe_1:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
use_scalar_variables = false
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
use_scalar_variables = false
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe:in'
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = JunctionOneToOne1Phase
connections = 'top_pipe:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'down_pipe_1:out cooling_pipe:in'
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = 1.5
n_elems = 25
A = ${A_pipe}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
P_hf = '${fparse pi * pipe_dia}'
[]
[jct6]
type = JunctionOneToOne1Phase
connections = 'cooling_pipe:out down_pipe_2:in'
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[outlet]
type = Outlet1Phase
input = 'down_pipe_2:out'
p = ${press}
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/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
expression = 'x * y'
[]
[]
[SolidProperties]
[hsmat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hsmat hsmat'
solid_properties_T_ref = '300 300'
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/tutorials/single_phase_flow/04_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = simple_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
use_scalar_variables = false
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
use_scalar_variables = false
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
use_scalar_variables = false
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 0 1'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionOneToOne1Phase
connections = 'down_pipe_1:out cooling_pipe:in'
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = 1.5
n_elems = 25
A = ${A_pipe}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
P_hf = '${fparse pi * pipe_dia}'
[]
[jct7]
type = JunctionOneToOne1Phase
connections = 'cooling_pipe:out down_pipe_2:in'
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
use_scalar_variables = false
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct10]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[]
[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 = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
expression = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[pump_head]
type = RealComponentParameterValuePostprocessor
component = pump
parameter = head
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/cylindrical_with_fins.i)
T_initial = 500
T_ref = ${T_initial}
T_ambient = 300
htc_ambient = 100
L_uncooled = 1.0
L_cooled = 1.0
diameter = 0.01
# Suppose that there are 10 rectangular, 1-mm-thick fins of height 1 cm over the length
# of the cooled section.
n_fin = 10
h_fin = 0.01
t_fin = 0.001
A_fin_single = ${fparse (2 * h_fin + t_fin ) * L_cooled}
A_fin = ${fparse n_fin * A_fin_single}
A_cooled = ${fparse pi * diameter * L_cooled}
A_total = ${fparse A_fin + A_cooled - n_fin * t_fin * L_cooled}
fin_area_fraction = ${fparse A_fin / A_total}
area_increase_factor = ${fparse A_total / A_cooled}
fin_perimeter_area_ratio = ${fparse (2 * L_cooled + 2 * t_fin) / (L_cooled * t_fin)}
k_fin = 15.0
n_elems_uncooled = 10
n_elems_cooled = 10
n_elems_radial = 5
[SolidProperties]
[sp_ss316]
type = ThermalSS316Properties
[]
[]
[FunctorMaterials]
[fin_efficiency_fmat]
type = FinEfficiencyFunctorMaterial
fin_height = ${h_fin}
fin_perimeter_area_ratio = ${fparse fin_perimeter_area_ratio}
heat_transfer_coefficient = ${htc_ambient}
thermal_conductivity = ${k_fin}
fin_efficiency_name = fin_efficiency
[]
[fin_enhancement_fmat]
type = FinEnhancementFactorFunctorMaterial
fin_efficiency = fin_efficiency
fin_area_fraction = ${fin_area_fraction}
area_increase_factor = ${area_increase_factor}
fin_enhancement_factor_name = fin_enhancement
[]
[]
[Components]
[pipe_with_fins]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = '${L_uncooled} ${L_cooled}'
n_elems = '${n_elems_uncooled} ${n_elems_cooled}'
axial_region_names = 'uncooled cooled'
names = 'body'
widths = '${diameter}'
n_part_elems = '${n_elems_radial}'
solid_properties = 'sp_ss316'
solid_properties_T_ref = '${T_ref}'
initial_T = ${T_initial}
[]
[pipe_without_fins]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0.02 0'
length = '${L_uncooled} ${L_cooled}'
n_elems = '${n_elems_uncooled} ${n_elems_cooled}'
axial_region_names = 'uncooled cooled'
names = 'body'
widths = '${diameter}'
n_part_elems = '${n_elems_radial}'
solid_properties = 'sp_ss316'
solid_properties_T_ref = '${T_ref}'
initial_T = ${T_initial}
[]
[pipe_with_fins_convection]
type = HSBoundaryAmbientConvection
boundary = 'pipe_with_fins:cooled:outer'
hs = pipe_with_fins
T_ambient = ${T_ambient}
htc_ambient = ${htc_ambient}
scale = fin_enhancement
[]
[pipe_without_fins_convection]
type = HSBoundaryAmbientConvection
boundary = 'pipe_without_fins:cooled:outer'
hs = pipe_without_fins
T_ambient = ${T_ambient}
htc_ambient = ${htc_ambient}
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10
num_steps = 5
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/element_integral_material_property_rz/element_integral_material_property_rz.i)
# Tests the ADElementIntegralMaterialPropertyRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
V = ${fparse pi * (R_o^2 - R_i^2) * L}
rho_value = 5.0
mass = ${fparse rho_value * V}
[Materials]
[hs_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${rho_value} 1.0 1.0'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
widths = '${thickness}'
n_part_elems = '5'
initial_T = 300
[]
[]
[Postprocessors]
[mass]
type = ADElementIntegralMaterialPropertyRZ
axis_point = '1 2 3'
axis_dir = '1 1 1'
mat_prop = density
execute_on = 'INITIAL'
[]
[mass_error]
type = RelativeDifferencePostprocessor
value1 = mass
value2 = ${mass}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'element_integral_material_property_rz'
[csv]
type = CSV
show = 'mass_error'
execute_on = 'INITIAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
inner_radius = 0.01
widths = 0.1
initial_T = Ts_init
[]
[ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = hs
hs_side = INNER
Hw = 10000
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/surrogate_power_profile.i)
# This takes an exodus file with a power profile and uses that in a heat structure
# of a core channel as power density. This tests the capability of taking a
# rattlesnake generated power profile and using it in RELAP-7.
[GlobalParams]
initial_p = 15.5e6
initial_vel = 0.
initial_T = 559.15
gravity_vector = '0 -9.8 0'
scaling_factor_1phase = '1 1 1e-4'
scaling_factor_temperature = 1e-2
closures = simple_closures
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 2.5
cp = 300.
rho = 1.032e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 0.6
cp = 1.
rho = 1.
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 21.5
cp = 350.
rho = 6.55e3
[]
[]
[Components]
[CCH1:pipe]
type = FlowChannel1Phase
position = '0.02 0 0'
orientation = '0 1 0'
length = 3.865
n_elems = 20
A = 8.78882e-5
D_h = 0.01179
f = 0.01
fp = water
[]
[CCH1:solid]
type = HeatStructureCylindrical
position = '0.024748 0 0'
orientation = '0 1 0'
length = 3.865
n_elems = 20
initial_T = 559.15
names = 'fuel gap clad'
widths = '0.004096 0.0001 0.000552'
n_part_elems = '5 1 2'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[CCH1:hx]
type = HeatTransferFromHeatStructure1Phase
flow_channel = CCH1:pipe
hs = CCH1:solid
hs_side = outer
Hw = 5.33e4
P_hf = 2.9832563838489e-2
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'CCH1:pipe:in'
m_dot = 0.1
T = 559.15
[]
[outlet]
type = Outlet1Phase
input = 'CCH1:pipe:out'
p = 15.5e6
[]
[]
[UserObjects]
[reactor_power_density_uo]
type = SolutionUserObject
mesh = 'power_profile.e'
system_variables = power_density
translation = '0. 0. 0.'
[]
[]
[Functions]
[power_density_fn]
type = SolutionFunction
from_variable = power_density
solution = reactor_power_density_uo
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'CCH1:solid:fuel'
[]
[]
[AuxKernels]
[power_density_aux]
type = FunctionAux
variable = power_density
function = power_density_fn
block = 'CCH1:solid:fuel'
execute_on = 'timestep_begin'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
num_steps = 10
dt = 1e-2
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
[out]
type = Exodus
[]
velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_2d_coupler/separated.i)
# Tests HeatStructure2DCoupler when the heat structures are separated by some
# distance. The first heat structure has a larger coupling surface than the
# second heat structure. The component will be used to model a given energy
# transfer rate per unit temperature difference [W/K]. This test checks that:
# a) heat transfer occurs in the correct direction
# b) energy is conserved
#
# With a goal of transferring 5 W/K and a temperature difference of 200 K, and
# a transient time of 10 seconds, ~10 kJ should be transferred. Note that this
# estimate will not be exact since the temperature difference changes slightly
# over the transient.
initial_T1 = 500
initial_T2 = 300
R1 = 0.1
R2 = 0.05
P2 = ${fparse 2 * pi * R2}
power_per_K = 5.0
L_hs = 0.5
htc = ${fparse power_per_K / (L_hs * P2)}
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
[hs1]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = '${L_hs}'
n_elems = '5'
names = 'region1'
widths = '${R1}'
n_part_elems = '5'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = ${initial_T1}
[]
[hs2]
type = HeatStructureCylindrical
position = '0 0.3 0'
orientation = '1 0 0'
length = '${L_hs}'
n_elems = '5'
names = 'region1'
widths = '${R2}'
n_part_elems = '5'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = ${initial_T2}
[]
[hs_coupling]
type = HeatStructure2DCoupler
primary_heat_structure = hs1
secondary_heat_structure = hs2
primary_boundary = hs1:outer
secondary_boundary = hs2:outer
heat_transfer_coefficient = ${htc}
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[E_hs1]
type = ADHeatStructureEnergyRZ
block = 'hs1:region1'
axis_dir = '1 0 0'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs1_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs1
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs2]
type = ADHeatStructureEnergyRZ
block = 'hs2:region1'
axis_dir = '1 0 0'
axis_point = '0 0.3 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs2_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs2
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_tot]
type = SumPostprocessor
values = 'E_hs1 E_hs2'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1.0
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
csv = true
show = 'E_hs1_change E_hs2_change E_tot_change'
[]
(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
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 1.084498
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
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
[]
(modules/thermal_hydraulics/test/tests/components/hs_coupler_2d2d_radiation/concentric_cylinders.i)
# This input file is used to test that HSCoupler2D2DRadiation produces
# the exact same heat fluxes as HeatStructure2DRadiationCouplerRZ for the case
# of two concentric cylindrical heat structures forming an enclosure.
#
# We solve two independent problems, one using HSCoupler2D2DRadiation, and
# the other using HeatStructure2DRadiationCouplerRZ.
emissivity1 = 0.75
emissivity2 = 0.5
orientation = '0 0 1'
length = 0.5
n_axial_elems = 10
outer_radius1 = 0.1
inner_radius2 = 0.15
outer_radius2 = 0.2
thickness2 = ${fparse outer_radius2 - inner_radius2}
n_radial_elems1 = 10
n_radial_elems2 = 5
initial_T1 = 300
initial_T2 = 1000
T_ref = 300
y_shiftB = 0.5
view_factor21 = ${fparse outer_radius1 / inner_radius2}
view_factor22 = ${fparse 1.0 - view_factor21}
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
# Setup with HSCoupler2D2DRadiation
[hs1A]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'region1'
widths = '${outer_radius1}'
n_part_elems = '${n_radial_elems1}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T1}
[]
[hs2A]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
inner_radius = ${inner_radius2}
names = 'region1'
widths = '${thickness2}'
n_part_elems = '${n_radial_elems2}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T2}
[]
[hs_couplerA]
type = HSCoupler2D2DRadiation
heat_structures = 'hs1A hs2A'
boundaries = 'hs1A:outer hs2A:inner'
emissivities = '${emissivity1} ${emissivity2}'
include_environment = false
view_factors = '0.0 1.0; ${view_factor21} ${view_factor22}'
[]
# Setup with HeatStructure2DRadiationCouplerRZ
[hs1B]
type = HeatStructureCylindrical
position = '0 ${y_shiftB} 0'
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'region1'
widths = '${outer_radius1}'
n_part_elems = '${n_radial_elems1}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T1}
[]
[hs2B]
type = HeatStructureCylindrical
position = '0 ${y_shiftB} 0'
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
inner_radius = ${inner_radius2}
names = 'region1'
widths = '${thickness2}'
n_part_elems = '${n_radial_elems2}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T2}
[]
[hs_couplerB]
type = HeatStructure2DRadiationCouplerRZ
primary_heat_structure = hs1B
secondary_heat_structure = hs2B
primary_boundary = hs1B:outer
secondary_boundary = hs2B:inner
primary_emissivity = ${emissivity1}
secondary_emissivity = ${emissivity2}
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[T1A]
type = SideAverageValue
variable = T_solid
boundary = hs1A:outer
execute_on = 'INITIAL TIMESTEP_END'
[]
[T2A]
type = SideAverageValue
variable = T_solid
boundary = hs2A:inner
execute_on = 'INITIAL TIMESTEP_END'
[]
[T1B]
type = SideAverageValue
variable = T_solid
boundary = hs1B:outer
execute_on = 'INITIAL TIMESTEP_END'
[]
[T2B]
type = SideAverageValue
variable = T_solid
boundary = hs2B:inner
execute_on = 'INITIAL TIMESTEP_END'
[]
[T1_relerr]
type = RelativeDifferencePostprocessor
value1 = T1A
value2 = T1B
execute_on = 'INITIAL TIMESTEP_END'
[]
[T2_relerr]
type = RelativeDifferencePostprocessor
value1 = T2A
value2 = T2B
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 10
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
file_base = 'concentric_cylinders'
[csv]
type = CSV
show = 'T1_relerr T2_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
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
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
use_scalar_variables = false
[]
[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'
solid_properties = 'mat1'
solid_properties_T_ref = '300'
[]
[]
[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
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.7
cp = 3.e2
rho = 10.42e3
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 0.7
cp = 5e3
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
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_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'
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'hs_mat hs_mat hs_mat'
solid_properties_T_ref = '300 300 300'
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/components/shaft_connected_motor/test.i)
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'mat'
solid_properties_T_ref = '300'
[]
[]
[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/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))}
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'region1-mat'
solid_properties_T_ref = '300'
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/components/hs_coupler_2d2d_radiation/energy_conservation.i)
# This input file is used to test that HSCoupler2D2DRadiation conserves
# energy for a problem where 3 cylindrical heat structures (surfaces 1, 2, and 3)
# are enclosed by an annular heat structure (surface 4). Note that the mesh
# positions used in this input file do not reflect the real positions for this
# configuration, for convenience of viewing solutions.
emissivity1 = 0.8
emissivity2 = 0.5
emissivity3 = 0.2
emissivity4 = 0.9
orientation = '0 0 1'
length = 0.5
n_axial_elems = 10
radius_123 = 0.1
inner_radius_4 = 0.2
outer_radius_4 = 0.25
thickness_4 = ${fparse outer_radius_4 - inner_radius_4}
n_radial_elems_123 = 10
n_radial_elems_4 = 5
initial_T1 = 1200
initial_T2 = 1000
initial_T3 = 800
initial_T4 = 300
T_ref = 300
y_shift = 0.5
position1 = '0 0 0'
position2 = '0 ${y_shift} 0'
position3 = '0 ${fparse 2*y_shift} 0'
position4 = '0 ${fparse 3*y_shift} 0'
view_factor_12 = 0.15 # guessed some number < 1/6
view_factor_14 = ${fparse 1.0 - 2 * view_factor_12}
view_factor_41 = ${fparse radius_123 / inner_radius_4 * view_factor_14}
view_factor_44 = ${fparse 1.0 - 3 * view_factor_41}
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
[hs1]
type = HeatStructureCylindrical
position = ${position1}
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'body'
widths = '${radius_123}'
n_part_elems = '${n_radial_elems_123}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T1}
[]
[hs2]
type = HeatStructureCylindrical
position = ${position2}
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'body'
widths = '${radius_123}'
n_part_elems = '${n_radial_elems_123}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T2}
[]
[hs3]
type = HeatStructureCylindrical
position = ${position3}
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
names = 'body'
widths = '${radius_123}'
n_part_elems = '${n_radial_elems_123}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T3}
[]
[hs4]
type = HeatStructureCylindrical
position = ${position4}
orientation = ${orientation}
length = ${length}
n_elems = ${n_axial_elems}
inner_radius = ${inner_radius_4}
names = 'body'
widths = '${thickness_4}'
n_part_elems = '${n_radial_elems_4}'
solid_properties = 'hs_mat'
solid_properties_T_ref = '${T_ref}'
initial_T = ${initial_T4}
[]
[hs_coupler]
type = HSCoupler2D2DRadiation
heat_structures = 'hs1 hs2 hs3 hs4'
boundaries = 'hs1:outer hs2:outer hs3:outer hs4:inner'
emissivities = '${emissivity1} ${emissivity2} ${emissivity3} ${emissivity4}'
include_environment = false
view_factors = '
0 ${view_factor_12} ${view_factor_12} ${view_factor_14};
${view_factor_12} 0 ${view_factor_12} ${view_factor_14};
${view_factor_12} ${view_factor_12} 0 ${view_factor_14};
${view_factor_41} ${view_factor_41} ${view_factor_41} ${view_factor_44}'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[E_hs1]
type = ADHeatStructureEnergyRZ
block = 'hs1:body'
axis_dir = ${orientation}
axis_point = ${position1}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs2]
type = ADHeatStructureEnergyRZ
block = 'hs2:body'
axis_dir = ${orientation}
axis_point = ${position2}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs3]
type = ADHeatStructureEnergyRZ
block = 'hs3:body'
axis_dir = ${orientation}
axis_point = ${position3}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs4]
type = ADHeatStructureEnergyRZ
block = 'hs4:body'
axis_dir = ${orientation}
axis_point = ${position4}
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_tot]
type = ParsedPostprocessor
expression = 'E_hs1 + E_hs2 + E_hs3 + E_hs4'
pp_names = 'E_hs1 E_hs2 E_hs3 E_hs4'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_tot_err]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
take_absolute_value = true
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 10
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
file_base = 'energy_conservation'
[csv]
type = CSV
show = 'E_tot_err'
execute_on = 'FINAL'
[]
[]
(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
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat'
solid_properties_T_ref = '300'
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_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
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[region2-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 5
rho = 3
[]
[]
[Functions]
[T0_fn]
type = ParsedFunction
expression = '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'
solid_properties = 'region1-mat region2-mat'
solid_properties_T_ref = '300 300'
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/deprecated/heat_generation.i)
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
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'
solid_properties = 'fuel-mat'
solid_properties_T_ref = '300'
initial_T = 559.15
[]
[hgen]
type = HeatGeneration
hs = hs
regions = fuel
[]
[]
[Executioner]
type = Transient
dt = 1.e-2
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_2d_radiation_coupler_rz/heat_structure_2d_radiation_coupler_rz.i)
emissivity1 = 0.75
emissivity2 = 0.5
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
[hs1]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 1 0'
length = 0.5
n_elems = 25
inner_radius = 0.1
names = 'region1'
widths = '0.1'
n_part_elems = '5'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = 300
[]
[hs2]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 1 0'
length = '0.5 0.5'
n_elems = '25 25'
axial_region_names = 'axregion1 axregion2'
inner_radius = 0.5
names = 'region1'
widths = '0.1'
n_part_elems = '5'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = 1000
[]
[hs_coupler]
type = HeatStructure2DRadiationCouplerRZ
primary_heat_structure = hs1
secondary_heat_structure = hs2
primary_boundary = hs1:outer
secondary_boundary = hs2:axregion1:inner
primary_emissivity = ${emissivity1}
secondary_emissivity = ${emissivity2}
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'hs1:region1 hs2:region1'
axis_dir = '1 1 0'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'INITIAL TIMESTEP_END'
[]
[T1]
type = SideAverageValue
variable = T_solid
boundary = hs1:outer
execute_on = 'INITIAL TIMESTEP_END'
[]
[T2]
type = SideAverageValue
variable = T_solid
boundary = hs2:axregion1:inner
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 10
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
file_base = 'heat_structure_2d_radiation_coupler_rz'
[csv]
type = CSV
show = 'E_tot_change T1 T2'
[]
[]