23 params.
addRequiredParam<MaterialPropertyName>(
"Hw",
"Convective heat transfer coefficient");
24 params.
addClassDescription(
"Caches heat flux information (fluid temperature and heat transfer " 25 "coefficient) between flow channel and 3D heat structure.");
33 _P_hf(adCoupledValue(
"P_hf")),
34 _Hw(getADMaterialProperty<
Real>(
"Hw")),
35 _T(getADMaterialProperty<
Real>(
"T"))
54 for (
const auto & secondary_elem_id : secondary_elem_ids)
58 _T_fluid[secondary_elem_id].resize(secondary_n_qps);
59 _htc[secondary_elem_id].resize(secondary_n_qps);
62 for (
unsigned int secondary_qp = 0; secondary_qp < secondary_n_qps; secondary_qp++)
64 const auto primary_qp =
67 _T_fluid[secondary_elem_id][secondary_qp] =
_T[primary_qp];
68 _htc[secondary_elem_id][secondary_qp] =
_Hw[primary_qp];
86 for (
auto & it : uo._heated_perimeter)
88 for (
auto & it : uo._T_fluid)
90 for (
auto & it : uo._htc)
91 _htc[it.first] = it.second;
94 const std::vector<ADReal> &
97 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
103 name(),
": Requested heated perimeter for element ", element_id,
" was not computed.");
106 const std::vector<ADReal> &
110 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
111 auto it =
_htc.find(element_id);
112 if (it !=
_htc.end())
116 ": Requested heat transfer coefficient for element ",
118 " was not computed.");
121 const std::vector<ADReal> &
124 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
125 auto it =
_T_fluid.find(element_id);
130 name(),
": Requested fluid temperature for element ", element_id,
" was not computed.");
const std::vector< ADReal > & getHeatedPerimeter(dof_id_type element_id) const
const ADMaterialProperty< Real > & _T
Fluid temperature.
void allGatherADVectorMap(const Parallel::Communicator &comm, std::map< dof_id_type, std::vector< ADReal >> &this_map)
Parallel gather of a map of DoF ID to AD vector.
static InputParameters validParams()
const Parallel::Communicator & comm() const
const std::vector< double > y
std::map< dof_id_type, std::vector< ADReal > > _T_fluid
Map of the element ID to the fluid temperature at the quadrature points.
unsigned int getSecondaryNumberOfQuadraturePoints() const
Gets the number of quadrature points for faces on the secondary boundary.
virtual const std::string & name() const
unsigned int getCoupledPrimaryElemQpIndex(const dof_id_type &secondary_elem_id, const unsigned int &secondary_qp) const
Gets the quadrature point index on the primary element corresponding to the quadrature point index on...
std::map< dof_id_type, std::vector< ADReal > > _htc
Map of the element ID to the wall heat transfer coefficient at the quadrature points.
virtual void threadJoin(const UserObject &y) override
const ADVariableValue & _P_hf
Coupled heated perimeter variable.
MeshAlignment1D3D & _mesh_alignment
Mesh alignment object.
std::map< dof_id_type, std::vector< ADReal > > _heated_perimeter
Map of the element ID to the heated perimeter at the quadrature points.
const std::vector< ADReal > & getHeatTransferCoeff(dof_id_type element_id) const
const std::vector< ADReal > & getTfluid(dof_id_type element_id) const
ADHeatTransferFromHeatStructure3D1PhaseUserObject(const InputParameters ¶meters)
Caching heat flux data (fluid temperature and heat transfer coefficient) between a flow channel and a...
virtual void finalize() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Elem *const & _current_elem
virtual void execute() override
const ADMaterialProperty< Real > & _Hw
Heat transfer coefficient.
void mooseError(Args &&... args) const
void buildCoupledElemQpIndexMap(Assembly &assembly)
Builds the map used for getting the coupled quadrature point index.
static InputParameters validParams()
const std::vector< dof_id_type > & getCoupledSecondaryElemIDs(const dof_id_type &primary_elem_id) const
Gets the coupled secondary element IDs for a given primary element ID.
Builds mapping between a 1D subdomain and a 3D boundary.
registerMooseObject("ThermalHydraulicsApp", ADHeatTransferFromHeatStructure3D1PhaseUserObject)
virtual void initialize() override