https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HSBoundaryInterface Class Reference

Interface class for coupling to a heat structure boundary. More...

#include <HSBoundaryInterface.h>

Inheritance diagram for HSBoundaryInterface:
[legend]

Public Member Functions

 HSBoundaryInterface (Component *component)
 
void check (const Component *const component) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

const BoundaryName & getHSBoundaryName (const Component *const component) const
 Gets the boundary name corresponding to the heat structure and side. More...
 

Protected Attributes

const std::string & _hs_name
 Heat structure name. More...
 
const MooseEnum_hs_side_enum
 Heat structure side enum. More...
 
const Component2D::ExternalBoundaryType _hs_side
 Heat structure side. More...
 
const bool _hs_side_valid
 True if valid heat structure side was provided. More...
 

Detailed Description

Interface class for coupling to a heat structure boundary.

Definition at line 21 of file HSBoundaryInterface.h.

Constructor & Destructor Documentation

◆ HSBoundaryInterface()

HSBoundaryInterface::HSBoundaryInterface ( Component component)

Definition at line 26 of file HSBoundaryInterface.C.

27  : _hs_name(component->getParam<std::string>("hs")),
28  _hs_side_enum(component->getParam<MooseEnum>("hs_side")),
29  _hs_side(component->getEnumParam<Component2D::ExternalBoundaryType>("hs_side")),
30  _hs_side_valid(static_cast<int>(_hs_side) >= 0)
31 {
32  component->addDependency(_hs_name);
33 }
const Component2D::ExternalBoundaryType _hs_side
Heat structure side.
static const std::string component
Definition: NS.h:153
ExternalBoundaryType
External boundary type.
Definition: Component2D.h:18
const bool _hs_side_valid
True if valid heat structure side was provided.
const std::string & _hs_name
Heat structure name.
const MooseEnum & _hs_side_enum
Heat structure side enum.

Member Function Documentation

◆ check()

void HSBoundaryInterface::check ( const Component *const  component) const

Definition at line 36 of file HSBoundaryInterface.C.

Referenced by HeatTransferFromHeatStructure1Phase::check().

37 {
38  component->checkComponentOfTypeExistsByName<HeatStructureBase>(_hs_name);
39 
40  if (component->hasComponentByName<HeatStructureBase>(_hs_name))
41  {
42  const HeatStructureBase & hs = component->getComponentByName<HeatStructureBase>(_hs_name);
43 
44  if (_hs_side_valid)
45  {
46  const Real & P_hs = hs.getUnitPerimeter(_hs_side);
47  if (MooseUtils::absoluteFuzzyEqual(P_hs, 0.))
48  component->logError("'hs_side' parameter is set to '",
50  "', but this side of the heat structure '",
51  _hs_name,
52  "' has radius of zero.");
53 
54  if (std::isnan(P_hs))
55  component->logError("Invalid side '",
57  "'. This side does not have unit perimeter. You probably want to use "
58  "'INNER' or 'OUTER' side instead.");
59  }
60  }
61 }
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
const Component2D::ExternalBoundaryType _hs_side
Heat structure side.
static const std::string component
Definition: NS.h:153
virtual Real getUnitPerimeter(const ExternalBoundaryType &side) const =0
Gets the perimeter of one unit of this heat structure on the specified side.
const bool _hs_side_valid
True if valid heat structure side was provided.
const std::string & _hs_name
Heat structure name.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Base class for 2D generated heat structures.
const MooseEnum & _hs_side_enum
Heat structure side enum.

◆ getHSBoundaryName()

const BoundaryName & HSBoundaryInterface::getHSBoundaryName ( const Component *const  component) const
protected

Gets the boundary name corresponding to the heat structure and side.

Parameters
[in]componentComponent pointer

Definition at line 64 of file HSBoundaryInterface.C.

Referenced by HeatTransferFromHeatStructure1Phase::getHeatStructureSideName().

65 {
66  const HeatStructureBase & hs = component->getComponentByName<HeatStructureBase>(_hs_name);
68 }
const BoundaryName & getExternalBoundaryName(const ExternalBoundaryType &boundary_type) const
Gets the name of an external boundary by type.
Definition: Component2D.C:550
const Component2D::ExternalBoundaryType _hs_side
Heat structure side.
static const std::string component
Definition: NS.h:153
const std::string & _hs_name
Heat structure name.
Base class for 2D generated heat structures.

◆ validParams()

InputParameters HSBoundaryInterface::validParams ( )
static

Definition at line 15 of file HSBoundaryInterface.C.

Referenced by HeatTransferFromHeatStructure1Phase::validParams().

16 {
18 
19  params.addRequiredParam<std::string>("hs", "Heat structure name");
21  "hs_side", Component2D::getExternalBoundaryTypeMooseEnum(), "Heat structure side");
22 
23  return params;
24 }
static MooseEnum getExternalBoundaryTypeMooseEnum(const std::string &default_value="")
Gets the MooseEnum corresponding to ExternalBoundaryType.
Definition: Component2D.C:21
void addRequiredParam(const std::string &name, const std::string &doc_string)
InputParameters emptyInputParameters()

Member Data Documentation

◆ _hs_name

const std::string& HSBoundaryInterface::_hs_name
protected

◆ _hs_side

const Component2D::ExternalBoundaryType HSBoundaryInterface::_hs_side
protected

◆ _hs_side_enum

const MooseEnum& HSBoundaryInterface::_hs_side_enum
protected

Heat structure side enum.

Definition at line 39 of file HSBoundaryInterface.h.

Referenced by check().

◆ _hs_side_valid

const bool HSBoundaryInterface::_hs_side_valid
protected

True if valid heat structure side was provided.

Definition at line 43 of file HSBoundaryInterface.h.

Referenced by check(), HeatTransferFromHeatStructure1Phase::check(), and HeatTransferFromHeatStructure1Phase::setupMesh().


The documentation for this class was generated from the following files: