Go to the documentation of this file.
12 #include "MooseVariable.h"
13 #include "PermutationTensor.h"
23 params.addClassDescription(
"Kernel for inertial torque: density * displacement x acceleration");
24 params.set<
bool>(
"use_displaced_mesh") =
false;
25 params.addRequiredRangeCheckedParam<
unsigned int>(
28 "The component of the Cosserat rotation Variable prescribed to "
29 "this Kernel (0 for x, 1 for y, 2 for z)");
30 params.addRequiredCoupledVar(
"displacements",
"The 3 displacement variables");
31 params.addRequiredCoupledVar(
"velocities",
"The 3 velocity variables");
32 params.addRequiredCoupledVar(
"accelerations",
"The 3 acceleration variables");
33 params.addRequiredParam<Real>(
"beta",
"beta parameter for Newmark Time integration");
34 params.addRequiredParam<Real>(
"gamma",
"gamma parameter for Newmark Time integration");
35 params.addParam<MaterialPropertyName>(
36 "density",
"density",
"Name of Material Property that provides the density");
37 params.addParam<MaterialPropertyName>(
"eta",
39 "Name of material property or a constant real "
40 "number defining the eta parameter for the "
42 params.addParam<Real>(
"alpha",
44 "alpha parameter for mass dependent numerical damping induced "
45 "by HHT time integration scheme");
50 : TimeKernel(parameters),
51 _density(getMaterialProperty<Real>(
"density")),
52 _beta(getParam<Real>(
"beta")),
53 _gamma(getParam<Real>(
"gamma")),
54 _eta(getMaterialProperty<Real>(
"eta")),
55 _alpha(getParam<Real>(
"alpha")),
56 _component(getParam<unsigned int>(
"component")),
57 _ndisp(coupledComponents(
"displacements")),
68 if (
_ndisp != 3 || coupledComponents(
"velocities") != 3 ||
69 coupledComponents(
"accelerations") != 3)
71 "InertialTorque: This Kernel is only defined for 3-dimensional simulations so 3 "
72 "displacement variables, 3 velocity variables and 3 acceleration variables are needed");
73 for (
unsigned i = 0; i <
_ndisp; ++i)
75 _disp_num[i] = coupled(
"displacements", i);
76 _disp[i] = &coupledValue(
"displacements", i);
77 _disp_old[i] = &coupledValueOld(
"displacements", i);
78 _vel_old[i] = &coupledValueOld(
"velocities", i);
79 _accel_old[i] = &coupledValueOld(
"accelerations", i);
86 for (
unsigned int j = 0; j <
_ndisp; ++j)
99 for (
unsigned int j = 0; j <
_ndisp; ++j)
100 for (
unsigned int k = 0; k <
_ndisp; ++k)
102 return _test[_i][_qp] *
_density[_qp] * the_sum;
114 for (
unsigned int j = 0; j <
_ndisp; ++j)
128 for (
unsigned v = 0; v <
_ndisp; ++v)
135 for (
unsigned int k = 0; k <
_ndisp; ++k)
137 for (
unsigned int j = 0; j <
_ndisp; ++j)
139 return _test[_i][_qp] *
_density[_qp] * the_sum * _phi[_j][_qp];
defineLegacyParams(InertialTorque)
const MaterialProperty< Real > & _eta
Rayleigh-damping eta parameter.
registerMooseObject("TensorMechanicsApp", InertialTorque)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
std::vector< Real > _dvel
Derivative of velocity with respect to displacement.
const unsigned _ndisp
Number of displacement variables. This must be 3.
std::vector< Real > _accel
Acceleration (instantiating this vector avoids re-creating a new vector every residual calculation)
Computes the inertial torque, which is density * displacement x acceleration (a cross-product is used...
static InputParameters validParams()
InertialTorque(const InputParameters ¶meters)
const Real _alpha
HHT alpha parameter.
const Real _beta
Newmark beta parameter.
virtual Real computeQpResidual() override
std::vector< const VariableValue * > _disp_old
Old value of displacements.
const unsigned _component
Component of the cross-product desired.
virtual Real computeQpJacobian() override
const Real _gamma
Newmark gamma parameter.
InputParameters validParams()
std::vector< const VariableValue * > _accel_old
Old value of accelerations.
std::vector< unsigned > _disp_num
MOOSE internal variable numbers corresponding to the displacments.
std::vector< Real > _daccel
Derivative of acceleration with respect to displacement.
std::vector< Real > _vel
Velocity (instantiating this vector avoids re-creating a new vector every residual calculation)
std::vector< const VariableValue * > _disp
Displacements.
const MaterialProperty< Real > & _density
density
std::vector< const VariableValue * > _vel_old
Old value of velocities.