https://mooseframework.inl.gov
ADShaftConnectedTurbine1PhaseUserObject.h
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 
10 #pragma once
11 
14 
17 
28 {
29 public:
31 
32  virtual void initialSetup() override;
33  virtual void initialize() override;
34  virtual void execute() override;
35 
37  ADReal getDrivingTorque() const;
39  ADReal getFlowCoefficient() const;
41  ADReal getFrictionTorque() const;
43  ADReal getTurbineDeltaP() const;
45  ADReal getTurbinePower() const;
46 
47  virtual void finalize() override;
48  virtual void threadJoin(const UserObject & uo) override;
49 
50 protected:
51  virtual void computeFluxesAndResiduals(const unsigned int & c) override;
52 
54  Point _di_out;
56  const Real & _omega_rated;
58  const Real & _D_wheel;
60  const Real & _speed_cr_fr;
64  const std::vector<Real> & _tau_fr_coeff;
66  const Real & _speed_cr_I;
70  const std::vector<Real> & _inertia_coeff;
75 
77  const std::string & _turbine_name;
80 
91 
93  std::vector<DenseMatrix<Real>> _residual_jacobian_omega_var;
94 
95 public:
97 };
const Real & _speed_cr_I
Turbine speed threshold for inertia.
const std::vector< Real > & _tau_fr_coeff
Turbine friction coefficients.
ADReal _flow_coeff
Turbine flow coefficient - independent variable in user supplied head and power functions.
ADReal getTurbinePower() const
Turbine power computed in the 1-phase shaft-connected turbine.
const ADVariableValue & _omega
Connected shaft speed.
virtual void threadJoin(const UserObject &uo) override
const Real & _speed_cr_fr
Turbine speed threshold for friction.
const std::vector< Real > & _inertia_coeff
Turbine inertia coefficients.
ADReal getFlowCoefficient() const
Flow coefficient computed in the 1-phase shaft-connected turbine.
std::vector< DenseMatrix< Real > > _residual_jacobian_omega_var
Jacobian entries of junction variables wrt shaft variables.
Common class for single phase fluid properties.
Base class for computing numerical fluxes for FlowModelSinglePhase.
ADReal getTurbineDeltaP() const
Turbine head computed in the 1-phase shaft-connected turbine.
virtual void computeFluxesAndResiduals(const unsigned int &c) override
Computes and stores the fluxes, the scalar residuals, and their Jacobians.
Computes and caches flux and residual vectors for a 1-phase volume junction.
Interface class for user objects that are connected to a shaft.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected turbine.
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.
const Function & _power_coefficient
Function to compute data for turbine power.
const Function & _head_coefficient
Function to compute data for turbine head.