https://mooseframework.inl.gov
ShaftConnectedTurbine1PhaseAux.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 
14 
17 {
19 
20  params.addClassDescription("Computes various quantities for a ShaftConnectedTurbine1Phase.");
21 
22  MooseEnum quantity(
23  "delta_p flow_coefficient driving_torque friction_torque moment_of_inertia power");
24  params.addRequiredParam<MooseEnum>("quantity", quantity, "Which quantity to compute");
25  params.addRequiredParam<UserObjectName>("turbine_uo", "Turbine user object name");
26 
27  return params;
28 }
29 
31  : AuxKernel(parameters),
32  _quantity(this->template getParam<MooseEnum>("quantity").template getEnum<Quantity>()),
33  _turbine_uo(this->template getUserObject<ADShaftConnectedTurbine1PhaseUserObject>("turbine_uo"))
34 {
35 }
36 
37 Real
39 {
40  switch (_quantity)
41  {
42  case Quantity::DELTA_P:
44  break;
47  break;
50  break;
53  break;
56  break;
57  case Quantity::POWER:
59  break;
60  default:
61  mooseError("Invalid 'quantity' parameter.");
62  }
63 }
registerMooseObject("ThermalHydraulicsApp", ShaftConnectedTurbine1PhaseAux)
const Quantity _quantity
Which quantity to compute.
ADReal getTurbinePower() const
Turbine power computed in the 1-phase shaft-connected turbine.
Computes various quantities for a ShaftConnectedTurbine1Phase.
auto raw_value(const Eigen::Map< T > &in)
ShaftConnectedTurbine1PhaseAux(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
ADReal getFlowCoefficient() const
Flow coefficient computed in the 1-phase shaft-connected turbine.
const ADShaftConnectedTurbine1PhaseUserObject & _turbine_uo
1-phase shaft-connected turbine user object
ADReal getTurbineDeltaP() const
Turbine head computed in the 1-phase shaft-connected turbine.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected turbine.
static InputParameters validParams()
Computes and caches flux and residual vectors for a 1-phase turbine.
ADReal getDrivingTorque() const
Driving torque computed in the 1-phase shaft-connected turbine.