21 "The first heat structure to couple");
23 "The second heat structure to couple");
25 "The boundary of the first heat structure to couple");
27 "The boundary of the second heat structure to couple");
35 _hs_names({getParam<std::string>(
"primary_heat_structure"),
36 getParam<std::string>(
"secondary_heat_structure")}),
38 {getParam<BoundaryName>(
"primary_boundary"), getParam<BoundaryName>(
"secondary_boundary")}),
40 _mesh_alignment(constMesh()),
41 _is_plate({
false,
false}),
42 _is_cylindrical({
false,
false})
44 addDependency(_hs_names[0]);
45 addDependency(_hs_names[1]);
53 if (hasComponentByName<HeatStructureBase>(
_hs_names[0]) &&
54 hasComponentByName<HeatStructureBase>(
_hs_names[1]))
81 if (hasComponentByName<HeatStructureBase>(
_hs_names[0]) &&
82 hasComponentByName<HeatStructureBase>(
_hs_names[1]))
114 for (
unsigned int i = 0; i < 2; i++)
116 if (hasComponentByName<HeatStructurePlate>(
_hs_names[i]))
118 if (hasComponentByName<HeatStructureCylindricalBase>(
_hs_names[i]))
128 for (
unsigned int i = 0; i < 2; i++)
130 checkComponentOfTypeExistsByName<HeatStructureBase>(
_hs_names[i]);
132 if (hasComponentByName<HeatStructureBase>(
_hs_names[i]))
138 "' does not have the boundary '",
143 logError(
"The type of the heat structure '",
145 "' is not 'HeatStructurePlate' or inherited from 'HeatStructureCylindricalBase'.");
150 logError(
"The coupled heat structures must have the same type.");
bool hasBoundary(const BoundaryName &boundary_name) const
Returns true if this component has the supplied boundary.
static InputParameters validParams()
static InputParameters validParams()
const std::vector< BoundaryName > _hs_boundaries
Primary and secondary heat structure boundaries.
virtual void setupMesh()
Performs mesh setup such as creating mesh or naming mesh sets.
THMProblem & getTHMProblem() const
Gets the THM problem.
Base class for components of a boundary type.
void initialize(const std::vector< dof_id_type > &primary_elem_ids, const std::vector< std::tuple< dof_id_type, unsigned short int >> &secondary_boundary_info)
Extracts mesh information and builds the mapping.
const Real & getBoundaryArea(const BoundaryName &boundary_name) const
Gets the area for a boundary.
bool meshesAreAligned() const
Returns true if the primary and secondary meshes are aligned.
HeatStructure2DCouplerBase(const InputParameters ¶meters)
void logError(Args &&... args) const
Logs an error.
virtual void check() const
Check the component integrity.
std::vector< bool > _is_cylindrical
Flag for each heat structure deriving from HeatStructureCylindricalBase.
const dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
virtual void init() override
Initializes the component.
std::vector< Real > _coupling_area_fractions
Area fractions by which to multiply coupling terms.
virtual void init()
Initializes the component.
const std::vector< dof_id_type > & getPrimaryElemIDs() const
Returns the list of element IDs on the primary boundary.
std::vector< Real > _areas
Areas for the primary and secondary sides.
std::vector< Component2D::ExternalBoundaryType > _hs_side_types
Heat structure side types for each boundary.
const std::vector< std::tuple< dof_id_type, unsigned short int > > & getBoundaryInfo(const BoundaryName &boundary_name) const
Gets boundary info associated with the component boundary.
MeshAlignment _mesh_alignment
Mesh alignment.
ExternalBoundaryType getExternalBoundaryType(const BoundaryName &boundary_name) const
Gets the external boundary type of the given boundary.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
Base class for 2D generated heat structures.
const std::vector< std::string > _hs_names
Primary and secondary heat structure names.
virtual void augmentSparsity(const dof_id_type &elem_id1, const dof_id_type &elem_id2)
Hint how to augment sparsity pattern between two elements.
std::vector< bool > _is_plate
Flag for each heat structure being HeatStructurePlate.
bool hasCoupledElemID(const dof_id_type &elem_id) const
Returns true if the element ID has a coupled element ID.
virtual void check() const override
Check the component integrity.