https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADShaftConnectedPump1PhaseUserObject.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
15
18
29{
30public:
32
33 virtual void initialSetup() override;
34 virtual void initialize() override;
35 virtual void execute() override;
36
42 ADReal getPumpHead() const;
43
44 virtual void finalize() override;
45 virtual void threadJoin(const UserObject & uo) override;
46
47protected:
48 virtual void computeFluxesAndResiduals(const unsigned int & c) override;
49
51 Point _di_out;
53 const Real & _g;
55 const Real & _omega_rated;
57 const Real & _volumetric_rated;
59 const Real & _head_rated;
61 const Real & _torque_rated;
63 const Real & _density_rated;
65 const Real & _speed_cr_fr;
67 const Real & _tau_fr_const;
69 const std::vector<Real> & _tau_fr_coeff;
71 const Real & _speed_cr_I;
73 const Real & _inertia_const;
75 const std::vector<Real> & _inertia_coeff;
77 const Function & _head;
81 const std::string & _pump_name;
85 const Real & _transition_width;
88
95
97 std::vector<DenseMatrix<Real>> _residual_jacobian_omega_var;
98
99public:
101};
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 pump.
ADReal getHydraulicTorque() const
Hydraulic torque computed in the 1-phase shaft-connected pump.
const Real & _transition_width
Transition width for the sign of the frictional torque when speed is 0.
const ADWeightedTransition _transition_friction
Transition for the sign of the frictional torque when speed is 0.
std::vector< DenseMatrix< Real > > _residual_jacobian_omega_var
Jacobian entries of junction variables wrt shaft variables.
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected pump.
const std::vector< Real > & _inertia_coeff
Pump inertia coefficients.
virtual void threadJoin(const UserObject &uo) override
const Real & _volumetric_rated
Rated pump volumetric flow rate.
ADReal getPumpHead() const
Pump head computed in the 1-phase shaft-connected pump.
const Function & _head
Function to compute data for pump head.
const Real & _speed_cr_fr
Pump speed threshold for friction.
const Real & _speed_cr_I
Pump speed threshold for inertia.
virtual void computeFluxesAndResiduals(const unsigned int &c) override
Computes and stores the fluxes, the scalar residuals, and their Jacobians.
const Function & _torque_hydraulic
Function to compute data for pump torque.
const std::vector< Real > & _tau_fr_coeff
Pump friction coefficients.
Computes and caches flux and residual vectors for a 1-phase volume junction.
Weighted transition between two functions of one variable.
Common class for single phase fluid properties.
VariableValueTempl< true > ADVariableValue