https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
29public:
31
32 virtual void initialSetup() override;
33 virtual void initialize() override;
34 virtual void execute() override;
35
45 ADReal getTurbinePower() const;
46
47 virtual void finalize() override;
48 virtual void threadJoin(const UserObject & uo) override;
49
50protected:
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;
62 const Real & _tau_fr_const;
64 const std::vector<Real> & _tau_fr_coeff;
66 const Real & _speed_cr_I;
68 const Real & _inertia_const;
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
95public:
97};
DualNumber< Real, DNDerivativeType, true > ADReal
Base class for computing numerical fluxes for FlowModelSinglePhase.
Interface class for user objects that are connected to a shaft.
Computes and caches flux and residual vectors for a 1-phase turbine.
const std::vector< Real > & _inertia_coeff
Turbine inertia coefficients.
ADReal getTurbineDeltaP() const
Turbine head computed in the 1-phase shaft-connected turbine.
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected turbine.
const ADVariableValue & _omega
Connected shaft speed.
virtual void computeFluxesAndResiduals(const unsigned int &c) override
Computes and stores the fluxes, the scalar residuals, and their Jacobians.
ADReal _flow_coeff
Turbine flow coefficient - independent variable in user supplied head and power functions.
const Function & _power_coefficient
Function to compute data for turbine power.
ADReal getDrivingTorque() const
Driving torque computed in the 1-phase shaft-connected turbine.
const Real & _speed_cr_I
Turbine speed threshold for inertia.
const Real & _speed_cr_fr
Turbine speed threshold for friction.
ADReal getFlowCoefficient() const
Flow coefficient computed in the 1-phase shaft-connected turbine.
ADReal getTurbinePower() const
Turbine power computed in the 1-phase shaft-connected turbine.
virtual void threadJoin(const UserObject &uo) override
std::vector< DenseMatrix< Real > > _residual_jacobian_omega_var
Jacobian entries of junction variables wrt shaft variables.
const Function & _head_coefficient
Function to compute data for turbine head.
const std::vector< Real > & _tau_fr_coeff
Turbine friction coefficients.
Computes and caches flux and residual vectors for a 1-phase volume junction.
Common class for single phase fluid properties.
VariableValueTempl< true > ADVariableValue