22 params.
addParam<BoundaryName>(
"hs_boundary",
"Name of the coupled heat structure boundary.");
28 : _hs_name(component->getParam<
std::string>(
"hs")),
29 _hs_side(component->getEnumParam<
Component2D::ExternalBoundaryType>(
"hs_side", false)),
30 _hs_side_valid(static_cast<
int>(_hs_side) >= 0)
34 component->checkMutuallyExclusiveParameters({
"hs_side",
"hs_boundary"});
46 BoundaryName hs_boundary;
48 if (component->isParamValid(
"hs_side"))
57 component->logError(
"The parameter 'hs_side' was given an invalid value.");
63 hs_boundary = component->getParam<BoundaryName>(
"hs_boundary");
64 hs_side = hs.getExternalBoundaryType(hs_boundary);
67 if (!hs.hasBoundary(hs_boundary))
68 component->logError(
"The heat structure boundary '", hs_boundary,
"' does not exist.");
70 const Real & P_hs = hs.getUnitPerimeter(hs_side);
71 if (MooseUtils::absoluteFuzzyEqual(P_hs, 0.))
73 if (component->isParamValid(
"hs_side"))
74 component->logError(
"'hs_side' parameter is set to '",
75 component->getParam<
MooseEnum>(
"hs_side"),
76 "', but this side of the heat structure '",
78 "' has radius of zero.");
80 component->logError(
"The specified boundary '",
82 "' of the heat structure '",
84 "' has a radius of zero.");
87 component->logError(
"The specified boundary '",
89 "' of the heat structure '",
91 "' is either START and END boundary, which may not be used.");
98 if (component->isParamValid(
"hs_side"))
104 return component->getParam<BoundaryName>(
"hs_boundary");
110 if (component->isParamValid(
"hs_side"))
115 const auto hs_boundary = component->getParam<BoundaryName>(
"hs_boundary");
116 return hs.getExternalBoundaryType(hs_boundary);
125 BoundaryName hs_boundary;
126 if (component->isParamValid(
"hs_side"))
134 hs_boundary = component->getParam<BoundaryName>(
"hs_boundary");
136 return hs.hasBoundary(hs_boundary);
void ErrorVector unsigned int
ExternalBoundaryType
External boundary type.
static MooseEnum getExternalBoundaryTypeMooseEnum(const std::string &default_value="")
Gets the MooseEnum corresponding to ExternalBoundaryType.
const BoundaryName & getExternalBoundaryName(const ExternalBoundaryType &boundary_type) const
Gets the name of an external boundary by type.
Base class for THM components.
const std::string & _hs_name
Heat structure name.
const BoundaryName & getHSBoundaryName(const Component *const component) const
Gets the boundary name corresponding to the heat structure and side.
Component2D::ExternalBoundaryType _hs_side
Heat structure side.
static InputParameters validParams()
bool HSBoundaryIsValid(const Component *const component) const
Returns true if the specified heat structure boundary is valid.
bool _hs_side_valid
True if the heat structure side enum is valid.
HSBoundaryInterface(Component *component)
Component2D::ExternalBoundaryType getHSExternalBoundaryType(const Component *const component) const
Gets the external boundary type for the coupled heat structure boundary.
void check(const Component *const component) const
Base class for 2D generated heat structures.