https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ShaftConnectedMotorUserObject.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
11#include "Function.h"
12
14
17{
20 params.addRequiredParam<FunctionName>("torque", "Torque as a function of shaft speed");
21 params.addRequiredParam<FunctionName>("inertia",
22 "Moment of inertia as a function of shaft speed");
23 params.addRequiredCoupledVar("shaft_speed", "Shaft speed");
25 "Computes the torque and moment of inertia of a shaft connected motor");
26 return params;
27}
28
30 : GeneralUserObject(params),
32 _torque_fn(getFunction("torque")),
33 _inertia_fn(getFunction("inertia")),
34 _shaft_speed(coupledScalarValue("shaft_speed"))
35{
36}
37
38Real
43
44void
45ShaftConnectedMotorUserObject::getTorqueJacobianData(DenseMatrix<Real> & /*jacobian_block*/,
46 std::vector<dof_id_type> & /*dofs_j*/) const
47{
48}
49
50Real
55
56void
58 DenseMatrix<Real> & /*jacobian_block*/, std::vector<dof_id_type> & /*dofs_j*/) const
59{
60}
61
62void
66
67void
71
72void
registerMooseObject("ThermalHydraulicsApp", ShaftConnectedMotorUserObject)
virtual Real value(Real t, const Point &p) const
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Interface class for user objects that are connected to a shaft.
User object to provide data for a shaft-connected motor.
virtual void getMomentOfInertiaJacobianData(DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const override
virtual Real getTorque() const override
virtual Real getMomentOfInertia() const override
const VariableValue & _shaft_speed
Shaft speed.
const Function & _torque_fn
Torque as a function of shaft speed.
const Function & _inertia_fn
Moment of inertia as a function of shaft speed.
ShaftConnectedMotorUserObject(const InputParameters &params)
virtual void getTorqueJacobianData(DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const override