CoupledHeatTransferAction

Description

This action creates many of the low-level objects needed to perform a convective heat transfer multiphysics coupling with a 1-D flow channel. It assumes that the domain external to the flow channel is the master-app, and the application(s) containing the flow channel(s) are the sub-apps. Hereafter the external domain is referred to as the "solid side", and the flow channel is referred to as the "fluid side".

This action is suitable for coupling to either single-phase or multi-phase flow channels. The general formulation it uses for the heat fluxes to the solid side is

q=kκkHk(TkT)\eqcq = \sum\limits_k \kappa_k \mathcal{H}_k (T_k - T) \eqc(1)

where kk is the fluid phase index, TT is the solid-side temperature, TkT_k is the temperature of phase kk, Hk\mathcal{H}_k is the heat transfer coefficient of phase kk, and κk\kappa_k is the wall contact fraction of phase kk.

The action creates the following MOOSE objects:

Instructions for the Master Input File

The following must be defined in the master-app input file:

  • AuxVariables for the fluid temperature(s), heat transfer coefficient(s), and wall contact fractions (if multi-phase). For example,

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

    It is recommended that the FE type match that of the corresponding variables in the coupled flow channel.

  • MultiApps for the flow-channel sub-app(s). For example,

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

Instructions for the Sub Input File

The following must be defined in the sub-app input file:

  • AuxVariables for the fluid temperature(s), heat transfer coefficient(s), and wall contact fractions (if multi-phase). For example, for THM's single-phase flow model, the fluid temperature is already available as an aux variable, but the wall heat transfer coefficient is an AD material property. Thus a MaterialRealAux must be created:

    [AuxVariables]
      [Hw]
        family = monomial
        order = constant
        block = pipe1
      []
    []
    [AuxKernels]
      [Hw_ak]
        type = ADMaterialRealAux
        variable = Hw
        property = 'Hw'
      []
    []

  • LayeredAverage user objects for the fluid temperature(s), heat transfer coefficient(s), and wall contact fractions (if multi-phase). For example,

    [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
      []
    []

  • A component to implement the flow channel heat source corresponding to Eq. (1). For example, for THM's single-phase flow model, the HeatTransferFromExternalAppTemperature1Phase component is used.

Input Parameters

  • TSolid side temperature variable

    C++ Type:VariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:Solid side temperature variable

  • T_fluidVariable(s) on the solid side into which to transfer the fluid temperature(s)

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Variable(s) on the solid side into which to transfer the fluid temperature(s)

  • T_wallVariable on the flow channel side into which to transfer the solid temperature

    C++ Type:VariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:Variable on the flow channel side into which to transfer the solid temperature

  • boundaryBoundary name(s) on the solid side

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Boundary name(s) on the solid side

  • htcVariable(s) on the solid side into which to transfer the heat transfer coefficient(s)

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Variable(s) on the solid side into which to transfer the heat transfer coefficient(s)

  • multi_appThe name of the multi-app.

    C++ Type:std::string

    Unit:(no unit assumed)

    Controllable:No

    Description:The name of the multi-app.

Required Parameters

  • T_fluid_user_objectsSpatial user object(s) holding the fluid temperature values

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Spatial user object(s) holding the fluid temperature values

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

    Default:__all__

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

    Unit:(no unit assumed)

    Controllable:No

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

  • fixed_bounding_box_sizeThe 'fixed_bounding_box_size' value to use for each MultiAppGeneralFieldUserObjectTransfer. If this parameter is not provided, a greedy search will be used instead of bounding boxes, which may be slower.

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

    Unit:(no unit assumed)

    Controllable:No

    Description:The 'fixed_bounding_box_size' value to use for each MultiAppGeneralFieldUserObjectTransfer. If this parameter is not provided, a greedy search will be used instead of bounding boxes, which may be slower.

  • htc_user_objectsSpatial user object(s) holding the heat transfer coefficient values

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Spatial user object(s) holding the heat transfer coefficient values

  • inactiveIf specified blocks matching these identifiers will be skipped.

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

    Unit:(no unit assumed)

    Controllable:No

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

  • kappaVariables on the solid side into which to transfer the wall contact fractions

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Variables on the solid side into which to transfer the wall contact fractions

  • kappa_user_objectsSpatial user object(s) holding the wall contact fraction values

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Spatial user object(s) holding the wall contact fraction values

  • 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

  • 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]

  • positionsSub-app positions. Each set of 3 values represents a Point.

    C++ Type:std::vector<libMesh::Point>

    Unit:(no unit assumed)

    Controllable:No

    Description:Sub-app positions. Each set of 3 values represents a Point.

  • positions_fileName of file containing sub-app positions. Each set of 3 values represents a Point.

    C++ Type:FileName

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of file containing sub-app positions. Each set of 3 values represents a Point.

  • 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]

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.

  • skip_coordinate_collapsingTrueWhether to skip coordinate collapsing (translation and rotation are still performed, only XYZ, RZ etc collapsing is skipped) when performing mapping and inverse mapping coordinate transformation operations. This parameter should only be set by users who really know what they're doing.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether to skip coordinate collapsing (translation and rotation are still performed, only XYZ, RZ etc collapsing is skipped) when performing mapping and inverse mapping coordinate transformation operations. This parameter should only be set by users who really know what they're doing.

Advanced 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
  coord_type = RZ
[]

[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'
    multi_app = thm
    T_fluid_user_objects = 'T_uo'
    htc_user_objects = 'Hw_uo'

    position = '0 0 0'
    orientation = '0 1 0'
    length = 1
    n_elems = 10
    skip_coordinate_collapsing = true
  []
[]

[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'
  []
[]

[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'
  []
[]
(contrib/moose/modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)

Flow channel 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
[]

[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'
  []
[]
(contrib/moose/modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/sub.i)