Coupled Heat Transfer Action

Description

The CoupledHeatTransferAction action sets up all of the necessary objects for doing transfer between heat conduction and thermal hydraulics module. It should be used with the heat conduction problem in the master-app. It is setting up the following objects:

  • A convective boundary condition on the boundaries provided in the boundary parameter using the heat transfer coefficient variable htc and the fluid temperature T_fluid.

  • A UserObject of type LayeredSideAverage operating on the solid temperature defined in the T parameter, using a number of num_layers layers in the directions provided in direction.

  • A MultiAppUserObjectTransfer to the sub-app defined in the multi_app parameter. This will transfer the resulting solid surface temperature into the sub-app variable provided in the T_wall parameter.

  • A MultiAppUserObjectTransfer from the sub-app defined in the multi_app parameter. This will transfer the fluid temperature calculated in the sub-app by the user object defined by T_fluid_user_object into the AuxVariable defined by T_fluid.

  • A MultiAppUserObjectTransfer from the sub-app defined in the multi_app parameter. This will transfer the heat transfer coefficient calculated in the sub-app by the user object defined by htc_user_object into the AuxVariable defined by htc.

To use this action, the following objects must be defined in the master-app input file:

  • AuxVariables for the fluid temperature and heat transfer coefficient.

[AuxVariables]
  [T_fluid]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = 300
  []
  [htc]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = 0
  []
[]
  • MultiApps for the THM sub-app

[MultiApps]
  [thm]
    type = TransientMultiApp
    app_type = ThermalHydraulicsApp
    input_files = sub.i
    execute_on = 'TIMESTEP_END'
    bounding_box_padding = '0.1 0 0.1'
  []
[]

The following must be defined in the THM sub-app:

  • AuxVariables for the heat transfer coefficient associated with a ADMaterialRealAux AuxKernel. In THM, the heat transfer coefficient is defined as a material, but an AuxVariable is needed for the transfers.

[AuxVariables]
  [Hw]
    family = monomial
    order = constant
    block = pipe1
  []
[]

!listing tthermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub.i block=AuxKernels link=False

  • LayeredAverage user-objects for the fluid temperature and the heat transfer coefficient.

[UserObjects]
  [T_uo]
    type = LayeredAverage
    direction = y
    variable = T
    num_layers = 10
    block = pipe1
  []
  [Hw_uo]
    type = LayeredAverage
    direction = y
    variable = Hw
    num_layers = 10
    block = pipe1
  []
[]
  • HeatTransferFromExternalAppTemperature1Phase component. If T_ext is not set, then the name of solid surface temperature is T_wall.

Input Parameters

  • TSolid temperature variable

    C++ Type:VariableName

    Controllable:No

    Description:Solid temperature variable

  • T_fluidVariable to transfer fluid temperature into

    C++ Type:VariableName

    Controllable:No

    Description:Variable to transfer fluid temperature into

  • T_fluid_user_objectName of the user object in the THM multi-app holding fluid temperature values.

    C++ Type:UserObjectName

    Controllable:No

    Description:Name of the user object in the THM multi-app holding fluid temperature values.

  • T_wallThe name fo the variable holding wall temperature in THM)

    C++ Type:VariableName

    Controllable:No

    Description:The name fo the variable holding wall temperature in THM)

  • boundaryList of boundary names on the solid side

    C++ Type:std::vector<BoundaryName>

    Controllable:No

    Description:List of boundary names on the solid side

  • directionThe direction of the layers.

    C++ Type:MooseEnum

    Options:x, y, z

    Controllable:No

    Description:The direction of the layers.

  • htcVariable to transfer heat transfer coefficient into

    C++ Type:VariableName

    Controllable:No

    Description:Variable to transfer heat transfer coefficient into

  • htc_user_objectName of the user object in the THM multi-app holding the heat transfer coefficient values.

    C++ Type:UserObjectName

    Controllable:No

    Description:Name of the user object in the THM multi-app holding the heat transfer coefficient values.

  • multi_appThe name of the multi-app.

    C++ Type:std::string

    Controllable:No

    Description:The name of the multi-app.

  • num_layersThe number of layers.

    C++ Type:unsigned int

    Controllable:No

    Description:The number of layers.

Required Parameters

  • active__all__ If specified only the blocks named will be visited and made active

    Default:__all__

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:If specified only the blocks named will be visited and made active

  • inactiveIf specified blocks matching these identifiers will be skipped.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:If specified blocks matching these identifiers will be skipped.

Optional Parameters

Example

Heat conduction input file:

# This tests an action used to exchange T_wall, T_fluid and HTC between
# a heat conduction simulation and a THM simulation

[Mesh]
  type = GeneratedMesh
  dim = 2
  xmax = 0.1
  nx = 2
  ymax = 1
  ny = 10
  parallel_type = replicated
[]

[Variables]
  [T]
  []
[]

[ICs]
  [T_ic]
    type = ConstantIC
    variable = T
    value = 300
  []
[]

[AuxVariables]
  [T_fluid]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = 300
  []
  [htc]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = 0
  []
[]

[Kernels]
  [td]
    type = TimeDerivative
    variable = T
  []

  [diff]
    type = Diffusion
    variable = T
  []
[]

[CoupledHeatTransfers]
  [right]
    boundary = right
    T_fluid = T_fluid
    T = T
    T_wall = T_wall
    htc = htc
    direction = y
    num_layers = 10
    multi_app = thm
    T_fluid_user_object = T_uo
    htc_user_object = Hw_uo
  []
[]

[Problem]
  coord_type = RZ
[]

[Executioner]
  type = Transient
  dt = 0.1
  num_steps = 10
  nl_abs_tol = 1e-10
  abort_on_solve_fail = true

  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
[]

[MultiApps]
  [thm]
    type = TransientMultiApp
    app_type = ThermalHydraulicsApp
    input_files = sub.i
    execute_on = 'TIMESTEP_END'
    bounding_box_padding = '0.1 0 0.1'
  []
[]

[Outputs]
  exodus = true
[]

[Postprocessors]
  [T_wall_avg]
    type = SideAverageValue
    variable = T
    boundary = right
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [T_fluid_avg]
    type = ElementAverageValue
    variable = T_fluid
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [htc_avg]
    type = ElementAverageValue
    variable = htc
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
(modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)

THM input file:

# This is a part of T_wall_action test. See the master file for details.

[GlobalParams]
  initial_p = 1.e5
  initial_vel = 0.
  initial_T = 300.

  closures = simple_closures
[]

[Modules/FluidProperties]
  [eos]
    type = StiffenedGasFluidProperties
    gamma = 2.35
    q = -1167e3
    q_prime = 0
    p_inf = 1.e9
    cv = 1816
  []
[]

[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]

[AuxVariables]
  [Hw]
    family = monomial
    order = constant
    block = pipe1
  []
[]

[AuxKernels]
  [Hw_ak]
    type = ADMaterialRealAux
    variable = Hw
    property = 'Hw'
  []
[]

[UserObjects]
  [T_uo]
    type = LayeredAverage
    direction = y
    variable = T
    num_layers = 10
    block = pipe1
  []
  [Hw_uo]
    type = LayeredAverage
    direction = y
    variable = Hw
    num_layers = 10
    block = pipe1
  []
[]

[Components]
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 1 0'
    length = 1
    n_elems = 10

    A   = 1.28584e-01
    D_h = 8.18592e-01
    f = 0.01

    fp = eos
  []

  [hxconn]
    type = HeatTransferFromExternalAppTemperature1Phase
    flow_channel = pipe1
    Hw = 10000
    P_hf = 6.28319e-01
    initial_T_wall = 300.
    var_type = elemental
  []

  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe1:in'
    m_dot = 10
    T = 400
  []

  [outlet]
    type = Outlet1Phase
    input = 'pipe1:out'
    p = 1e5
  []
[]

[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]

[Postprocessors]
  [T_wall_avg]
    type = ElementAverageValue
    variable = T_wall
    execute_on = 'INITIAL TIMESTEP_END'
  []

  [htc_avg]
    type = ElementAverageValue
    variable = Hw
    execute_on = 'INITIAL TIMESTEP_END'
  []

  [T_avg]
    type = ElementAverageValue
    variable = T
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]

[Executioner]
  type = Transient
  scheme = 'bdf2'
  dt = 0.1
  dtmin = 1e-7
  abort_on_solve_fail = true

  solve_type = 'NEWTON'
  line_search = 'basic'
  nl_rel_tol = 1e-7
  nl_abs_tol = 1e-4
  nl_max_its = 20

  l_tol = 1e-3
  l_max_its = 300

  start_time = 0.0

  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
[]

[Outputs]
  [out]
    type = Exodus
    show = 'T_wall T Hw'
  []
[]
(modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub.i)