50 std::vector<dof_id_type> & dofs_j)
const
52 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
59 dofs_j.resize(n_dofs);
67 for (
unsigned int j = 0; j <
_scalar_dofs.size(); j++, k++)
93 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
100 dofs_j.resize(n_dofs);
108 for (
unsigned int j = 0; j <
_scalar_dofs.size(); j++, k++)
126 unsigned int n_flow_eq)
137 const std::vector<std::vector<std::vector<Real>>> & phi_face_values,
138 const std::vector<std::vector<dof_id_type>> & flow_channel_dofs)
148 mooseAssert(dofs.size() == 1,
149 "There should be exactly 1 coupled DoF index for the variable '" + omega_var->
name() +
const std::string & name() const
virtual const std::vector< dof_id_type > & dofIndices() const
Interface class for user objects that are connected to a shaft.
DenseMatrix< Real > _moi_jacobian_scalar_vars
Jacobian entries of moment of inertia wrt to omega scalar variables (from junction)
std::vector< dof_id_type > _scalar_dofs
Degrees of freedom for scalar variables (from junction)
static InputParameters validParams()
virtual void setupConnections(unsigned int n_connections, unsigned int n_flow_eq)
virtual void computeTorqueScalarJacobianWRTFlowDofs(const DenseMatrix< Real > &jac, const unsigned int &c)
virtual void setOmegaDofs(const MooseVariableScalar *omega_var)
DenseMatrix< Real > _torque_jacobian_scalar_vars
Jacobian entries of torque wrt to scalar variables (from junction)
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
Real _moment_of_inertia
Moment of inertia.
ShaftConnectableUserObjectInterface(const MooseObject *moose_object)
virtual void computeMomentOfInertiaScalarJacobianWRTFlowDofs(const DenseMatrix< Real > &jac, const unsigned int &c)
std::vector< DenseMatrix< Real > > _torque_jacobian_flow_channel_vars
Cached scalar residual Jacobian matrices w.r.t.
DenseMatrix< Real > _moi_jacobian_omega_var
Jacobian entries of moment of inertia wrt to omega variable (from shaft)
std::vector< dof_id_type > _omega_dof
Degrees of freedom for omega variable (from shaft)
virtual void setConnectionData(const std::vector< std::vector< std::vector< Real > > > &phi_face_values, const std::vector< std::vector< dof_id_type > > &flow_channel_dofs)
Stores data computed by a volume-junction-like object associated with the conection.
virtual Real getMomentOfInertia() const
virtual Real getTorque() const
unsigned int _n_shaft_eq
Number of equation in the shaft component.
virtual void setupJunctionData(std::vector< dof_id_type > &scalar_dofs)
Stores data associated with a junction component.
std::vector< std::vector< std::vector< Real > > > _phi_face_values
Side shape function value (i.e. side from the flow channels)
std::vector< DenseMatrix< Real > > _moi_jacobian_flow_channel_vars
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.
virtual void threadJoin(const UserObject &uo)
virtual void getMomentOfInertiaJacobianData(DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
virtual void getTorqueJacobianData(DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const
DenseMatrix< Real > _torque_jacobian_omega_var
Jacobian entries of torque wrt to omega variable (from shaft)
Real _torque
Total torque.
virtual void initialize()
void resize(const unsigned int new_m, const unsigned int new_n)