https://mooseframework.inl.gov
ShaftConnectedCompressor1PhaseAux.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 ShaftConnectedCompressor1Phase.");
21 
22  MooseEnum quantity(
23  "delta_p isentropic_torque dissipation_torque friction_torque moment_of_inertia");
24  params.addRequiredParam<MooseEnum>("quantity", quantity, "Which quantity to compute");
25  params.addRequiredParam<UserObjectName>("compressor_uo", "Compressor user object name");
26 
27  return params;
28 }
29 
31  const InputParameters & parameters)
32  : AuxKernel(parameters),
33  _quantity(this->template getParam<MooseEnum>("quantity").template getEnum<Quantity>()),
34  _compressor_uo(
35  this->template getUserObject<ADShaftConnectedCompressor1PhaseUserObject>("compressor_uo"))
36 {
37 }
38 
39 Real
41 {
42  switch (_quantity)
43  {
44  case Quantity::DELTA_P:
46  break;
49  break;
52  break;
55  break;
58  break;
59  default:
60  mooseError("Invalid 'quantity' parameter.");
61  }
62 }
ShaftConnectedCompressor1PhaseAux(const InputParameters &parameters)
registerMooseObject("ThermalHydraulicsApp", ShaftConnectedCompressor1PhaseAux)
ADReal getDissipationTorque() const
Dissipation torque computed in the 1-phase shaft-connected compressor.
Computes various quantities for a ShaftConnectedCompressor1Phase.
auto raw_value(const Eigen::Map< T > &in)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const Quantity _quantity
Which quantity to compute.
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected compressor.
ADReal getIsentropicTorque() const
Isentropic torque computed in the 1-phase shaft-connected compressor.
const ADShaftConnectedCompressor1PhaseUserObject & _compressor_uo
1-phase shaft-connected compressor user object
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Computes and caches flux and residual vectors for a 1-phase compressor.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
ADReal getCompressorDeltaP() const
Compressor head computed in the 1-phase shaft-connected compressor.