https://mooseframework.inl.gov
thermal_hydraulics
include
interfaces
ADShaftConnectableUserObjectInterface.h
Go to the documentation of this file.
1
//* This file is part of the MOOSE framework
2
//* https://mooseframework.inl.gov
3
//*
4
//* All rights reserved, see COPYRIGHT for full restrictions
5
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6
//*
7
//* Licensed under LGPL 2.1, please see LICENSE for details
8
//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10
#pragma once
11
12
#include "libmesh/dense_matrix.h"
13
#include "
InputParameters.h
"
14
15
using namespace
libMesh
;
16
class
UserObject
;
17
class
MooseVariableScalar
;
18
22
class
ADShaftConnectableUserObjectInterface
23
{
24
public
:
25
ADShaftConnectableUserObjectInterface
(
const
MooseObject
* moose_object);
26
27
virtual
void
initialize
();
28
virtual
void
execute();
29
virtual
void
finalize();
30
virtual
void
threadJoin(
const
UserObject
& uo);
31
32
virtual
ADReal
getTorque()
const
;
33
virtual
ADReal
getMomentOfInertia()
const
;
34
35
protected
:
36
virtual
void
setupConnections(
unsigned
int
n_connections,
unsigned
int
n_flow_eq);
40
virtual
void
setConnectionData(
const
std::vector<std::vector<dof_id_type>> & flow_channel_dofs);
41
virtual
void
setOmegaDofs(
const
MooseVariableScalar
* omega_var);
45
virtual
void
setupJunctionData(std::vector<dof_id_type> & scalar_dofs);
46
48
const
MooseObject
*
_moose_object
;
50
unsigned
int
_n_shaft_eq
;
52
unsigned
int
_n_connections
;
54
unsigned
int
_n_flow_eq
;
55
57
std::vector<dof_id_type>
_omega_dof
;
59
std::vector<dof_id_type>
_scalar_dofs
;
61
std::vector<std::vector<dof_id_type>>
_flow_channel_dofs
;
63
ADReal
_torque
;
65
ADReal
_moment_of_inertia
;
66
67
public
:
68
static
InputParameters
validParams
();
69
};
InputParameters.h
ADShaftConnectableUserObjectInterface::_scalar_dofs
std::vector< dof_id_type > _scalar_dofs
Degrees of freedom for scalar variables (from junction)
Definition:
ADShaftConnectableUserObjectInterface.h:59
libMesh
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
initialize
void initialize(EquationSystems &es, const std::string &system_name)
ADShaftConnectableUserObjectInterface::_n_shaft_eq
unsigned int _n_shaft_eq
Number of equation in the shaft component.
Definition:
ADShaftConnectableUserObjectInterface.h:50
InputParameters
validParams
InputParameters validParams()
MooseObject
ADShaftConnectableUserObjectInterface::_omega_dof
std::vector< dof_id_type > _omega_dof
Degrees of freedom for omega variable (from shaft)
Definition:
ADShaftConnectableUserObjectInterface.h:57
ADShaftConnectableUserObjectInterface::_moment_of_inertia
ADReal _moment_of_inertia
Moment of inertia.
Definition:
ADShaftConnectableUserObjectInterface.h:65
ADShaftConnectableUserObjectInterface
Interface class for user objects that are connected to a shaft.
Definition:
ADShaftConnectableUserObjectInterface.h:22
MooseVariableScalar
ADShaftConnectableUserObjectInterface::_moose_object
const MooseObject * _moose_object
Associated MOOSE object.
Definition:
ADShaftConnectableUserObjectInterface.h:48
ADShaftConnectableUserObjectInterface::_torque
ADReal _torque
Total torque.
Definition:
ADShaftConnectableUserObjectInterface.h:63
MetaPhysicL::DualNumber
ADShaftConnectableUserObjectInterface::_n_connections
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.
Definition:
ADShaftConnectableUserObjectInterface.h:52
ADShaftConnectableUserObjectInterface::_n_flow_eq
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
Definition:
ADShaftConnectableUserObjectInterface.h:54
ADShaftConnectableUserObjectInterface::_flow_channel_dofs
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
Definition:
ADShaftConnectableUserObjectInterface.h:61
UserObject
Generated on Fri Jul 18 2025 13:43:57 for https://mooseframework.inl.gov by
1.8.14