21 params.
addRequiredParam<std::string>(
"power",
"Component that provides total power");
23 "power_fraction", 1.,
"Fraction of the total power that goes into the heat structure [-]");
24 params.
addParam<FunctionName>(
"power_shape_function",
"Axial power shape [-]");
32 _power_fraction(getParam<
Real>(
"power_fraction")),
33 _has_psf(isParamValid(
"power_shape_function")),
34 _power_shape_func(_has_psf ? getParam<FunctionName>(
"power_shape_function") :
"")
36 checkSizeGreaterThan<std::string>(
"regions", 0);
44 if (hasComponent<TotalPowerBase>(
"power"))
56 checkComponentOfTypeExists<TotalPowerBase>(
"power");
69 n_units = hs_base->getNumberOfUnits();
70 length = hs_base->getLength();
80 const bool is_cylindrical = hs_cyl !=
nullptr;
83 const bool is_plate = hs_plate !=
nullptr;
88 std::string class_name =
"ConstantFunction";
90 pars.
set<
Real>(
"value") = 1. / length;
94 const std::string power_shape_integral_name =
_has_psf 99 const std::string class_name =
100 is_cylindrical ?
"FunctionElementIntegralRZ" :
"FunctionElementIntegral";
119 const std::string class_name =
120 is_cylindrical ?
"ADHeatStructureHeatSourceRZ" :
"ADHeatStructureHeatSource";
124 pars.
set<
Real>(
"num_units") = n_units;
127 pars.
set<std::vector<VariableName>>(
"total_power") =
140 pars.
set<PostprocessorName>(
"power_shape_integral_pp") = power_shape_integral_name;
virtual Point getPosition() const
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.
HeatSourceFromTotalPower(const InputParameters ¶meters)
THMProblem & getTHMProblem() const
Gets the THM problem.
static InputParameters validParams()
virtual RealVectorValue getDirection() const
InputParameters getValidParams(const std::string &name) const
virtual void addMooseObjects() override
virtual void check() const override
Check the component integrity.
const Real & getDepth() const
Gets the depth of the plate.
virtual void addKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
virtual const std::string & name() const
virtual void init() override
Initializes the component.
static InputParameters validParams()
const Real & _power_fraction
The fraction of the power that goes into the heat structure.
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
Base class for cylindrical heat structure components.
Base class for components that provide total power.
const bool _has_psf
true if power shape function is being used
static const std::string TEMPERATURE
virtual void addFunction(const std::string &type, const std::string &name, InputParameters ¶meters)
virtual void init()
Initializes the component.
Interface class for heat structure components.
Base class for heat source components.
virtual const VariableName & getPowerVariableName() const
VariableName _power_var_name
The name of the variable that represents total power.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void check() const override
Check the component integrity.
Factory & _factory
The Factory associated with the MooseApp.
void connectObject(const InputParameters ¶ms, const std::string &mooseName, const std::string &name) const
Connect with control logic.
Component to model plate heat structure.
Base class for 2D generated heat structures.
FunctionName _power_shape_func
The name of the power shape function.
std::vector< SubdomainName > _subdomain_names
Names of the heat structure subdomains corresponding to the given regions.
registerMooseObject("ThermalHydraulicsApp", HeatSourceFromTotalPower)
Heat generation from total power.
const ExecFlagType EXEC_INITIAL