21 params.
addRequiredParam<
bool>(
"on",
"Flag determining if turbine is operating or not [-]");
26 "Simple turbine model that extracts prescribed power from the working fluid");
33 _on(getParam<bool>(
"on")),
34 _power(getParam<
Real>(
"power")),
35 _W_dot_var_name(junctionVariableName(
"W_dot"))
54 const std::string class_name =
"ADSimpleTurbine1PhaseUserObject";
56 params.
set<
bool>(
"use_scalar_variables") =
false;
59 params.
set<std::vector<Real>>(
"normals") =
_normals;
63 params.
set<std::string>(
"component_name") =
name();
76 params.
set<
bool>(
"on") =
_on;
93 const std::string nm =
genName(
name(),
"W_dot_aux");
94 const std::string class_name =
"SimpleTurbinePowerFieldAux";
98 params.
set<
bool>(
"on") =
_on;
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.
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 const std::string AREA
THMProblem & getTHMProblem() const
Gets the THM problem.
const VariableName _rhovV_var_name
rho*v*V variable name for junction
const bool & _on
Flag that specifies if the turbine is operating or not.
InputParameters getValidParams(const std::string &name) const
virtual void addAuxKernel(const std::string &kernel_name, const std::string &name, InputParameters ¶meters)
const VariableName _rhowV_var_name
rho*w*V variable name for junction
Junction between 1-phase flow channels that are parallel.
std::vector< BoundaryName > _boundary_names
Boundary names of connected components.
virtual const std::string & name() const
ExecFlagEnum getDefaultExecFlagEnum()
static const std::string RHOUA
std::vector< UserObjectName > _numerical_flux_names
static const std::string RHOA
virtual void addMooseObjects() override
VariableName _W_dot_var_name
Variable name that holds power.
const Real _volume
Volume of the junction.
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
virtual void buildVolumeJunctionUserObject() override
Builds user object for computing and storing the fluxes.
Simple turbine model that extracts prescribed power from the working fluid.
static InputParameters validParams()
const Real & _A_ref
Reference area.
const ExecFlagType EXEC_NONLINEAR
static InputParameters validParams()
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
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.
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 Real & _K
Form loss coefficient.
registerMooseObject("ThermalHydraulicsApp", SimpleTurbine1Phase)
SimpleTurbine1Phase(const InputParameters ¶ms)
static const std::string RHOEA
const VariableName _rhouV_var_name
rho*u*V variable name for junction
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
const Real & _power
Turbine power [W].
std::vector< Real > _normals
Outward normals associated with connected components.
std::vector< RealVectorValue > _directions
Directions of connected components.
const VariableName _rhoEV_var_name
rho*E*V variable name for junction
virtual void addVariables() override
virtual void addMooseObjects() override
subdomain_id_type _junction_subdomain_id
Junction subdomain ID.
const ExecFlagType EXEC_INITIAL