28 params.
set<std::vector<BoundaryName>>(
"connections") = {};
37 params.
addRequiredParam<std::vector<Real>>(
"tau_fr_coeff",
"Pump friction coefficients [N-m]");
40 params.
addRequiredParam<std::vector<Real>>(
"inertia_coeff",
"Pump inertia coefficients [kg-m^2]");
41 params.
addRequiredParam<FunctionName>(
"head",
"Function to compute data for pump head [-]");
43 "Function to compute data for pump torque [-]");
47 "Transition width for sign of the frictional torque at 0 speed over rated speed ratio.");
49 params.
addClassDescription(
"1-phase pump that must be connected to a Shaft component. Pump speed " 50 "is controlled by the connected shaft; Hydraulic torque and head are " 51 "computed by user input functions of inlet flow rate and shaft speed");
59 _inlet(getParam<BoundaryName>(
"inlet")),
60 _outlet(getParam<BoundaryName>(
"outlet")),
61 _omega_rated(getParam<
Real>(
"omega_rated")),
62 _volumetric_rated(getParam<
Real>(
"volumetric_rated")),
63 _head_rated(getParam<
Real>(
"head_rated")),
64 _torque_rated(getParam<
Real>(
"torque_rated")),
65 _density_rated(getParam<
Real>(
"density_rated")),
66 _speed_cr_fr(getParam<
Real>(
"speed_cr_fr")),
67 _tau_fr_const(getParam<
Real>(
"tau_fr_const")),
68 _tau_fr_coeff(getParam<
std::vector<
Real>>(
"tau_fr_coeff")),
69 _speed_cr_I(getParam<
Real>(
"speed_cr_I")),
70 _inertia_const(getParam<
Real>(
"inertia_const")),
71 _inertia_coeff(getParam<
std::vector<
Real>>(
"inertia_coeff")),
72 _head(getParam<FunctionName>(
"head")),
73 _torque_hydraulic(getParam<FunctionName>(
"torque_hydraulic")),
74 _head_var_name(junctionVariableName(
"head")),
75 _hydraulic_torque_var_name(junctionVariableName(
"hydraulic_torque")),
76 _friction_torque_var_name(junctionVariableName(
"friction_torque")),
77 _moi_var_name(junctionVariableName(
"moment_of_inertia")),
78 _transition_width(getParam<
Real>(
"transition_width"))
84 checkSizeEqualsValue<Real>(
"tau_fr_coeff", 4);
85 checkSizeEqualsValue<Real>(
"inertia_coeff", 4);
106 const std::string class_name =
"ADShaftConnectedPump1PhaseUserObject";
108 params.
set<
bool>(
"use_scalar_variables") =
false;
111 params.
set<std::vector<Real>>(
"normals") =
_normals;
139 params.
set<FunctionName>(
"head") =
_head;
141 params.
set<std::vector<VariableName>>(
"omega") = {omega_var_name};
142 params.
set<
Real>(
"A_ref") = getParam<Real>(
"A_ref");
143 params.
set<
Real>(
"K") = getParam<Real>(
"K");
145 params.
set<std::string>(
"pump_name") =
cname();
146 params.
set<
bool>(
"apply_velocity_scaling") = getParam<bool>(
"apply_velocity_scaling");
177 const std::vector<std::pair<std::string, VariableName>> quantities = {
182 for (
const auto & quantity_and_name : quantities)
184 const std::string class_name =
"ShaftConnectedPump1PhaseAux";
186 params.
set<AuxVariableName>(
"variable") = quantity_and_name.second;
187 params.
set<
MooseEnum>(
"quantity") = quantity_and_name.first;
189 const std::string obj_name =
genName(
name(), quantity_and_name.first +
"_aux");
const FunctionName & _head
Name of function to compute data for pump head.
virtual void addVariables() override
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 _shaft_name
Name of the shaft component.
const VariableName _rhoV_var_name
rho*V variable name for junction
const std::vector< processor_id_type > & getConnectedProcessorIDs()
Gets the processor IDs of the connected 1D components.
static InputParameters validParams()
static const std::string AREA
THMProblem & getTHMProblem() const
Gets the THM problem.
const VariableName _rhovV_var_name
rho*v*V variable name for junction
const Real & _speed_cr_I
Pump speed threshold for inertia.
const VariableName _head_var_name
Name of pump head variable.
InputParameters getValidParams(const std::string &name) const
const std::string & cname() const
Get the component name.
const std::vector< Real > & _tau_fr_coeff
Pump friction coefficients.
const VariableName _hydraulic_torque_var_name
Name of pump hydraulic torque variable.
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
static InputParameters validParams()
const VariableName _rhowV_var_name
rho*w*V variable name for junction
bool isRestarting() const
const Real & _omega_rated
Rated pump speed.
virtual void checkShaftConnection(const Component *const component) const
std::vector< BoundaryName > _boundary_names
Boundary names of connected components.
void addConnection(const BoundaryName &boundary_name)
Adds a connection for this component.
virtual void addVariables() override
ExecFlagEnum getDefaultExecFlagEnum()
Component that connects torque of turbomachinery components.
virtual void check() const override
Check the component integrity.
virtual void addMooseObjects() override
const Real & _speed_cr_fr
Pump speed threshold for friction.
const std::string & name() const
void addJunctionIC(const VariableName &var, Real value)
Adds a junction IC to the problem, as a scalar or field variable.
1-phase pump that must be connected to a Shaft component
const BoundaryName & _inlet
Pump inlet.
static const std::string RHOUA
std::vector< UserObjectName > _numerical_flux_names
virtual void check() const override
Check the component integrity.
const std::vector< Real > & _inertia_coeff
Pump inertia coefficients.
static InputParameters validParams()
const Real & _tau_fr_const
Pump friction constant.
static const std::string RHOA
virtual void addMooseObjects() override
const Real & _torque_rated
Rated pump torque.
Base class for THM components.
const Real & _transition_width
Transition width for the sign of the frictional torque when speed is 0.
const Real & _head_rated
Rated pump head.
const Real & _density_rated
Rated pump density.
const Real _volume
Volume of the junction.
VariableName _moment_of_inertia_var_name
Moment of inertia variable name.
void addJunctionVariable(bool is_nonlinear, const VariableName &var, Real scaling_factor=1.0)
Adds a junction variable to the problem, as a scalar or field variable.
const ExecFlagType EXEC_LINEAR
Junction between 1-phase flow channels that has a non-zero volume.
const ExecFlagType EXEC_NONLINEAR
registerMooseObject("ThermalHydraulicsApp", ShaftConnectedPump1Phase)
const std::string _junction_uo_name
Name of junction user object name, if any.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual VariableName getOmegaVariableName() const
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.
Interface class for components that connect to a shaft.
UserObjectName _fp_name
Fluid property user object name.
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters ¶meters)
const BoundaryName & _outlet
Pump outlet.
static const Real gravity_const
static const std::string RHOEA
const VariableName _rhouV_var_name
rho*u*V variable name for junction
virtual void buildVolumeJunctionUserObject() override
Builds user object for computing and storing the fluxes.
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
std::vector< Real > _normals
Outward normals associated with connected components.
const VariableName _friction_torque_var_name
Name of pump friction torque variable.
std::vector< RealVectorValue > _directions
Directions of connected components.
const FunctionName & _torque_hydraulic
Name of function to compute data for pump torque.
const VariableName _rhoEV_var_name
rho*E*V variable name for junction
ShaftConnectedPump1Phase(const InputParameters ¶ms)
virtual UserObjectName getShaftConnectedUserObjectName() const override
const Real & _inertia_const
Pump inertia constant.
subdomain_id_type _junction_subdomain_id
Junction subdomain ID.
const Real & _volumetric_rated
Rated pump volumetric flow rate.
const ExecFlagType EXEC_INITIAL