https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADShaftConnectableUserObjectInterface Class Reference

Interface class for user objects that are connected to a shaft. More...

#include <ADShaftConnectableUserObjectInterface.h>

Inheritance diagram for ADShaftConnectableUserObjectInterface:
[legend]

Public Member Functions

 ADShaftConnectableUserObjectInterface (const MooseObject *moose_object)
 
virtual void initialize ()
 
virtual void execute ()
 
virtual void finalize ()
 
virtual void threadJoin (const UserObject &uo)
 
virtual ADReal getTorque () const
 
virtual ADReal getMomentOfInertia () const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void setupConnections (unsigned int n_connections, unsigned int n_flow_eq)
 
virtual void setConnectionData (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 void setOmegaDofs (const MooseVariableScalar *omega_var)
 
virtual void setupJunctionData (std::vector< dof_id_type > &scalar_dofs)
 Stores data associated with a junction component.
 

Protected Attributes

const MooseObject_moose_object
 Associated MOOSE object.
 
unsigned int _n_shaft_eq
 Number of equation in the shaft component.
 
unsigned int _n_connections
 Number of flow channels the shaft connected component is attached to.
 
unsigned int _n_flow_eq
 Number of flow variables in connected flow channels.
 
std::vector< dof_id_type_omega_dof
 Degrees of freedom for omega variable (from shaft)
 
std::vector< dof_id_type_scalar_dofs
 Degrees of freedom for scalar variables (from junction)
 
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
 Degrees of freedom for flow channel variables, for each connection.
 
ADReal _torque
 Total torque.
 
ADReal _moment_of_inertia
 Moment of inertia.
 

Detailed Description

Interface class for user objects that are connected to a shaft.

Definition at line 22 of file ADShaftConnectableUserObjectInterface.h.

Constructor & Destructor Documentation

◆ ADShaftConnectableUserObjectInterface()

ADShaftConnectableUserObjectInterface::ADShaftConnectableUserObjectInterface ( const MooseObject moose_object)

Definition at line 25 of file ADShaftConnectableUserObjectInterface.C.

27 : _moose_object(moose_object), _n_shaft_eq(1)
28{
29 _omega_dof.resize(_n_shaft_eq);
30}
const MooseObject * _moose_object
Associated MOOSE object.
std::vector< dof_id_type > _omega_dof
Degrees of freedom for omega variable (from shaft)
unsigned int _n_shaft_eq
Number of equation in the shaft component.

Member Function Documentation

◆ execute()

void ADShaftConnectableUserObjectInterface::execute ( )
virtual

◆ finalize()

void ADShaftConnectableUserObjectInterface::finalize ( )
virtual

◆ getMomentOfInertia()

ADReal ADShaftConnectableUserObjectInterface::getMomentOfInertia ( ) const
virtual

◆ getTorque()

ADReal ADShaftConnectableUserObjectInterface::getTorque ( ) const
virtual

◆ initialize()

void ADShaftConnectableUserObjectInterface::initialize ( )
virtual

◆ setConnectionData()

void ADShaftConnectableUserObjectInterface::setConnectionData ( const std::vector< std::vector< dof_id_type > > &  flow_channel_dofs)
protectedvirtual

Stores data computed by a volume-junction-like object associated with the conection.

Definition at line 65 of file ADShaftConnectableUserObjectInterface.C.

67{
68 _flow_channel_dofs = flow_channel_dofs;
69}
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.

Referenced by ADShaftConnectedCompressor1PhaseUserObject::execute(), ADShaftConnectedPump1PhaseUserObject::execute(), and ADShaftConnectedTurbine1PhaseUserObject::execute().

◆ setOmegaDofs()

void ADShaftConnectableUserObjectInterface::setOmegaDofs ( const MooseVariableScalar omega_var)
protectedvirtual

Definition at line 72 of file ADShaftConnectableUserObjectInterface.C.

73{
74 auto && dofs = omega_var->dofIndices();
75 mooseAssert(dofs.size() == 1,
76 "There should be exactly 1 coupled DoF index for the variable '" + omega_var->name() +
77 "'.");
78 _omega_dof = dofs;
79}
const std::string & name() const
virtual const std::vector< dof_id_type > & dofIndices() const

Referenced by ADShaftConnectedCompressor1PhaseUserObject::finalize(), ADShaftConnectedPump1PhaseUserObject::finalize(), and ADShaftConnectedTurbine1PhaseUserObject::finalize().

◆ setupConnections()

void ADShaftConnectableUserObjectInterface::setupConnections ( unsigned int  n_connections,
unsigned int  n_flow_eq 
)
protectedvirtual

Definition at line 57 of file ADShaftConnectableUserObjectInterface.C.

59{
60 _n_connections = n_connections;
61 _n_flow_eq = n_flow_eq;
62}
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.

Referenced by ADShaftConnectedCompressor1PhaseUserObject::initialSetup(), ADShaftConnectedPump1PhaseUserObject::initialSetup(), and ADShaftConnectedTurbine1PhaseUserObject::initialSetup().

◆ setupJunctionData()

void ADShaftConnectableUserObjectInterface::setupJunctionData ( std::vector< dof_id_type > &  scalar_dofs)
protectedvirtual

Stores data associated with a junction component.

Definition at line 82 of file ADShaftConnectableUserObjectInterface.C.

83{
84 _scalar_dofs = scalar_dofs;
85}
std::vector< dof_id_type > _scalar_dofs
Degrees of freedom for scalar variables (from junction)

Referenced by ADShaftConnectedCompressor1PhaseUserObject::finalize(), ADShaftConnectedPump1PhaseUserObject::finalize(), and ADShaftConnectedTurbine1PhaseUserObject::finalize().

◆ threadJoin()

void ADShaftConnectableUserObjectInterface::threadJoin ( const UserObject uo)
virtual

◆ validParams()

InputParameters ADShaftConnectableUserObjectInterface::validParams ( )
static

Member Data Documentation

◆ _flow_channel_dofs

std::vector<std::vector<dof_id_type> > ADShaftConnectableUserObjectInterface::_flow_channel_dofs
protected

Degrees of freedom for flow channel variables, for each connection.

Definition at line 61 of file ADShaftConnectableUserObjectInterface.h.

Referenced by setConnectionData().

◆ _moment_of_inertia

ADReal ADShaftConnectableUserObjectInterface::_moment_of_inertia
protected

◆ _moose_object

const MooseObject* ADShaftConnectableUserObjectInterface::_moose_object
protected

Associated MOOSE object.

Definition at line 48 of file ADShaftConnectableUserObjectInterface.h.

Referenced by finalize().

◆ _n_connections

unsigned int ADShaftConnectableUserObjectInterface::_n_connections
protected

Number of flow channels the shaft connected component is attached to.

Definition at line 52 of file ADShaftConnectableUserObjectInterface.h.

Referenced by setupConnections().

◆ _n_flow_eq

unsigned int ADShaftConnectableUserObjectInterface::_n_flow_eq
protected

Number of flow variables in connected flow channels.

Definition at line 54 of file ADShaftConnectableUserObjectInterface.h.

Referenced by setupConnections().

◆ _n_shaft_eq

unsigned int ADShaftConnectableUserObjectInterface::_n_shaft_eq
protected

Number of equation in the shaft component.

Definition at line 50 of file ADShaftConnectableUserObjectInterface.h.

Referenced by ADShaftConnectableUserObjectInterface().

◆ _omega_dof

std::vector<dof_id_type> ADShaftConnectableUserObjectInterface::_omega_dof
protected

Degrees of freedom for omega variable (from shaft)

Definition at line 57 of file ADShaftConnectableUserObjectInterface.h.

Referenced by ADShaftConnectableUserObjectInterface(), and setOmegaDofs().

◆ _scalar_dofs

std::vector<dof_id_type> ADShaftConnectableUserObjectInterface::_scalar_dofs
protected

Degrees of freedom for scalar variables (from junction)

Definition at line 59 of file ADShaftConnectableUserObjectInterface.h.

Referenced by setupJunctionData().

◆ _torque

ADReal ADShaftConnectableUserObjectInterface::_torque
protected

The documentation for this class was generated from the following files: