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

User object to provide data for a shaft-connected motor. More...

#include <ShaftConnectedMotorUserObject.h>

Inheritance diagram for ShaftConnectedMotorUserObject:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 ShaftConnectedMotorUserObject (const InputParameters &params)
 
virtual Real getTorque () const override
 
virtual void getTorqueJacobianData (DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const override
 
virtual Real getMomentOfInertia () const override
 
virtual void getMomentOfInertiaJacobianData (DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const override
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void finalize () override
 
SubProblemgetSubProblem () const
 
bool shouldDuplicateInitialExecution () const
 
virtual Real spatialValue (const Point &) const
 
virtual const std::vector< Point > spatialPoints () const
 
void gatherSum (T &value)
 
void gatherMax (T &value)
 
void gatherMin (T &value)
 
void gatherProxyValueMax (T1 &proxy, T2 &value)
 
void gatherProxyValueMin (T1 &proxy, T2 &value)
 
void setPrimaryThreadCopy (UserObject *primary)
 
UserObjectprimaryThreadCopy ()
 
std::set< UserObjectName > getDependObjects () const
 
virtual bool needThreadedCopy () const
 
const std::set< std::string > & getRequestedItems () override
 
const std::set< std::string > & getSuppliedItems () override
 
unsigned int systemNumber () const
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void timestepSetup ()
 
virtual void jacobianSetup ()
 
virtual void residualSetup ()
 
virtual void customSetup (const ExecFlagType &)
 
const ExecFlagEnumgetExecuteOnEnum () const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase *> > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
virtual void threadJoin (const UserObject &) override
 
virtual void threadJoin (const UserObject &) override
 
virtual void subdomainSetup () override
 
virtual void subdomainSetup () override
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
const FunctiongetFunction (const std::string &name) const
 
const FunctiongetFunctionByName (const FunctionName &name) const
 
bool hasFunction (const std::string &param_name) const
 
bool hasFunctionByName (const FunctionName &name) const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name, bool needs_broadcast) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const VectorPostprocessorValuegetVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name, bool needs_broadcast) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValue (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOld (const std::string &param_name, const std::string &vector_name) const
 
const ScatterVectorPostprocessorValuegetScatterVectorPostprocessorValueOldByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name, const std::string &vector_name) const
 
bool hasVectorPostprocessor (const std::string &param_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name, const std::string &vector_name) const
 
bool hasVectorPostprocessorByName (const VectorPostprocessorName &name) const
 
const VectorPostprocessorName & getVectorPostprocessorName (const std::string &param_name) const
 
T & getSampler (const std::string &name)
 
SamplergetSampler (const std::string &name)
 
T & getSamplerByName (const SamplerName &name)
 
SamplergetSamplerByName (const SamplerName &name)
 
virtual void meshChanged ()
 
virtual void meshDisplaced ()
 
PerfGraphperfGraph ()
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributed (const std::string &param_name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
bool isVectorPostprocessorDistributedByName (const VectorPostprocessorName &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistribution (const std::string &name) const
 
const T & getDistribution (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const DistributiongetDistributionByName (const DistributionName &name) const
 
const T & getDistributionByName (const std::string &name) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
virtual void threadJoin (const UserObject &uo)
 
virtual void getTorqueJacobianData (DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const
 
virtual void getMomentOfInertiaJacobianData (DenseMatrix< Real > &jacobian_block, std::vector< dof_id_type > &dofs_j) const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void sort (typename std::vector< T > &vector)
 
static void sortDFS (typename std::vector< T > &vector)
 
static void cyclicDependencyError (CyclicDependencyException< T2 > &e, const std::string &header)
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 
static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

virtual void addPostprocessorDependencyHelper (const PostprocessorName &name) const override
 
virtual void addVectorPostprocessorDependencyHelper (const VectorPostprocessorName &name) const override
 
virtual void addUserObjectDependencyHelper (const UserObject &uo) const override
 
void addReporterDependencyHelper (const ReporterName &reporter_name) override
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const T & getReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const T & getReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
virtual void setupConnections (unsigned int n_connections, unsigned int n_flow_eq)
 
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. 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...
 
virtual void computeMomentOfInertiaScalarJacobianWRTFlowDofs (const DenseMatrix< Real > &jac, const unsigned int &c)
 
virtual void computeTorqueScalarJacobianWRTFlowDofs (const DenseMatrix< Real > &jac, const unsigned int &c)
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

const Function_torque_fn
 Torque as a function of shaft speed. More...
 
const Function_inertia_fn
 Moment of inertia as a function of shaft speed. More...
 
const VariableValue_shaft_speed
 Shaft speed. More...
 
SubProblem_subproblem
 
FEProblemBase_fe_problem
 
SystemBase_sys
 
const THREAD_ID _tid
 
Assembly_assembly
 
const Moose::CoordinateSystemType_coord_sys
 
const bool _duplicate_initial_execution
 
std::set< std::string > _depend_uo
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_mdi_feproblem
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real_t
 
const Real_t_old
 
int_t_step
 
Real_dt
 
Real_dt_old
 
bool _is_transient
 
const Parallel::Communicator & _communicator
 
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...
 
Real _torque
 Total torque. More...
 
Real _moment_of_inertia
 Moment of inertia. More...
 
std::vector< DenseMatrix< Real > > _torque_jacobian_flow_channel_vars
 Cached scalar residual Jacobian matrices w.r.t. More...
 
DenseMatrix< Real_torque_jacobian_scalar_vars
 Jacobian entries of torque wrt to scalar variables (from junction) More...
 
DenseMatrix< Real_torque_jacobian_omega_var
 Jacobian entries of torque wrt to omega variable (from shaft) More...
 
std::vector< DenseMatrix< Real > > _moi_jacobian_flow_channel_vars
 
DenseMatrix< Real_moi_jacobian_scalar_vars
 Jacobian entries of moment of inertia wrt to omega scalar variables (from junction) More...
 
DenseMatrix< Real_moi_jacobian_omega_var
 Jacobian entries of moment of inertia wrt to omega variable (from shaft) More...
 
std::vector< std::vector< std::vector< Real > > > _phi_face_values
 Side shape function value (i.e. side from the flow channels) More...
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Detailed Description

User object to provide data for a shaft-connected motor.

Definition at line 18 of file ShaftConnectedMotorUserObject.h.

Constructor & Destructor Documentation

◆ ShaftConnectedMotorUserObject()

ShaftConnectedMotorUserObject::ShaftConnectedMotorUserObject ( const InputParameters params)

Definition at line 29 of file ShaftConnectedMotorUserObject.C.

30  : GeneralUserObject(params),
32  _torque_fn(getFunction("torque")),
33  _inertia_fn(getFunction("inertia")),
34  _shaft_speed(coupledScalarValue("shaft_speed"))
35 {
36 }
const Function & getFunction(const std::string &name) const
const VariableValue & _shaft_speed
Shaft speed.
ShaftConnectableUserObjectInterface(const MooseObject *moose_object)
const VariableValue & coupledScalarValue(const std::string &var_name, unsigned int comp=0) const
const Function & _torque_fn
Torque as a function of shaft speed.
GeneralUserObject(const InputParameters &parameters)
const Function & _inertia_fn
Moment of inertia as a function of shaft speed.

Member Function Documentation

◆ computeMomentOfInertiaScalarJacobianWRTFlowDofs()

void ShaftConnectableUserObjectInterface::computeMomentOfInertiaScalarJacobianWRTFlowDofs ( const DenseMatrix< Real > &  jac,
const unsigned int c 
)
protectedvirtualinherited

Definition at line 177 of file ShaftConnectableUserObjectInterface.C.

179 {
181  unsigned int jk = 0;
182  for (unsigned int j = 0; j < _n_flow_eq; j++)
183  {
184  for (unsigned int k = 0; k < _phi_face_values[c][j].size(); k++)
185  {
186  _moi_jacobian_flow_channel_vars[c](0, jk) = jac(0, j) * _phi_face_values[c][j][k];
187  jk++;
188  }
189  }
190 }
std::vector< std::vector< std::vector< Real > > > _phi_face_values
Side shape function value (i.e. side from the flow channels)
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static const std::string k
Definition: NS.h:130
std::vector< DenseMatrix< Real > > _moi_jacobian_flow_channel_vars

◆ computeTorqueScalarJacobianWRTFlowDofs()

void ShaftConnectableUserObjectInterface::computeTorqueScalarJacobianWRTFlowDofs ( const DenseMatrix< Real > &  jac,
const unsigned int c 
)
protectedvirtualinherited

Definition at line 161 of file ShaftConnectableUserObjectInterface.C.

163 {
165  unsigned int jk = 0;
166  for (unsigned int j = 0; j < _n_flow_eq; j++)
167  {
168  for (unsigned int k = 0; k < _phi_face_values[c][j].size(); k++)
169  {
170  _torque_jacobian_flow_channel_vars[c](0, jk) = jac(0, j) * _phi_face_values[c][j][k];
171  jk++;
172  }
173  }
174 }
std::vector< std::vector< std::vector< Real > > > _phi_face_values
Side shape function value (i.e. side from the flow channels)
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< DenseMatrix< Real > > _torque_jacobian_flow_channel_vars
Cached scalar residual Jacobian matrices w.r.t.
static const std::string k
Definition: NS.h:130

◆ execute()

void ShaftConnectedMotorUserObject::execute ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 68 of file ShaftConnectedMotorUserObject.C.

69 {
70 }

◆ finalize()

void ShaftConnectedMotorUserObject::finalize ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 73 of file ShaftConnectedMotorUserObject.C.

74 {
75 }

◆ getMomentOfInertia()

Real ShaftConnectedMotorUserObject::getMomentOfInertia ( ) const
overridevirtual

Reimplemented from ShaftConnectableUserObjectInterface.

Definition at line 51 of file ShaftConnectedMotorUserObject.C.

52 {
53  return _inertia_fn.value(_shaft_speed[0], Point());
54 }
const VariableValue & _shaft_speed
Shaft speed.
virtual Real value(Real t, const Point &p) const
const Function & _inertia_fn
Moment of inertia as a function of shaft speed.

◆ getMomentOfInertiaJacobianData() [1/2]

void ShaftConnectedMotorUserObject::getMomentOfInertiaJacobianData ( DenseMatrix< Real > &  jacobian_block,
std::vector< dof_id_type > &  dofs_j 
) const
overridevirtual

Definition at line 57 of file ShaftConnectedMotorUserObject.C.

59 {
60 }

◆ getMomentOfInertiaJacobianData() [2/2]

void ShaftConnectableUserObjectInterface::getMomentOfInertiaJacobianData ( DenseMatrix< Real > &  jacobian_block,
std::vector< dof_id_type > &  dofs_j 
) const
virtualinherited

Definition at line 90 of file ShaftConnectableUserObjectInterface.C.

92 {
93  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
94 
95  unsigned int n_dofs = 1 + _scalar_dofs.size();
96  for (unsigned int c = 0; c < _n_connections; c++)
97  n_dofs += _moi_jacobian_flow_channel_vars[c].n();
98 
99  jacobian_block.resize(_n_shaft_eq, n_dofs);
100  dofs_j.resize(n_dofs);
101 
102  unsigned int k = 0;
103  jacobian_block(0, k) = _moi_jacobian_omega_var(0, 0);
104  dofs_j[k] = _omega_dof[0];
105  k++;
106 
107  // Store Jacobian entries w.r.t. scalar variables
108  for (unsigned int j = 0; j < _scalar_dofs.size(); j++, k++)
109  {
110  jacobian_block(0, k) = _moi_jacobian_scalar_vars(0, j);
111  dofs_j[k] = _scalar_dofs[j];
112  }
113  // Store Jacobian entries w.r.t. flow variables
114  for (unsigned int c = 0; c < _n_connections; c++)
115  {
116  for (unsigned int j = 0; j < _moi_jacobian_flow_channel_vars[c].n(); j++, k++)
117  {
118  jacobian_block(0, k) = _moi_jacobian_flow_channel_vars[c](0, j);
119  dofs_j[k] = _flow_channel_dofs[c][j];
120  }
121  }
122 }
DenseMatrix< Real > _moi_jacobian_omega_var
Jacobian entries of moment of inertia wrt to omega variable (from shaft)
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)
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)
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
void resize(const unsigned int new_m, const unsigned int new_n)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static const std::string k
Definition: NS.h:130
std::vector< DenseMatrix< Real > > _moi_jacobian_flow_channel_vars
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.

◆ getTorque()

Real ShaftConnectedMotorUserObject::getTorque ( ) const
overridevirtual

Reimplemented from ShaftConnectableUserObjectInterface.

Definition at line 39 of file ShaftConnectedMotorUserObject.C.

40 {
41  return _torque_fn.value(_shaft_speed[0], Point());
42 }
const VariableValue & _shaft_speed
Shaft speed.
const Function & _torque_fn
Torque as a function of shaft speed.
virtual Real value(Real t, const Point &p) const

◆ getTorqueJacobianData() [1/2]

void ShaftConnectedMotorUserObject::getTorqueJacobianData ( DenseMatrix< Real > &  jacobian_block,
std::vector< dof_id_type > &  dofs_j 
) const
overridevirtual

Definition at line 45 of file ShaftConnectedMotorUserObject.C.

47 {
48 }

◆ getTorqueJacobianData() [2/2]

void ShaftConnectableUserObjectInterface::getTorqueJacobianData ( DenseMatrix< Real > &  jacobian_block,
std::vector< dof_id_type > &  dofs_j 
) const
virtualinherited

Definition at line 49 of file ShaftConnectableUserObjectInterface.C.

Referenced by ShaftComponentTorqueScalarKernel::computeJacobian().

51 {
52  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
53 
54  unsigned int n_dofs = 1 + _scalar_dofs.size();
55  for (unsigned int c = 0; c < _n_connections; c++)
57 
58  jacobian_block.resize(_n_shaft_eq, n_dofs);
59  dofs_j.resize(n_dofs);
60 
61  unsigned int k = 0;
62  jacobian_block(0, k) = _torque_jacobian_omega_var(0, 0);
63  dofs_j[k] = _omega_dof[0];
64  k++;
65 
66  // Store Jacobian entries w.r.t. scalar variables
67  for (unsigned int j = 0; j < _scalar_dofs.size(); j++, k++)
68  {
69  jacobian_block(0, k) = _torque_jacobian_scalar_vars(0, j);
70  dofs_j[k] = _scalar_dofs[j];
71  }
72  // Store Jacobian entries w.r.t. flow variables
73  for (unsigned int c = 0; c < _n_connections; c++)
74  {
75  for (unsigned int j = 0; j < _torque_jacobian_flow_channel_vars[c].n(); j++, k++)
76  {
77  jacobian_block(0, k) = _torque_jacobian_flow_channel_vars[c](0, j);
78  dofs_j[k] = _flow_channel_dofs[c][j];
79  }
80  }
81 }
DenseMatrix< Real > _torque_jacobian_scalar_vars
Jacobian entries of torque wrt to scalar variables (from junction)
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)
std::vector< dof_id_type > _scalar_dofs
Degrees of freedom for scalar variables (from junction)
DenseMatrix< Real > _torque_jacobian_omega_var
Jacobian entries of torque wrt to omega variable (from shaft)
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
void resize(const unsigned int new_m, const unsigned int new_n)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< DenseMatrix< Real > > _torque_jacobian_flow_channel_vars
Cached scalar residual Jacobian matrices w.r.t.
static const std::string k
Definition: NS.h:130
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.

◆ initialize()

void ShaftConnectedMotorUserObject::initialize ( )
overridevirtual

Implements GeneralUserObject.

Definition at line 63 of file ShaftConnectedMotorUserObject.C.

64 {
65 }

◆ setConnectionData()

void ShaftConnectableUserObjectInterface::setConnectionData ( const std::vector< std::vector< std::vector< Real >>> &  phi_face_values,
const std::vector< std::vector< dof_id_type >> &  flow_channel_dofs 
)
protectedvirtualinherited

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

Definition at line 136 of file ShaftConnectableUserObjectInterface.C.

139 {
140  _flow_channel_dofs = flow_channel_dofs;
141  _phi_face_values = phi_face_values;
142 }
std::vector< std::vector< std::vector< Real > > > _phi_face_values
Side shape function value (i.e. side from the flow channels)
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.

◆ setOmegaDofs()

void ShaftConnectableUserObjectInterface::setOmegaDofs ( const MooseVariableScalar omega_var)
protectedvirtualinherited

Definition at line 145 of file ShaftConnectableUserObjectInterface.C.

146 {
147  auto && dofs = omega_var->dofIndices();
148  mooseAssert(dofs.size() == 1,
149  "There should be exactly 1 coupled DoF index for the variable '" + omega_var->name() +
150  "'.");
151  _omega_dof = dofs;
152 }
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 ShaftConnectableUserObjectInterface::setupConnections ( unsigned int  n_connections,
unsigned int  n_flow_eq 
)
protectedvirtualinherited

Definition at line 125 of file ShaftConnectableUserObjectInterface.C.

127 {
128  _n_connections = n_connections;
131 
132  _n_flow_eq = n_flow_eq;
133 }
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
std::vector< DenseMatrix< Real > > _torque_jacobian_flow_channel_vars
Cached scalar residual Jacobian matrices w.r.t.
std::vector< DenseMatrix< Real > > _moi_jacobian_flow_channel_vars
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.

◆ setupJunctionData()

void ShaftConnectableUserObjectInterface::setupJunctionData ( std::vector< dof_id_type > &  scalar_dofs)
protectedvirtualinherited

Stores data associated with a junction component.

Definition at line 155 of file ShaftConnectableUserObjectInterface.C.

156 {
157  _scalar_dofs = scalar_dofs;
158 }
std::vector< dof_id_type > _scalar_dofs
Degrees of freedom for scalar variables (from junction)

◆ threadJoin()

void ShaftConnectableUserObjectInterface::threadJoin ( const UserObject uo)
virtualinherited

Definition at line 198 of file ShaftConnectableUserObjectInterface.C.

199 {
200  const ShaftConnectableUserObjectInterface & sctc_uo =
201  dynamic_cast<const ShaftConnectableUserObjectInterface &>(uo);
202  _torque += sctc_uo._torque;
204 }
Interface class for user objects that are connected to a shaft.

◆ validParams()

InputParameters ShaftConnectedMotorUserObject::validParams ( )
static

Definition at line 16 of file ShaftConnectedMotorUserObject.C.

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");
24  params.addClassDescription(
25  "Computes the torque and moment of inertia of a shaft connected motor");
26  return params;
27 }
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _flow_channel_dofs

std::vector<std::vector<dof_id_type> > ShaftConnectableUserObjectInterface::_flow_channel_dofs
protectedinherited

◆ _inertia_fn

const Function& ShaftConnectedMotorUserObject::_inertia_fn
protected

Moment of inertia as a function of shaft speed.

Definition at line 40 of file ShaftConnectedMotorUserObject.h.

Referenced by getMomentOfInertia().

◆ _moi_jacobian_flow_channel_vars

std::vector<DenseMatrix<Real> > ShaftConnectableUserObjectInterface::_moi_jacobian_flow_channel_vars
protectedinherited

◆ _moi_jacobian_omega_var

DenseMatrix<Real> ShaftConnectableUserObjectInterface::_moi_jacobian_omega_var
protectedinherited

Jacobian entries of moment of inertia wrt to omega variable (from shaft)

Definition at line 88 of file ShaftConnectableUserObjectInterface.h.

Referenced by ShaftConnectableUserObjectInterface::getMomentOfInertiaJacobianData(), and ShaftConnectableUserObjectInterface::ShaftConnectableUserObjectInterface().

◆ _moi_jacobian_scalar_vars

DenseMatrix<Real> ShaftConnectableUserObjectInterface::_moi_jacobian_scalar_vars
protectedinherited

Jacobian entries of moment of inertia wrt to omega scalar variables (from junction)

Definition at line 86 of file ShaftConnectableUserObjectInterface.h.

Referenced by ShaftConnectableUserObjectInterface::getMomentOfInertiaJacobianData().

◆ _moment_of_inertia

Real ShaftConnectableUserObjectInterface::_moment_of_inertia
protectedinherited

◆ _n_connections

unsigned int ShaftConnectableUserObjectInterface::_n_connections
protectedinherited

◆ _n_flow_eq

unsigned int ShaftConnectableUserObjectInterface::_n_flow_eq
protectedinherited

◆ _n_shaft_eq

unsigned int ShaftConnectableUserObjectInterface::_n_shaft_eq
protectedinherited

◆ _omega_dof

std::vector<dof_id_type> ShaftConnectableUserObjectInterface::_omega_dof
protectedinherited

◆ _phi_face_values

std::vector<std::vector<std::vector<Real> > > ShaftConnectableUserObjectInterface::_phi_face_values
protectedinherited

◆ _scalar_dofs

std::vector<dof_id_type> ShaftConnectableUserObjectInterface::_scalar_dofs
protectedinherited

◆ _shaft_speed

const VariableValue& ShaftConnectedMotorUserObject::_shaft_speed
protected

Shaft speed.

Definition at line 42 of file ShaftConnectedMotorUserObject.h.

Referenced by getMomentOfInertia(), and getTorque().

◆ _torque

Real ShaftConnectableUserObjectInterface::_torque
protectedinherited

◆ _torque_fn

const Function& ShaftConnectedMotorUserObject::_torque_fn
protected

Torque as a function of shaft speed.

Definition at line 38 of file ShaftConnectedMotorUserObject.h.

Referenced by getTorque().

◆ _torque_jacobian_flow_channel_vars

std::vector<DenseMatrix<Real> > ShaftConnectableUserObjectInterface::_torque_jacobian_flow_channel_vars
protectedinherited

Cached scalar residual Jacobian matrices w.r.t.

flow channel variables, for each connection (first index) and each scalar variable (second index)

Definition at line 78 of file ShaftConnectableUserObjectInterface.h.

Referenced by ShaftConnectableUserObjectInterface::computeTorqueScalarJacobianWRTFlowDofs(), ShaftConnectableUserObjectInterface::getTorqueJacobianData(), and ShaftConnectableUserObjectInterface::setupConnections().

◆ _torque_jacobian_omega_var

DenseMatrix<Real> ShaftConnectableUserObjectInterface::_torque_jacobian_omega_var
protectedinherited

◆ _torque_jacobian_scalar_vars

DenseMatrix<Real> ShaftConnectableUserObjectInterface::_torque_jacobian_scalar_vars
protectedinherited

Jacobian entries of torque wrt to scalar variables (from junction)

Definition at line 80 of file ShaftConnectableUserObjectInterface.h.

Referenced by ShaftConnectableUserObjectInterface::getTorqueJacobianData().


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