https://mooseframework.inl.gov
ADConvectionHeatTransfer3DBC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
12 #include "THMIndicesVACE.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", ADConvectionHeatTransfer3DBC);
15 
18 {
20  params.addRequiredParam<UserObjectName>(
21  "ht_uo", "The name of the user object that computes the heat flux");
22  params.addClassDescription("Adds a convective heat flux boundary condition between the local "
23  "component heat structure and a 3D heat structure");
24  return params;
25 }
26 
28  : ADIntegratedBC(parameters),
29  _ht_uo(getUserObject<ADHeatTransferFromHeatStructure3D1PhaseUserObject>("ht_uo"))
30 {
31 }
32 
33 ADReal
35 {
36  const std::vector<ADReal> & T_fluid = _ht_uo.getTfluid(_current_elem->id());
37  const std::vector<ADReal> & htc = _ht_uo.getHeatTransferCoeff(_current_elem->id());
38  return htc[_qp] * (_u[_qp] - T_fluid[_qp]) * _test[_i][_qp];
39 }
const ADTemplateVariableValue< T > & _u
virtual ADReal computeQpResidual() override
const Elem *const & _current_elem
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
const ADHeatTransferFromHeatStructure3D1PhaseUserObject & _ht_uo
User object that computes the heat transfer data (fluid temperature and heat transfer coefficient) ...
static const std::string T_fluid
Definition: NS.h:106
registerMooseObject("ThermalHydraulicsApp", ADConvectionHeatTransfer3DBC)
ADConvectionHeatTransfer3DBC(const InputParameters &parameters)
const std::vector< ADReal > & getHeatTransferCoeff(dof_id_type element_id) const
const std::vector< ADReal > & getTfluid(dof_id_type element_id) const
Caching heat flux data (fluid temperature and heat transfer coefficient) between a flow channel and a...
const ADTemplateVariableTestValue< T > & _test
void addClassDescription(const std::string &doc_string)
Convective boundary condition from a single-phase flow channel for a 3D heat structure.