23 "Name to give the heat flux variable transferred from the external application");
25 "heat_flux_is_monomial",
27 "If true, makes the heat flux variable transferred from the external application to have the "
28 "FE type 'CONSTANT MONOMIAL'. Else, the FE type is 'FIRST LAGRANGE'.");
30 "perimeter_ext",
"Name to give the external application perimeter post-processor");
32 "heat_flux_is_inward",
33 "Set to true if the transferred heat flux corresponds to the inward direction on the heat "
34 "structure boundary; else the outward direction");
36 params.
addClassDescription(
"Heat structure boundary condition to apply a heat flux transferred "
37 "from another application.");
44 _heat_flux_name(getParam<VariableName>(
"heat_flux_name")),
45 _perimeter_ext_pp_name(getParam<PostprocessorName>(
"perimeter_ext"))
55 checkComponentOfTypeExistsByName<HeatStructureCylindricalBase>(
_hs_name);
58 if (hasComponentByName<Component2D>(
_hs_name))
67 logError(
"The boundaries in 'boundary' must be of an inner/outer type, not of a "
77 const std::vector<SubdomainName> & subdomain_names =
80 const auto fe_type = getParam<bool>(
"heat_flux_is_monomial") ?
libMesh::FEType(CONSTANT, MONOMIAL)
90 const std::string class_name =
"Receiver";
97 const std::string class_name =
"FunctorNeumannBC";
99 params.
set<std::vector<BoundaryName>>(
"boundary") =
_boundary;
103 params.
set<
bool>(
"flux_is_inward") = getParam<bool>(
"heat_flux_is_inward");
108 const FunctionName scale_fn_name =
genName(
name(),
"scale_fn");
110 const std::string class_name =
"ParsedFunction";
112 params.
set<std::string>(
"expression") =
"sign * P";
113 params.
set<std::vector<std::string>>(
"symbol_names") = {
"sign",
"P"};
114 if (getParam<bool>(
"heat_flux_is_inward"))
123 const std::string class_name =
"SideIntegralFunctorPostprocessor";
125 params.
set<std::vector<BoundaryName>>(
"boundary") =
_boundary;
127 params.
set<MooseFunctorName>(
"prefactor") = scale_fn_name;
registerMooseObject("ThermalHydraulicsApp", HSBoundaryExternalAppHeatFlux)
const ExecFlagType EXEC_TIMESTEP_END
const ExecFlagType EXEC_INITIAL
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
void logError(Args &&... args) const
Logs an error.
THMProblem & getTHMProblem() const
Gets the THM problem.
Factory & _factory
The Factory associated with the MooseApp.
virtual void addFunction(const std::string &type, const std::string &name, InputParameters ¶meters)
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters ¶meters)
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
InputParameters getValidParams(const std::string &name) const
Heat structure boundary condition to apply a heat flux transferred from another application.
virtual void addMooseObjects() override
HSBoundaryExternalAppHeatFlux(const InputParameters ¶ms)
const VariableName & _heat_flux_name
Heat flux variable name.
const PostprocessorName & _perimeter_ext_pp_name
External app perimeter post-processor name.
virtual void check() const override
Check the component integrity.
static InputParameters validParams()
virtual void addVariables() override
Base class for heat structure boundary components.
bool hasCommonComponent2DExternalBoundaryType() const
Returns true if all of the boundaries have the same external boundary type.
const std::vector< BoundaryName > & _boundary
Boundary names for which the boundary component applies.
bool allComponent2DBoundariesAreExternal() const
Returns true if all of the boundaries are external.
void checkAllComponent2DBoundariesAreExternal() const
Logs an error if any boundary is not external.
static InputParameters validParams()
const std::string & _hs_name
Heat structure name.
Component2D::ExternalBoundaryType getCommonComponent2DExternalBoundaryType() const
Gets the common external boundary type.
virtual void check() const override
Check the component integrity.
static const std::string TEMPERATURE
Interface class for heat structure components.
const GeometricalComponent & getGeometricalComponent() const
Gets the geometrical component inheriting from this interface.
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.
std::string genSafeName(const std::string &prefix, const std::string &middle, const std::string &suffix="") const
Build a name from strings that is safe to use in input files (i.e.
void addSimVariable(bool nl, const VariableName &name, libMesh::FEType fe_type, Real scaling_factor=1.0)
Queues a variable of type MooseVariableScalar to be added to the nonlinear or aux system.