https://mooseframework.inl.gov
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. More...
 
virtual void setOmegaDofs (const MooseVariableScalar *omega_var)
 
virtual void setupJunctionData (std::vector< dof_id_type > &scalar_dofs)
 Stores data associated with a junction component. More...
 

Protected Attributes

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

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 }
unsigned int _n_shaft_eq
Number of equation in the shaft component.
std::vector< dof_id_type > _omega_dof
Degrees of freedom for omega variable (from shaft)
const MooseObject * _moose_object
Associated MOOSE object.

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.

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

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.

◆ setOmegaDofs()

void ADShaftConnectableUserObjectInterface::setOmegaDofs ( const MooseVariableScalar omega_var)
protectedvirtual

Definition at line 72 of file ADShaftConnectableUserObjectInterface.C.

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

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 override
virtual const std::vector< dof_id_type > & dofIndices() const
std::vector< dof_id_type > _omega_dof
Degrees of freedom for omega variable (from shaft)

◆ setupConnections()

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

Definition at line 57 of file ADShaftConnectableUserObjectInterface.C.

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

59 {
60  _n_connections = n_connections;
61  _n_flow_eq = n_flow_eq;
62 }
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.

◆ 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.

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

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

◆ 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: