https://mooseframework.inl.gov
ShaftConnectedPump1PhaseAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
12 
13 registerMooseObject("ThermalHydraulicsApp", ShaftConnectedPump1PhaseAux);
14 
17 {
19 
20  params.addClassDescription("Computes various quantities for a ShaftConnectedPump1Phase.");
21 
22  MooseEnum quantity("pump_head hydraulic_torque friction_torque moment_of_inertia");
23  params.addRequiredParam<MooseEnum>("quantity", quantity, "Which quantity to compute");
24  params.addRequiredParam<UserObjectName>("pump_uo", "Pump user object name");
25 
26  return params;
27 }
28 
30  : AuxKernel(parameters),
31  _quantity(this->template getParam<MooseEnum>("quantity").template getEnum<Quantity>()),
32  _pump_uo(this->template getUserObject<ADShaftConnectedPump1PhaseUserObject>("pump_uo"))
33 {
34 }
35 
36 Real
38 {
39  switch (_quantity)
40  {
43  break;
46  break;
49  break;
52  break;
53  default:
54  mooseError("Invalid 'quantity' parameter.");
55  }
56 }
registerMooseObject("ThermalHydraulicsApp", ShaftConnectedPump1PhaseAux)
Computes various quantities for a ShaftConnectedPump1Phase.
auto raw_value(const Eigen::Map< T > &in)
Computes and caches flux and residual vectors for a 1-phase pump.
void addRequiredParam(const std::string &name, const std::string &doc_string)
const Quantity _quantity
Which quantity to compute.
ShaftConnectedPump1PhaseAux(const InputParameters &parameters)
const ADShaftConnectedPump1PhaseUserObject & _pump_uo
1-phase shaft-connected pump user object
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected pump.
ADReal getPumpHead() const
Pump head computed in the 1-phase shaft-connected pump.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ADReal getHydraulicTorque() const
Hydraulic torque computed in the 1-phase shaft-connected pump.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()