- fileThe ExodusII mesh file name
C++ Type:FileName
Unit:(no unit assumed)
Controllable:No
Description:The ExodusII mesh file name
- positionTranslation vector for the file mesh [m]
C++ Type:libMesh::Point
Unit:(no unit assumed)
Controllable:No
Description:Translation vector for the file mesh [m]
HeatStructureFromFile3D
This component allows users to load a 3D mesh from a file into a heat structure.
The block, sideset, and nodeset names are preserved, but are prepended with a component name. For example, if the component name is hs
and the mesh has a block called body
, users can refer to this block using the hs:body
name, and similarly for sidesets and nodesets.
Usage
The initial temperature is given by the function parameter "initial_T".
The following parameters need to be specified:
"position": The location in 3D space where the origin of the mesh will be placed. This can be used to move the mesh from its original location specified in the file.
"file": the ExodusII file name with the mesh to load. Note that ExodusII is the only supported format at the moment.
To define the material properties used by the heat conduction model, users must create materials that define the following AD material properties on all of their blocks (see Mesh):
Material Property | Symbol | Description |
---|---|---|
density | Density [kg/m] | |
specific_heat | Specific heat capacity [J/(kg-K)] | |
thermal_conductivity | Thermal conductivity [W/(m-K)] |
Input Parameters
- initial_TInitial temperature [K]
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:Initial temperature [K]
- 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.
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
The block and sideset names in the loaded mesh file are prepended with the name of the component. For example if the heat structure component name is myhs
and the mesh file has the block myblock
, then the block myhs:myblock
is created.
Variables
The following variables are created:
Variable | Symbol | Description |
---|---|---|
T_solid | Temperature [K] |
Formulation
The heat conduction equation is the following: where
is density,
is specific heat capacity,
is thermal conductivity,
is temperature, and
is a volumetric heat source.
Multiplying by a test function and integrating by parts over the domain gives where is the boundary of the domain .
Input Files
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/from_file_3d.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/from_file_3d.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.conservation_from_file_3d.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/from_file_3d.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_from_file_3d/phy.standalone.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation_from_file_3d.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.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:Translation vector for the file mesh [m]
file
C++ Type:FileName
Unit:(no unit assumed)
Controllable:No
Description:The ExodusII mesh file name
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
# Testing energy conservation with fluid at rest
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[Components]
[in1]
type = SolidWall1Phase
input = 'fch1:in'
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = SolidWall1Phase
input = 'fch1:out'
[]
[in2]
type = SolidWall1Phase
input = 'fch2:in'
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out2]
type = SolidWall1Phase
input = 'fch2:out'
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch1]
type = ElementIntegralVariablePostprocessor
block = fch1
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch2]
type = ElementIntegralVariablePostprocessor
block = fch2
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch1 energy_fch2 energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
[csv]
type = CSV
show = 'energy_change'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/test.i)
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/from_file_3d.i)
T_hs = 300
T_ambient1 = 500
htc1 = 100
T_ambient2 = 400
htc2 = 300
t = 0.001
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
A = ${fparse height * depth}
heat_flux_avg = ${fparse 0.5 * (htc1 * (T_ambient1 - T_hs) + htc2 * (T_ambient2 - T_hs))}
heat_flux_integral = ${fparse heat_flux_avg * A}
scale = 0.8
E_change = ${fparse scale * heat_flux_integral * t}
[Functions]
[T_ambient_fn]
type = PiecewiseConstant
axis = z
x = '-2.5 0'
y = '${T_ambient1} ${T_ambient2}'
[]
[htc_ambient_fn]
type = PiecewiseConstant
axis = z
x = '-2.5 0'
y = '${htc1} ${htc2}'
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[ambient_convection]
type = HSBoundaryAmbientConvection
boundary = 'hs:left'
hs = hs
T_ambient = T_ambient_fn
htc_ambient = htc_ambient_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
# Testing energy conservation at steady state
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 10 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[in1]
type = InletVelocityTemperature1Phase
input = 'fch1:in'
vel = 1
T = 300
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = Outlet1Phase
input = 'fch1:out'
p = 1.01e5
[]
[in2]
type = InletVelocityTemperature1Phase
input = 'fch2:in'
vel = 1
T = 350
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0
[]
[out2]
type = Outlet1Phase
input = 'fch2:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = 325
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[E_in1]
type = ADFlowBoundaryFlux1Phase
boundary = in1
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out1]
type = ADFlowBoundaryFlux1Phase
boundary = out1
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe1]
type = ADHeatRateConvection1Phase
block = fch1
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff1]
type = DifferencePostprocessor
value1 = E_in1
value2 = E_out1
execute_on = 'initial timestep_end'
[]
[E_conservation1]
type = SumPostprocessor
values = 'E_diff1 hf_pipe1'
[]
[E_in2]
type = ADFlowBoundaryFlux1Phase
boundary = in2
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out2]
type = ADFlowBoundaryFlux1Phase
boundary = out2
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe2]
type = ADHeatRateConvection1Phase
block = fch2
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff2]
type = DifferencePostprocessor
value1 = E_in2
value2 = E_out2
execute_on = 'initial timestep_end'
[]
[E_conservation2]
type = SumPostprocessor
values = 'E_diff2 hf_pipe2'
[]
[E_conservation_hs]
type = SumPostprocessor
values = 'hf_pipe1 hf_pipe2'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 5
end_time = 100
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation_ss'
[csv]
type = CSV
show = 'E_conservation1 E_conservation2 E_conservation_hs'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/from_file_3d.i)
T_hs = 1200
T_ambient = 1500
emissivity = 0.3
view_factor = 0.6
t = 5.0
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
stefan_boltzmann = 5.670367e-8
A = ${fparse height * depth}
heat_flux = ${fparse stefan_boltzmann * emissivity * view_factor * (T_ambient^4 - T_hs^4)}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[hs_boundary]
type = HSBoundaryRadiation
boundary = 'hs:left'
hs = hs
T_ambient = ${T_ambient}
emissivity = ${emissivity}
view_factor = ${view_factor}
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/steady_state.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = T_init
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = 0.1564344650402309
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
petsc_options_iname = '-snes_test_err'
petsc_options_value = ' 1e-9'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 1
solve_type = PJFNK
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
csv = true
show = 'energy_change'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.conservation_from_file_3d.i)
t = 0.5
# these are the dimensions of rgn1 from box.e
width = 1.5
height = 5
depth = 2
density = 3
specific_heat_capacity = 1
conductivity = 5
power_density = 20
E_change = ${fparse power_density * width * height * depth * t}
[Functions]
[power_density_fn]
type = ConstantFunction
value = ${power_density}
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'heat_structure:rgn1'
[]
[]
[AuxKernels]
[mock_power_aux]
type = FunctionAux
variable = power_density
function = power_density_fn
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'heat_structure:rgn1 heat_structure:rgn2'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[heat_structure]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromPowerDensity
hs = heat_structure
regions = 'rgn1'
power_density = power_density
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy3D
block = 'heat_structure:rgn1 heat_structure:rgn2'
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 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = 0.5
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/from_file_3d.i)
T_hs = 300
heat_flux = 1000
t = 0.001
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
A = ${fparse height * depth}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:left'
hs = hs
q = q_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_from_file_3d/phy.standalone.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1 1 1'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[left_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:left
T = 300
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = 310
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
[]
(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/components/heat_source_from_total_power/phy.conservation_from_file_3d.i)
# Tests energy conservation for HeatStructureFromFile3D in combination with HeatSourceFromTotalPower
power = 1e5
power_fraction = 0.3
t = 1
energy_change = ${fparse power_fraction * power * t}
[Functions]
[power_shape]
type = ConstantFunction
value = 0.4
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'heat_structure:rgn1 heat_structure:rgn2'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '100 500 1e4'
[]
[]
[Components]
[heat_structure]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromTotalPower
hs = heat_structure
regions = 'rgn1'
power = total_power
power_fraction = ${power_fraction}
[]
[total_power]
type = TotalPower
power = ${power}
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy3D
block = 'heat_structure:rgn1 heat_structure:rgn2'
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 = 'PJFNK'
line_search = 'basic'
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
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_from_file = 'steady_state_out.e'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]