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.");
Base class for components of a boundary type.
static InputParameters validParams()
bool hasBoundary(const BoundaryName &boundary_name) const
Returns true if this component has the supplied boundary.
const Real & getBoundaryArea(const BoundaryName &boundary_name) const
Gets the area for a boundary.
ExternalBoundaryType getExternalBoundaryType(const BoundaryName &boundary_name) const
Gets the external boundary type of the given 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.
virtual void init()
Initializes the component.
void logError(Args &&... args) const
Logs an error.
THMProblem & getTHMProblem() const
Gets the THM problem.
virtual void check() const
Check the component integrity.
virtual void setupMesh()
Performs mesh setup such as creating mesh or naming mesh sets.
std::vector< Component2D::ExternalBoundaryType > _hs_side_types
Heat structure side types for each boundary.
virtual void check() const override
Check the component integrity.
MeshAlignment _mesh_alignment
Mesh alignment.
std::vector< bool > _is_plate
Flag for each heat structure being HeatStructurePlate.
const std::vector< std::string > _hs_names
Primary and secondary heat structure names.
static InputParameters validParams()
HeatStructure2DCouplerBase(const InputParameters ¶meters)
std::vector< bool > _is_cylindrical
Flag for each heat structure deriving from HeatStructureCylindricalBase.
const std::vector< BoundaryName > _hs_boundaries
Primary and secondary heat structure boundaries.
virtual void init() override
Initializes the component.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
std::vector< Real > _coupling_area_fractions
Area fractions by which to multiply coupling terms.
std::vector< Real > _areas
Areas for the primary and secondary sides.
Base class for 2D generated heat structures.
const std::vector< dof_id_type > & getPrimaryElemIDs() const
Returns the list of element IDs on the primary boundary.
bool meshesAreAligned() const
Returns true if the primary and secondary meshes are aligned.
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.
bool hasCoupledElemID(const dof_id_type &elem_id) const
Returns true if the element ID has a coupled element ID.
const dof_id_type & getCoupledElemID(const dof_id_type &elem_id) const
Gets the coupled element ID for a given element ID.
virtual void augmentSparsity(const dof_id_type &elem_id1, const dof_id_type &elem_id2)
Hint how to augment sparsity pattern between two elements.