https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ShaftConnectable Class Reference

Interface class for components that connect to a shaft. More...

#include <ShaftConnectable.h>

Inheritance diagram for ShaftConnectable:
[legend]

Public Member Functions

 ShaftConnectable (const Component *const component)
 
virtual void checkShaftConnection (const Component *const component) const
 
virtual VariableName getMomentofInertiaVariableName () const
 
virtual VariableName getTorqueVariableName () const
 
virtual UserObjectName getShaftConnectedUserObjectName () const
 
virtual void setShaftName (const std::string &name) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Attributes

VariableName _moment_of_inertia_var_name
 Moment of inertia variable name. More...
 
VariableName _torque_var_name
 Torque of variable name. More...
 
UserObjectName _user_object_name
 Shaft-connectable user object name. More...
 
std::string _shaft_name
 Name of the shaft component. More...
 
bool _connected_to_shaft
 Flag indicating that a shaft has this component connected. More...
 

Detailed Description

Interface class for components that connect to a shaft.

Definition at line 19 of file ShaftConnectable.h.

Constructor & Destructor Documentation

◆ ShaftConnectable()

ShaftConnectable::ShaftConnectable ( const Component *const  component)

Definition at line 20 of file ShaftConnectable.C.

21  : _moment_of_inertia_var_name(component->genName(component->name(), "moment_of_inertia")),
22  _torque_var_name(component->genName(component->name(), "torque")),
23  _user_object_name(component->genName(component->name(), "shaftconnected_uo")),
24  _connected_to_shaft(false)
25 {
26 }
UserObjectName _user_object_name
Shaft-connectable user object name.
bool _connected_to_shaft
Flag indicating that a shaft has this component connected.
static const std::string component
Definition: NS.h:153
VariableName _moment_of_inertia_var_name
Moment of inertia variable name.
VariableName _torque_var_name
Torque of variable name.

Member Function Documentation

◆ checkShaftConnection()

void ShaftConnectable::checkShaftConnection ( const Component *const  component) const
virtual

Definition at line 29 of file ShaftConnectable.C.

Referenced by ShaftConnectedMotor::check(), ShaftConnectedTurbine1Phase::check(), ShaftConnectedPump1Phase::check(), and ShaftConnectedCompressor1Phase::check().

30 {
32  component->logError("This component must be connected to a shaft.");
33 }
bool _connected_to_shaft
Flag indicating that a shaft has this component connected.
static const std::string component
Definition: NS.h:153

◆ getMomentofInertiaVariableName()

VariableName ShaftConnectable::getMomentofInertiaVariableName ( ) const
virtual

Definition at line 36 of file ShaftConnectable.C.

37 {
39 }
VariableName _moment_of_inertia_var_name
Moment of inertia variable name.

◆ getShaftConnectedUserObjectName()

UserObjectName ShaftConnectable::getShaftConnectedUserObjectName ( ) const
virtual

Reimplemented in ShaftConnectedCompressor1Phase, ShaftConnectedPump1Phase, and ShaftConnectedTurbine1Phase.

Definition at line 48 of file ShaftConnectable.C.

Referenced by ShaftConnectedMotor::addMooseObjects().

49 {
50  return _user_object_name;
51 }
UserObjectName _user_object_name
Shaft-connectable user object name.

◆ getTorqueVariableName()

VariableName ShaftConnectable::getTorqueVariableName ( ) const
virtual

Definition at line 42 of file ShaftConnectable.C.

43 {
44  return _torque_var_name;
45 }
VariableName _torque_var_name
Torque of variable name.

◆ setShaftName()

void ShaftConnectable::setShaftName ( const std::string &  name) const
virtual

Definition at line 54 of file ShaftConnectable.C.

Referenced by Shaft::init().

55 {
56  _shaft_name = name;
57  _connected_to_shaft = true;
58 }
bool _connected_to_shaft
Flag indicating that a shaft has this component connected.
std::string _shaft_name
Name of the shaft component.
const std::string name
Definition: Setup.h:20

◆ validParams()

InputParameters ShaftConnectable::validParams ( )
static

Member Data Documentation

◆ _connected_to_shaft

bool ShaftConnectable::_connected_to_shaft
mutableprotected

Flag indicating that a shaft has this component connected.

Definition at line 40 of file ShaftConnectable.h.

Referenced by checkShaftConnection(), and setShaftName().

◆ _moment_of_inertia_var_name

VariableName ShaftConnectable::_moment_of_inertia_var_name
protected

◆ _shaft_name

std::string ShaftConnectable::_shaft_name
mutableprotected

◆ _torque_var_name

VariableName ShaftConnectable::_torque_var_name
protected

Torque of variable name.

Definition at line 34 of file ShaftConnectable.h.

Referenced by getTorqueVariableName().

◆ _user_object_name

UserObjectName ShaftConnectable::_user_object_name
protected

Shaft-connectable user object name.

Definition at line 36 of file ShaftConnectable.h.

Referenced by getShaftConnectedUserObjectName().


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