22 "Apply a moment as tractions distributed over a surface around a " 23 "pivot point. This should operate on the displaced mesh for large deformations.");
26 "origin",
"Reference point defining the location for the axis the torque is applied to");
29 "factor",
"1",
"Prefactor for the force (can only be time dependent)");
31 "polar_moment_of_inertia",
"Postprocessor that computes the polar moment of inertia");
32 params.
addParam<
Real>(
"alpha", 0.0,
"alpha parameter required for HHT time integration scheme");
42 _origin(this->template getParam<Point>(
"origin")),
44 _factor(this->getFunction(
"factor")),
45 _alpha(this->template getParam<
Real>(
"alpha")),
46 _pmi(this->getPostprocessorValue(
"polar_moment_of_inertia")),
47 _ndisp(this->coupledComponents(
"displacements")),
51 for (
unsigned int i = 0; i <
_ndisp; ++i)
53 _dvars[i] = this->getVar(
"displacements", i)->number();
54 if (this->_var.number() ==
_dvars[i])
59 this->paramError(
"variable",
60 "The kernel variable needs to be one of the 'displacements' variables");
61 if (this->
template getParam<bool>(
"use_displaced_mesh"))
62 this->paramError(
"use_displaced_mesh",
"This BC is only validated for small strains");
70 auto local_lever = this->_ad_q_points[_qp] - _origin;
74 _factor.value(_t + _alpha * _dt, _dummy_point) * _torque.cross(local_lever) / _pmi;
76 return -local_force(_component) * _test[_i][_qp];
84 auto local_lever = this->_q_point[_qp] - _origin;
88 _factor.value(_t + _alpha * _dt, _dummy_point) * _torque.cross(local_lever) / _pmi;
90 return -local_force(_component) * _test[_i][_qp];
102 auto d_local_force = _factor.value(_t + _alpha * _dt, _dummy_point) * _torque.
cross(phi) / _pmi;
103 return -d_local_force(_component) * _test[_i][_qp];
113 template <
bool is_ad>
117 return componentJacobian(_component);
120 template <
bool is_ad>
124 for (
unsigned int i = 0; i < _ndisp; ++i)
125 if (jvar == _dvars[i])
126 return componentJacobian(i);
const unsigned int invalid_uint
Real componentJacobian(unsigned int component)
void mooseError(Args &&... args)
static const std::string component
std::vector< unsigned int > _dvars
coupled displacement variables
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
DualNumber< Real, DNDerivativeType, true > ADReal
const unsigned int _ndisp
number of coupled displacement variables
typename std::conditional< is_ad, ADIntegratedBC, IntegratedBC >::type TorqueParent
InputParameters validParams()
unsigned int _component
coordinte axis this BC acts on
TorqueTempl(const InputParameters ¶meters)
TypeVector< typename CompareTypes< Real, T2 >::supertype > cross(const TypeVector< T2 > &v) const
virtual Real computeQpJacobian()
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpOffDiagJacobian(unsigned int)
Apply a torque as tractions distributed over a surface.
registerMooseObject("SolidMechanicsApp", Torque)
virtual GenericReal< is_ad > computeQpResidual()