https://mooseframework.inl.gov
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 
14 #include "ADWeightedTransition.h"
15 
18 
29 {
30 public:
32 
33  virtual void initialSetup() override;
34  virtual void initialize() override;
35  virtual void execute() override;
36 
38  ADReal getHydraulicTorque() const;
40  ADReal getFrictionTorque() const;
42  ADReal getPumpHead() const;
43 
44  virtual void finalize() override;
45  virtual void threadJoin(const UserObject & uo) override;
46 
47 protected:
48  virtual void computeFluxesAndResiduals(const unsigned int & c) override;
49 
51  Point _di_out;
53  const Real & _g;
55  const Real & _omega_rated;
59  const Real & _head_rated;
65  const Real & _speed_cr_fr;
69  const std::vector<Real> & _tau_fr_coeff;
71  const Real & _speed_cr_I;
75  const std::vector<Real> & _inertia_coeff;
77  const Function & _head;
81  const std::string & _pump_name;
88 
95 
97  std::vector<DenseMatrix<Real>> _residual_jacobian_omega_var;
98 
99 public:
100  static InputParameters validParams();
101 };
const Function & _torque_hydraulic
Function to compute data for pump torque.
virtual void computeFluxesAndResiduals(const unsigned int &c) override
Computes and stores the fluxes, the scalar residuals, and their Jacobians.
const Real & _speed_cr_fr
Pump speed threshold for friction.
const ADWeightedTransition _transition_friction
Transition for the sign of the frictional torque when speed is 0.
Computes and caches flux and residual vectors for a 1-phase pump.
const Real & _volumetric_rated
Rated pump volumetric flow rate.
const std::vector< Real > & _tau_fr_coeff
Pump friction coefficients.
const Real & _tau_fr_const
Pump friction constant.
Weighted transition between two functions of one variable.
Common class for single phase fluid properties.
Base class for computing numerical fluxes for FlowModelSinglePhase.
const Real & _inertia_const
Pump inertia constant.
Computes and caches flux and residual vectors for a 1-phase volume junction.
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected pump.
ADReal getPumpHead() const
Pump head computed in the 1-phase shaft-connected pump.
std::vector< DenseMatrix< Real > > _residual_jacobian_omega_var
Jacobian entries of junction variables wrt shaft variables.
Interface class for user objects that are connected to a shaft.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< Real > & _inertia_coeff
Pump inertia coefficients.
const Real & _transition_width
Transition width for the sign of the frictional torque when speed is 0.
ADReal getHydraulicTorque() const
Hydraulic torque computed in the 1-phase shaft-connected pump.
virtual void threadJoin(const UserObject &uo) override
ADShaftConnectedPump1PhaseUserObject(const InputParameters &params)
const Real & _speed_cr_I
Pump speed threshold for inertia.
const Function & _head
Function to compute data for pump head.