www.mooseframework.org
InertialForce.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "InertialForce.h"
8 #include "SubProblem.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<Kernel>();
15  params.addClassDescription("Calculates the residual for the interial force (M*accel) and the "
16  "contribution of mass dependent Rayleigh damping and HHT time "
17  "integration scheme [eta*M*((1+alpha)vel-alpha*vel_old)]");
18  params.set<bool>("use_displaced_mesh") = true;
19  params.addRequiredCoupledVar("velocity", "velocity variable");
20  params.addRequiredCoupledVar("acceleration", "acceleration variable");
21  params.addRequiredParam<Real>("beta", "beta parameter for Newmark Time integration");
22  params.addRequiredParam<Real>("gamma", "gamma parameter for Newmark Time integration");
23  params.addParam<MaterialPropertyName>("eta",
24  0.0,
25  "Name of material property or a constant real "
26  "number defining the eta parameter for the "
27  "Rayleigh damping.");
28  params.addParam<Real>("alpha",
29  0,
30  "alpha parameter for mass dependent numerical damping induced "
31  "by HHT time integration scheme");
32  params.addParam<MaterialPropertyName>(
33  "density", "density", "Name of Material Property that provides the density");
34  return params;
35 }
36 
37 InertialForce::InertialForce(const InputParameters & parameters)
38  : Kernel(parameters),
39  _density(getMaterialProperty<Real>("density")),
40  _u_old(valueOld()),
41  _vel_old(coupledValueOld("velocity")),
42  _accel_old(coupledValueOld("acceleration")),
43  _beta(getParam<Real>("beta")),
44  _gamma(getParam<Real>("gamma")),
45  _eta(getMaterialProperty<Real>("eta")),
46  _alpha(getParam<Real>("alpha"))
47 {
48 }
49 
50 Real
52 {
53  if (_dt == 0)
54  return 0;
55  else
56  {
57  Real accel = 1. / _beta * (((_u[_qp] - _u_old[_qp]) / (_dt * _dt)) - _vel_old[_qp] / _dt -
58  _accel_old[_qp] * (0.5 - _beta));
59  Real vel = _vel_old[_qp] + (_dt * (1 - _gamma)) * _accel_old[_qp] + _gamma * _dt * accel;
60  return _test[_i][_qp] * _density[_qp] *
61  (accel + vel * _eta[_qp] * (1 + _alpha) - _alpha * _eta[_qp] * _vel_old[_qp]);
62  }
63 }
64 
65 Real
67 {
68  if (_dt == 0)
69  return 0;
70  else
71  return _test[_i][_qp] * _density[_qp] / (_beta * _dt * _dt) * _phi[_j][_qp] +
72  _eta[_qp] * (1 + _alpha) * _test[_i][_qp] * _density[_qp] * _gamma / _beta / _dt *
73  _phi[_j][_qp];
74 }
const VariableValue & _u_old
Definition: InertialForce.h:31
virtual Real computeQpJacobian()
Definition: InertialForce.C:66
const VariableValue & _vel_old
Definition: InertialForce.h:32
const VariableValue & _accel_old
Definition: InertialForce.h:33
const Real _beta
Definition: InertialForce.h:34
InertialForce(const InputParameters &parameters)
Definition: InertialForce.C:37
const MaterialProperty< Real > & _density
Definition: InertialForce.h:30
InputParameters validParams< InertialForce >()
Definition: InertialForce.C:12
const MaterialProperty< Real > & _eta
Definition: InertialForce.h:36
const Real _gamma
Definition: InertialForce.h:35
virtual Real computeQpResidual()
Definition: InertialForce.C:51
const Real _alpha
Definition: InertialForce.h:37