https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15class UserObject;
17
22{
23public:
25
26 virtual void initialize();
27 virtual void execute();
28 virtual void finalize();
29 virtual void threadJoin(const UserObject & uo);
30
31 virtual ADReal getTorque() const;
32 virtual ADReal getMomentOfInertia() const;
33
34protected:
35 virtual void setupConnections(unsigned int n_connections, unsigned int n_flow_eq);
39 virtual void setConnectionData(const std::vector<std::vector<dof_id_type>> & flow_channel_dofs);
40 virtual void setOmegaDofs(const MooseVariableScalar * omega_var);
44 virtual void setupJunctionData(std::vector<dof_id_type> & scalar_dofs);
45
49 unsigned int _n_shaft_eq;
51 unsigned int _n_connections;
53 unsigned int _n_flow_eq;
54
56 std::vector<dof_id_type> _omega_dof;
58 std::vector<dof_id_type> _scalar_dofs;
60 std::vector<std::vector<dof_id_type>> _flow_channel_dofs;
65
66public:
68};
DualNumber< Real, DNDerivativeType, true > ADReal
Interface class for user objects that are connected to a shaft.
unsigned int _n_flow_eq
Number of flow variables in connected flow channels.
virtual void setOmegaDofs(const MooseVariableScalar *omega_var)
std::vector< std::vector< dof_id_type > > _flow_channel_dofs
Degrees of freedom for flow channel variables, for each connection.
std::vector< dof_id_type > _scalar_dofs
Degrees of freedom for scalar variables (from junction)
unsigned int _n_connections
Number of flow channels the shaft connected component is attached to.
virtual void setupJunctionData(std::vector< dof_id_type > &scalar_dofs)
Stores data associated with a junction component.
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.
const MooseObject * _moose_object
Associated MOOSE object.
std::vector< dof_id_type > _omega_dof
Degrees of freedom for omega variable (from shaft)
virtual void setupConnections(unsigned int n_connections, unsigned int n_flow_eq)
unsigned int _n_shaft_eq
Number of equation in the shaft component.