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 =
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)
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.
Component2D::ExternalBoundaryType getCommonComponent2DExternalBoundaryType() const
Gets the common external boundary type.
THMProblem & getTHMProblem() const
Gets the THM problem.
virtual void addVariables() override
InputParameters getValidParams(const std::string &name) const
const std::string & _hs_name
Heat structure name.
const ExecFlagType EXEC_TIMESTEP_END
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.
virtual const std::string & name() const
virtual void addBoundaryCondition(const std::string &bc_name, const std::string &name, InputParameters ¶meters)
void logError(Args &&... args) const
Logs an error.
Heat structure boundary condition to apply a heat flux transferred from another application.
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
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...
virtual void check() const override
Check the component integrity.
const PostprocessorName & _perimeter_ext_pp_name
External app perimeter post-processor name.
const std::vector< BoundaryName > & _boundary
Boundary names for which the boundary component applies.
static const std::string TEMPERATURE
bool hasCommonComponent2DExternalBoundaryType() const
Returns true if all of the boundaries have the same external boundary type.
virtual void addFunction(const std::string &type, const std::string &name, InputParameters ¶meters)
virtual void check() const override
Check the component integrity.
Interface class for heat structure components.
const VariableName & _heat_flux_name
Heat flux variable name.
HSBoundaryExternalAppHeatFlux(const InputParameters ¶ms)
static InputParameters validParams()
Factory & _factory
The Factory associated with the MooseApp.
virtual void addMooseObjects() override
const GeometricalComponent & getGeometricalComponent() const
Gets the geometrical component inheriting from this interface.
static InputParameters validParams()
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
void checkAllComponent2DBoundariesAreExternal() const
Logs an error if any boundary is not external.
Base class for heat structure boundary components.
bool allComponent2DBoundariesAreExternal() const
Returns true if all of the boundaries are external.
const ExecFlagType EXEC_INITIAL